Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 33.9k
gh-87106: Fix inspect.signature.bind handling of positional-only arguments with **kwargs#103404
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
jacobtylerwalls commented Apr 10, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
…nly arguments with `**kwargs`
sobolevn left a comment
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.
Thanks!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jacobtylerwalls commented May 4, 2024
👋 @sobolevn would you be interested to take another look? |
sobolevn left a comment
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.
I agree with the fix in general. However, there are still some things to polish and improve :)
Thanks a lot for your work!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Uh oh!
There was an error while loading. Please reload this page.
jacobtylerwalls commented May 5, 2024 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Thanks for your suggestions, @sobolevn. Should I move some of the new cases to |
sobolevn left a comment
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.
@serhiy-storchaka do you have any additional feedback?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
serhiy-storchaka left a comment
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.
LGTM.
Thanks @jacobtylerwalls for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Thanks @jacobtylerwalls for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…nly arguments with **kwargs (pythonGH-103404) (cherry picked from commit 9c15202) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
…nly arguments with **kwargs (pythonGH-103404) (cherry picked from commit 9c15202) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
GH-118984 is a backport of this pull request to the 3.12 branch. |
GH-118985 is a backport of this pull request to the 3.13 branch. |
…nly arguments with **kwargs (pythonGH-103404)
gh-87106
Closes#87106
If a function signature has a variadic keyword argument (like
**kwargs), then providing a keyword with the same name as a positional-only argument will still succeed, and become available onkwargs.Before
inspect.signature(f).bind(pos_only='val')might either:Now
These are fixed.
Prior related work
#16800