Skip to content

Commit

Permalink
Fix test failure with python3.11
Browse files Browse the repository at this point in the history
Applied patch from https://salsa.debian.org/debian/python-stem/-/commit/4b02051b35418a45b045379f69c59cd8904eade4
Author: Bas Couwenberg <[email protected]>  2023-01-19 09:03:34

Path b8063b3 isn't applicable as it is this maint branch.

Closes torproject#130
  • Loading branch information
juga0 committed Jun 1, 2023
1 parent 8086dad commit 0bf9aee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion stem/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion stem/prereq.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion stem/util/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0bf9aee

Please sign in to comment.