mirror of
https://github.com/python/cpython.git
synced 2025-08-24 18:55:00 +00:00
Issue 20438: Deprecate inspect.getargspec() and friends.
This commit is contained in:
parent
8d006e75e0
commit
3cfec2e2fc
3 changed files with 13 additions and 8 deletions
|
@ -1033,7 +1033,8 @@ def getargspec(func):
|
|||
and keyword arguments are supported. getargspec() will raise ValueError
|
||||
if the func has either annotations or keyword arguments.
|
||||
"""
|
||||
|
||||
warnings.warn("inspect.getargspec() is deprecated, "
|
||||
"use inspect.signature() instead", DeprecationWarning)
|
||||
args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, ann = \
|
||||
getfullargspec(func)
|
||||
if kwonlyargs or ann:
|
||||
|
@ -1057,6 +1058,8 @@ def getfullargspec(func):
|
|||
'annotations' is a dictionary mapping argument names to annotations.
|
||||
|
||||
The first four items in the tuple correspond to getargspec().
|
||||
|
||||
This function is deprecated, use inspect.signature() instead.
|
||||
"""
|
||||
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue