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

gh-117482: Fix Builtin Types Slot Wrappers When Embedded #121636

Conversation

ericsnowcurrently
Copy link
Member

@ericsnowcurrently ericsnowcurrently commented Jul 11, 2024

While gh-121602 solved most of the problem, it did not resolve the case where the runtime gets re-initialized. In that case, we end up in the same situation as before, where the inherited "tp" slots are set, which makes add_operators() do the wrong thing. We fix that by resetting the static type to the preserved values during finalization. We also make sure the type substructs are preserved.

(Given that this fix is for a more unlikely case, I'm inclined to not backport this to 3.12.)

@AraHaan
Copy link
Contributor

AraHaan commented Jul 12, 2024

I feel like while we are at it, properly implementing a full cleanup of the runtime state as mentioned in the _PyRuntime_Finalize() function's comments and doing a full reinitialize of it's variables inside of _PyRuntime_Initialize(). I think doing that would help fix this issue permanently.

@ericsnowcurrently
Copy link
Member Author

Yep. It's on my TODO list. 😄

@ericsnowcurrently ericsnowcurrently added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jul 15, 2024
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @ericsnowcurrently for commit 8520cfc 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@freakboy3742
Copy link
Contributor

!buildbot iOS

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @freakboy3742 for commit 8520cfc 🤖

The command will test the builders whose names match following regular expression: iOS

The builders matched are:

  • iOS ARM64 Simulator PR

@ericsnowcurrently ericsnowcurrently marked this pull request as draft August 12, 2024 22:44
@ericsnowcurrently
Copy link
Member Author

I'm going to go with gh-122865. We can circle back to this later.

@ericsnowcurrently ericsnowcurrently deleted the fix-builtin-slot-wrappers-embedded branch August 13, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants