-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-74044: inspect.signature for wrappers around decorated bound methods #736
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
This comment was marked as outdated.
This comment was marked as outdated.
@anton-ryzhov, thanks for your PR! By analyzing the history of the files in this pull request, we identified @1st1, @larryhastings and @zestyping to be potential reviewers. |
@the-knights-who-say-ni Got "Contributor Form Received" |
@anton-ryzhov Good catch. The code looks OK, just add a comment explaining why your change works in all cases. |
…und decorated bound methods
1b7ac75
to
9737829
Compare
@1st1 In case you haven't received notification about last push, I'm notifying about this by the comment. |
I removed the " needs backport to 3.6" label, the 3.6 branch no longer accept bugfixes (only security fixes are accepted): https://devguide.python.org/#status-of-python-branches |
@1st1, I believe your requested changes have been made and this is ready for another review. Thanks! |
Closing and reopening to trigger tests. |
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.
Tested as per given test case, result pass.
Module test passed test_inspect.
Noted make failed to build nis module.
Looks ok to me.
Co-authored-by: Irit Katriel <[email protected]>
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
@anton-ryzhov This needs a news entry. |
Done |
0b1f485
to
ea0a2a5
Compare
Misc/NEWS.d/next/Library/2022-11-09-20-48-42.gh-issue-74044.zBj26K.rst
Outdated
Show resolved
Hide resolved
Thanks @anton-ryzhov for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
… methods (pythonGH-736) (cherry picked from commit dbf2faf) Co-authored-by: Anton Ryzhov <[email protected]>
GH-99328 is a backport of this pull request to the 3.11 branch. |
… methods (pythonGH-736) (cherry picked from commit dbf2faf) Co-authored-by: Anton Ryzhov <[email protected]>
GH-99329 is a backport of this pull request to the 3.10 branch. |
…ds (GH-736) (cherry picked from commit dbf2faf) Co-authored-by: Anton Ryzhov <[email protected]>
…ds (GH-736) (cherry picked from commit dbf2faf) Co-authored-by: Anton Ryzhov <[email protected]>
If we wrap function with bound method, which is also a wrapper around function,
inspect.signature
will not doskip_bound_arg
.It will use
inspect.unwrap
and pass by bound method from outer function to inner one.Reproducer: