Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
mdickinson merged 3 commits intopython:mainfrommdickinson:fix/struct-subclassing
Nov 26, 2023

Conversation

@mdickinson
Copy link
Member

@mdickinsonmdickinson commentedNov 26, 2023
edited
Loading

This PR reverts commitc8c0afc (PR#94532), which caused issues with code in the wild that subclassesstruct.Struct.

Note for reviewers: the first commit contains no manual changes: it's the result of agit revert c8c0afc followed bypython Tools/clinic/clinic.py -f Modules/_struct.c to regenerate the argument clinic code.

@mdickinson
Copy link
MemberAuthor

@AlexWaygood Thanks for alerting me to this issue. Would you be willing to review the fix?

Copy link
Member

@AlexWaygoodAlexWaygood left a 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!

@mdickinson
Copy link
MemberAuthor

I'm generally not the person you'd want to review a change to C code

Okay, noted for the future. :-)

this looks like a clean revert

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 (git revert), modulo a forced regeneration of the argument clinic code.

Thank you for reviewing!

AlexWaygood reacted with thumbs up emoji

@mdickinsonmdickinson merged commit9fe6034 intopython:mainNov 26, 2023
@miss-islington-app
Copy link

Thanks@mdickinson for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry,@mdickinson, I could not cleanly backport this to3.12 due to a conflict.
Please backport usingcherry_picker on command line.

cherry_picker 9fe60340d7e8dc22b3aec205c557bc69a1b2d18c 3.12
AlexWaygood reacted with thumbs down emoji

@bedevere-app
Copy link

GH-112426 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelNov 26, 2023
mdickinson added a commit to mdickinson/cpython that referenced this pull requestNov 26, 2023
…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>
mdickinson added a commit that referenced this pull requestNov 27, 2023
…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
aisk pushed a commit to aisk/cpython that referenced this pull requestFeb 11, 2024
…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`.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull requestSep 2, 2024
…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`.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@AlexWaygoodAlexWaygoodAlexWaygood approved these changes

@kumaraditya303kumaraditya303Awaiting requested review from kumaraditya303

Assignees

@mdickinsonmdickinson

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@mdickinson@AlexWaygood

[8]ページ先頭

©2009-2025 Movatter.jp