| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…only arguments without defaults Follow-up to 9c15202.
| (1, 2, 3, 42, 50, {'c_po': 4})) | ||
|
|
||
| with self.assertRaisesRegex(TypeError, "missing 2 required positional arguments"): | ||
| with self.assertRaisesRegex(TypeError, "missing a required positional-only argument: 'a_po'"): |
There was a problem hiding this comment.
Some of these cases could be moved to the existing method test_signature_bind_posonly_kwargs() if desired?
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for the very quick fix, @jacobtylerwalls! The new logic looks correct to me and does fix the bug I reported (the exception message is slightly different than a direct call to the function, but I at least don't care about that).
Sorry, something went wrong.
|
Thanks for the review (and the original report!)
Right, this was something I was trying to keep to in the original PR (#103404), but during review discussion there I became convinced it was of only marginal benefit. (This time around it seemed too complicated to be worth it, on first look anyway.) |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. 👍
Sorry, something went wrong.
|
Thanks @jacobtylerwalls for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, something went wrong.
…only args without defaults (pythonGH-130192) Follow-up to 9c15202. (cherry picked from commit dab456d) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
GH-130271 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
|
Thanks @jacobtylerwalls for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, something went wrong.
…only args without defaults (pythonGH-130192) Follow-up to 9c15202. (cherry picked from commit dab456d) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
GH-132259 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Before
inspect.Signature.bind() failed to raise TypeError for positional-only arguments passed by keyword (due to a regression handling the case where a default is defined).
After
This is fixed.
Regression in 9c15202.
Interestingly, we did have a test case for this, but it unexpectedly passed because after calling bind(), the test helper also calls the underlying function, making assertRaises(TypeError, ... succeed regardless of the behavior of bind().
Closes #130164