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.13] gh-117482: Fix Builtin Types Slot Wrappers (gh-121602) #121630

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington 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.
(cherry picked from commit 5250a03)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
@ericsnowcurrently ericsnowcurrently enabled auto-merge (squash) July 11, 2024 20:24
@ericsnowcurrently ericsnowcurrently merged commit c6dbfbb into python:3.13 Jul 11, 2024
35 checks passed
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.

2 participants