summaryrefslogtreecommitdiff
path: root/net-libs/stem/files/1.8.0-replace-all-usages-of-inspect.getargspec.patch
blob: 608fe5f5224f1373e6932f4bae41aaaefb9524b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From 6497514ea89ba44d404b661d495a8cd2649ac628 Mon Sep 17 00:00:00 2001
From: Juan Orti Alcaine <jortialc@redhat.com>
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