summaryrefslogtreecommitdiff
path: root/igor.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-08-06 13:34:09 -0400
committerYury Selivanov <yselivanov@sprymix.com>2015-08-06 13:34:09 -0400
commit1a46f7e5424b161bf8c94d2e48f868b09e3d5ff5 (patch)
treef85f6e29720bef6ddf88c205185bbd19fb00936b /igor.py
parent865a84c1cc6eeef8f5bcf5932c148605486eae71 (diff)
downloadpython-coveragepy-git-1a46f7e5424b161bf8c94d2e48f868b09e3d5ff5.tar.gz
Stop using inspect.getargspec() function (removed in Python 3.6).
Diffstat (limited to 'igor.py')
-rw-r--r--igor.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/igor.py b/igor.py
index 9dadf595..4ea65fad 100644
--- a/igor.py
+++ b/igor.py
@@ -313,8 +313,11 @@ def analyze_args(function):
star(boolean): Does `function` accept *args?
num_args(int): How many positional arguments does `function` have?
"""
- with ignore_warnings():
- argspec = inspect.getargspec(function)
+ try:
+ getargspec = inspect.getfullargspec
+ except AttributeError:
+ getargspec = inspect.getargspec
+ argspec = getargspec(function)
return bool(argspec[1]), len(argspec[0])