54 lines
1.8 KiB
Diff
54 lines
1.8 KiB
Diff
From 4bd809d07cfe76eabb83c918a468bd88dfb0476b Mon Sep 17 00:00:00 2001
|
|
From: Frank Steinborn <steinex@nognu.de>
|
|
Date: Thu, 10 Nov 2022 16:05:45 +0100
|
|
Subject: [PATCH] unbreak for python 3.11
|
|
|
|
---
|
|
stem/control.py | 2 +-
|
|
stem/prereq.py | 2 +-
|
|
stem/util/conf.py | 2 +-
|
|
3 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git stem/control.py stem/control.py
|
|
index e192e29..e6fab6c 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 stem/prereq.py stem/prereq.py
|
|
index 4af6c09..4009c31 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 stem/util/conf.py stem/util/conf.py
|
|
index 8039981..15c4db8 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.38.1
|
|
|