summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--igor.py4
-rw-r--r--tests/conftest.py5
2 files changed, 8 insertions, 1 deletions
diff --git a/igor.py b/igor.py
index 6af3eb15..b0ef6876 100644
--- a/igor.py
+++ b/igor.py
@@ -351,7 +351,9 @@ def analyze_args(function):
getargspec = inspect.getfullargspec
except AttributeError:
getargspec = inspect.getargspec
- argspec = getargspec(function)
+ with ignore_warnings():
+ # DeprecationWarning: Use inspect.signature() instead of inspect.getfullargspec()
+ argspec = getargspec(function)
return bool(argspec[1]), len(argspec[0])
diff --git a/tests/conftest.py b/tests/conftest.py
index d0572dca..8f9053cd 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -35,6 +35,11 @@ def set_warnings():
category=DeprecationWarning,
message="The value of convert_charrefs will become True in 3.5.",
)
+ warnings.filterwarnings(
+ "ignore",
+ category=DeprecationWarning,
+ message=".* instead of inspect.getfullargspec",
+ )
if env.PYPY and env.PY3:
# pypy3 warns about unclosed files a lot.
# pylint: disable=undefined-variable