summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-05-22 20:09:44 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-05-22 20:09:44 (GMT)
commitc8386f78fdf68fef4d9b87e7147b6d288213b8e4 (patch)
tree209df58f59343c4673c57c7c0537fcbbd3052c53 /Lib
parent46dbb7d1032c19163f37785509b8f5b3004416e8 (diff)
downloadcpython-c8386f78fdf68fef4d9b87e7147b6d288213b8e4.zip
cpython-c8386f78fdf68fef4d9b87e7147b6d288213b8e4.tar.gz
cpython-c8386f78fdf68fef4d9b87e7147b6d288213b8e4.tar.bz2
Issue 20438: Adjust stacklevel of inspect.getargspec() warning.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/inspect.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index 48354f6..3debc24 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -1034,7 +1034,8 @@ def getargspec(func):
if the func has either annotations or keyword arguments.
"""
warnings.warn("inspect.getargspec() is deprecated, "
- "use inspect.signature() instead", DeprecationWarning)
+ "use inspect.signature() instead", DeprecationWarning,
+ stacklevel=2)
args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, ann = \
getfullargspec(func)
if kwonlyargs or ann: