-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-135878: Fix crash in types.SimpleNamespace.__repr__
#135889
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
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. If it's too difficult to come up with a test for this (that isn't the messy fuzzer repro in the issue), I think it's fine to land this without one.
Misc/NEWS.d/next/Library/2025-06-24-14-43-24.gh-issue-135878.Db4roX.rst
Outdated
Show resolved
Hide resolved
…b4roX.rst Co-authored-by: Peter Bierma <[email protected]>
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 for the good suggestions! |
Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
…nGH-135889) (cherry picked from commit b3ab94a) Co-authored-by: sobolevn <[email protected]> Co-authored-by: Peter Bierma <[email protected]>
GH-135895 is a backport of this pull request to the 3.13 branch. |
…nGH-135889) (cherry picked from commit b3ab94a) Co-authored-by: sobolevn <[email protected]> Co-authored-by: Peter Bierma <[email protected]>
GH-135896 is a backport of this pull request to the 3.14 branch. |
…35889) (#135896) gh-135878: Fix crash in `types.SimpleNamespace.__repr__` (GH-135889) (cherry picked from commit b3ab94a) Co-authored-by: sobolevn <[email protected]> Co-authored-by: Peter Bierma <[email protected]>
…35889) (#135895) gh-135878: Fix crash in `types.SimpleNamespace.__repr__` (GH-135889) (cherry picked from commit b3ab94a) Co-authored-by: sobolevn <[email protected]> Co-authored-by: Peter Bierma <[email protected]>
Note, that there's a small behavior change. We now treat missing keys as errors, because it is the correct thing to do. When
->ns_dict
does not have keys from itsPyObject_GetIter(keys)
- this is strange.Any suggestions about the test case here are welcome!
repr(SimpleNamespace)
withtyping.Union
attributes in threads on a free-threading build #135878