bpo-36751: Deprecate getfullargspec and report positional-only args as regular args#13016
bpo-36751: Deprecate getfullargspec and report positional-only args as regular args#13016pablogsal merged 2 commits intopython:masterfrom
Conversation
zooba
left a comment
There was a problem hiding this comment.
Looks good to me. Thanks, Pablo! 👍
tirkarthi
left a comment
There was a problem hiding this comment.
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! |
|
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