Skip to content
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

[3.12] gh-117482: Fix Builtin Types Slot Wrappers (gh-121602) #121632

Merged

Conversation

ericsnowcurrently
Copy link
Member

@ericsnowcurrently ericsnowcurrently commented Jul 11, 2024

When builtin static types are initialized for a subinterpreter, various "tp" slots have already been inherited (for the main interpreter). This was interfering with the logic in add_operators() (in Objects/typeobject.c), causing a wrapper to get created when it shouldn't. This change fixes that by preserving the original data from the static type struct and checking that.

(cherry picked from commit 5250a03)

Co-authored-by: Eric Snow ericsnowcurrently@gmail.com

When builtin static types are initialized for a subinterpreter, various "tp" slots have already been inherited (for the main interpreter).  This was interfering with the logic in add_operators() (in Objects/typeobject.c), causing a wrapper to get created when it shouldn't.  This change fixes that by preserving the original data from the static type struct and checking that.
@ericsnowcurrently ericsnowcurrently removed the request for review from markshannon July 11, 2024 21:12
@ericsnowcurrently ericsnowcurrently merged commit 0ec761a into python:3.12 Jul 11, 2024
27 checks passed
@ericsnowcurrently ericsnowcurrently deleted the fix-builtin-slot-wrappers-3.12 branch July 11, 2024 21:32
ericsnowcurrently added a commit to ericsnowcurrently/cpython that referenced this pull request Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant