Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
gh-112358: Fix Python 3.12 regression with subclassing struct.Struct.#112424
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 ourterms of service andprivacy 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
@AlexWaygood Thanks for alerting me to this issue. Would you be willing to review the fix? |
Uh oh!
There was an error while loading.Please reload this page.
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'm generally not the person you'd want to review a change to C code, but this looks like a clean revert, so I'm confident in approving this. Thanks!
Okay, noted for the future. :-)
Ah yes, I should have elaborated in the PR description (and I've belatedly updated the PR description): the first commit is indeed a clean revert ( Thank you for reviewing! |
Thanks@mdickinson for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry,@mdickinson, I could not cleanly backport this to |
GH-112426 is a backport of this pull request to the3.12 branch. |
…truct.Struct. (pythonGH-112424)Revert commitc8c0afc (PRpythonGH-94532),which moved `struct.Struct` initialisation from `Struct.__init__` to `Struct.__new__`.This caused issues with code in the wild that subclasses `struct.Struct`..(cherry picked from commit9fe6034)Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
…Struct (GH-112424) (#112426)* [3.12]gh-112358: Fix Python 3.12 regression with subclassing struct.Struct. (GH-112424)Revert commitc8c0afc (PRGH-94532),which moved `struct.Struct` initialisation from `Struct.__init__` to `Struct.__new__`.This caused issues with code in the wild that subclasses `struct.Struct`..(cherry picked from commit9fe6034)Co-authored-by: Mark Dickinson <dickinsm@gmail.com>* Remove unrelated test
…truct. (python#112424)Revert commitc8c0afc (PRpython#94532),which moved `struct.Struct` initialisation from `Struct.__init__` to `Struct.__new__`.This caused issues with code in the wild that subclasses `struct.Struct`.
…truct. (python#112424)Revert commitc8c0afc (PRpython#94532),which moved `struct.Struct` initialisation from `Struct.__init__` to `Struct.__new__`.This caused issues with code in the wild that subclasses `struct.Struct`.
Uh oh!
There was an error while loading.Please reload this page.
This PR reverts commitc8c0afc (PR#94532), which caused issues with code in the wild that subclasses
struct.Struct.Note for reviewers: the first commit contains no manual changes: it's the result of a
git revert c8c0afcfollowed bypython Tools/clinic/clinic.py -f Modules/_struct.cto regenerate the argument clinic code.