-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Replace deprecated inspect.formatargspec with inspect.signature #2507
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2507 +/- ##
===========================================
- Coverage 95.30% 95.30% -0.01%
===========================================
Files 60 60
Lines 12262 12261 -1
===========================================
- Hits 11686 11685 -1
Misses 576 576
Continue to review full report at Codecov.
|
Thanks for the PR @hugovk! We'd started some of this work but weren't sure what the impact of this change is on documentation generation. I think the only outstanding check is validating we're not adding additional signature footprint (specifically with the inclusion of I believe the move to Signature, and no longer using |
Ping. This is now breaking botocore on Python 3.11, where |
Originally submitted by Hugo van Kemenade as boto#2507. Modified by me to remove the first positional parameter like the old code did.
I've submitted #2673 as a little more elaborate approach that preserves the current behavior of skipping "self" (or more precisely, the first positional parameter). I hope you don't mind me modifying your code. |
Absolutely not, go for it! |
Thanks @mgorny, we’re waiting for the last reformatting PR to get merged in the next week or two. Then we plan to drop Python 3.6 on May 30th, at which point we’ll merge this and start testing on the 3.11dev build. |
Thanks. It seems that I need to work on it some more but I should finish it today. |
Originally submitted by Hugo van Kemenade as boto#2507. Modified by me to remove the first positional parameter like the old code did.
@hugovk thank you for submitting this original PR and thank you @mgorny for following up with the impending release of 3.11! However, we will be merging this original one as |
@mgorny these are a few manual tests that I ran:
Note that |
Originally submitted by Hugo van Kemenade as boto#2507. Modified by me to remove the first positional parameter like the old code did.
inspect.formatargspec
is deprecated:https://docs.python.org/3/library/inspect.html#inspect.formatargspec
python/cpython#28618