Juniper/py-junos-eznc

inspect.getargspec is deprecated and removed in Python 3.11

daemonkeeper opened this issue · 1 comments

Python 3.11 removed the inspect.getargspec function from the inspect module. This function is used in the SCP module here:

spec = inspect.getargspec(self._user_progress)

Please replace the invokation by inspect.getfullargspec which acts as a drop-in replacement as per https://docs.python.org/3/library/inspect.html#inspect.getfullargspec.

Since getfullargspec is available since the early days of Python 3.x (and definitely available in Python 3.5 which you name as minimum version) you probably don't need to bump your python dependencies unless you plan to support Python 2.

edit: the same probably applies to

NCCLIENT_FILTER_XML = len(inspect.getargspec(ExecuteRpc.request).args) == 3

However there, it looks, you have remainders of Python 2 compatibility code in place which can probably stay around.

pyEZ support python3.10 and above