From 6497514ea89ba44d404b661d495a8cd2649ac628 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Fri, 1 Jul 2022 09:40:41 +0200 Subject: [PATCH] Replace all usages of inspect.getargspec --- 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 42736486..3b29898d 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 4af6c093..4009c317 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 80399810..15c4db8b 100644 --- a/stem/util/conf.py +++ b/stem/util/conf.py @@ -285,7 +285,7 @@ def uses_settings(handle, path, lazy_load = True): 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) -- 2.36.1