-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-36751: Deprecate getfullargspec and report positional-only args as regular args #13016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks, Pablo! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This generates DeprecationWarning
in two tests in Lib/unittest/test/testmock/testhelpers.py
. Please wrap it with self.assertWarns(DeprecationWarning)
or better use inspect.signature
in the two assert calls to remove the DeprecationWarning
.
➜ cpython git:(pr_13016) ./python.exe Lib/unittest/test/testmock/testhelpers.py
...................................................../Users/karthikeyansingaravelan/stuff/python/cpython/Lib/inspect.py:1114: DeprecationWarning: Use inspect.signature() instead of inspect.getfullargspec()
warnings.warn("Use inspect.signature() instead of inspect.getfullargspec()",
.............
----------------------------------------------------------------------
Ran 66 tests in 0.832s
OK
Done in 74639b3. Thanks @tirkarthi, good catch! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @pablogsal .
Please revert this change - this API was deliberately undeprecated, as per https://bugs.python.org/issue27172 and PEP 570 isn't sufficient justification to deprecate it again. |
Slight correction: the API fixes to restore compatibility with 3.7 are a good thing, the problem is the reintroduction of the programmatic deprecation warnings, even though the reasons for leaving them out still hold. |
https://bugs.python.org/issue36751