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
commitb9833a94a988611d62d3f133dbdad6e2c7f5ffc7 (patch)
treec74e5d57ac1176c0a9aae9fca61e31b1ba646eb8 /igor.py
parent9c393875dccdef92c3d610533642799290c5f00a (diff)
downloadpython-coveragepy-b9833a94a988611d62d3f133dbdad6e2c7f5ffc7.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 9dadf59..4ea65fa 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])