mirror of https://github.com/python/cpython
Issue 20438: Adjust stacklevel of inspect.getargspec() warning.
This commit is contained in:
parent
46dbb7d103
commit
c8386f78fd
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue