-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-115490: Make the interpreter.channels and interpreter.queues Modules Handle Reloading Properly #115493
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-115490: Make the interpreter.channels and interpreter.queues Modules Handle Reloading Properly #115493
Conversation
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.
This looks good to me, though I'm not too familiar with the details here.
I see comments about doing unregistration via weakref or removing the registry altogether, both of which I thought about before noticing the comments:
Is there a reason for not doing one of these now? |
This... is a lot of change to fix a test failure caused by the shenanigans our testing framework does. I'd rather not rush this in right before a release, even an alpha release. A change like this needs time to bake so repeated runs and all the different buildbots get a chance to find issues. I'll make a separate change to just special-case test.support.interpreters in libregrtest's sys.modules cleanup, we can roll it back after this goes in. |
#115515 is the temporary workaround. |
FYI, I've cut out the extra cleanup code. |
shouldn't we add an explicit test case for this behavior? (a single test that reloads the modules leading to the problem perhaps?) |
…ls not handling unloading (python#115515)" This reverts commit b0e5c35.
… Modules Handle Reloading Properly (pythongh-115493) The problem manifested when the .py module got reloaded and the corresponding extension module didn't. The .py module registers types with the extension and the extension was not allowing that to happen more than once. The solution: let it happen more than once.
… Modules Handle Reloading Properly (pythongh-115493) The problem manifested when the .py module got reloaded and the corresponding extension module didn't. The .py module registers types with the extension and the extension was not allowing that to happen more than once. The solution: let it happen more than once.
The problem manifested when the .py module got reloaded and the corresponding extension module didn't. The .py module registers types with the extension and the extension was not allowing that to happen more than once. The solution: let it happen more than once.