Uh oh!
There was an error while loading. Please reload this page.
gh-87106: Fix inspect.signature.bind handling of positional-only arguments with **kwargs - #103404
Conversation
…nly arguments with `**kwargs`
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.
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.
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.
@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.
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