Uh oh!
There was an error while loading. Please reload this page.
gh-115490: Make the interpreter.channels and interpreter.queues Modules Handle Reloading Properly - #115493
Conversation
encukou
left a comment
There was a problem hiding this comment.
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? |
Yhg1s
commented
Feb 15, 2024
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. |
Yhg1s
commented
Feb 15, 2024
#115515 is the temporary workaround. |
ericsnowcurrently
commented
Feb 15, 2024
FYI, I've cut out the extra cleanup code. |
gpshead
commented
Feb 16, 2024
shouldn't we add an explicit test case for this behavior? (a single test that reloads the modules leading to the problem perhaps?) |
… 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.