-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-33582: Emit deprecation warning for formatargspec
#6994
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
0033e03
to
bddb788
Compare
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.
Just two minor fixes before this can go in, IMO.
Lib/inspect.py
Outdated
function to format the sequence of arguments.""" | ||
function to format the sequence of arguments. | ||
|
||
Deprecated since Python 3.5 use, the `signature` function and `Signature` |
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.
IMO there should be a colon :
before the word "use" and no comma after it.
Lib/test/test_inspect.py
Outdated
@@ -712,7 +712,8 @@ def assertArgSpecEquals(self, routine, args_e, varargs_e=None, | |||
self.assertEqual(varkw, varkw_e) | |||
self.assertEqual(defaults, defaults_e) | |||
if formatted is not None: | |||
self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults), | |||
with self.assertWarns(DeprecationWarning): | |||
self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults), |
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.
Please fix the indentation of the continuation line here and further in this file.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
f1bfa0b
to
7ff49d6
Compare
7ff49d6
to
b0e3d14
Compare
I have made the requested changes; please review again |
OK, let's get this in for 3.7.0. |
Thanks @Carreau for the PR, and @ned-deily for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
GH-7645 is a backport of this pull request to the 3.7 branch. |
(cherry picked from commit 46c5cd0) Co-authored-by: Matthias Bussonnier <[email protected]>
(cherry picked from commit 46c5cd0) Co-authored-by: Matthias Bussonnier <[email protected]>
Thanks ! |
Also assert it emits deprecation warnings in corresponding test, and add that into the docstring.
https://bugs.python.org/issue33582