From 0bf9aee7151e65594c532826bb04636e1d80fb6f Mon Sep 17 00:00:00 2001 From: juga Date: Tue, 30 May 2023 08:50:36 +0000 Subject: [PATCH] Fix test failure with python3.11 Applied patch from https://salsa.debian.org/debian/python-stem/-/commit/4b02051b35418a45b045379f69c59cd8904eade4 Author: Bas Couwenberg 2023-01-19 09:03:34 Path b8063b3b23af95e02b27848f6ab5c82edd644609 isn't applicable as it is this maint branch. Closes #130 --- stem/control.py | 2 +- stem/prereq.py | 2 +- stem/util/conf.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stem/control.py b/stem/control.py index e192e2956..e6fab6cf9 100644 --- a/stem/control.py +++ b/stem/control.py @@ -474,7 +474,7 @@ def with_default(yields = False): def decorator(func): def get_default(func, args, kwargs): - arg_names = inspect.getargspec(func).args[1:] # drop 'self' + arg_names = inspect.getfullargspec(func).args[1:] # drop 'self' default_position = arg_names.index('default') if 'default' in arg_names else None if default_position is not None and default_position < len(args): diff --git a/stem/prereq.py b/stem/prereq.py index d0963c3f9..e7ab4a748 100644 --- a/stem/prereq.py +++ b/stem/prereq.py @@ -241,7 +241,7 @@ def is_mock_available(): # check for mock's new_callable argument for patch() which was introduced in version 0.8.0 - if 'new_callable' not in inspect.getargspec(mock.patch).args: + if 'new_callable' not in inspect.getfullargspec(mock.patch).args: raise ImportError() return True diff --git a/stem/util/conf.py b/stem/util/conf.py index 80399810c..15c4db8b1 100644 --- a/stem/util/conf.py +++ b/stem/util/conf.py @@ -285,7 +285,7 @@ def wrapped(*args, **kwargs): config.load(path) config._settings_loaded = True - if 'config' in inspect.getargspec(func).args: + if 'config' in inspect.getfullargspec(func).args: return func(*args, config = config, **kwargs) else: return func(*args, **kwargs)