Skip to content

bpo-36751: Deprecate getfullargspec and report positional-only args as regular args - #13016

Merged
pablogsal merged 2 commits into
python:masterfrom
pablogsal:bpo-36751
Apr 30, 2019
Merged

pablogsal merged 2 commits into
python:masterfrom
pablogsal:bpo-36751

Conversation

@pablogsal

@pablogsal pablogsal commented Apr 29, 2019 •

Copy link
Copy Markdown
Member

@zooba zooba left a comment

Copy link
Copy Markdown
Member

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! 👍

@tirkarthi tirkarthi left a comment

Copy link
Copy Markdown
Member

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
@pablogsal

Copy link
Copy Markdown
Member Author

Done in 74639b3. Thanks @tirkarthi, good catch!

@tirkarthi tirkarthi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @pablogsal .

@pablogsal
pablogsal merged commit d5d2b45 into python:master Apr 30, 2019
@pablogsal
pablogsal deleted the bpo-36751 branch April 30, 2019 01:01
@ncoghlan

Copy link
Copy Markdown
Contributor

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.

@ncoghlan

Copy link
Copy Markdown
Contributor

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.

@pablogsal

Copy link
Copy Markdown
Member Author

@ncoghlan I have opened #13245 to handle the undeprecation. Sorry for the inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

6 participants