Skip to content

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

Merged
merged 2 commits into from
Apr 30, 2019

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Apr 29, 2019

Copy link
Member

@zooba zooba left a 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! 👍

Copy link
Member

@tirkarthi tirkarthi left a 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

@pablogsal
Copy link
Member Author

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

Copy link
Member

@tirkarthi tirkarthi left a comment

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
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
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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants