Skip to content

Conversation

@Allactaga
Copy link

@Allactaga Allactaga commented Jan 21, 2026

When module is reloaded it's root level objects are renewed, and if any other module have already imported these variables, they would still be pointing to the old objects. This means that an old object is no longer a dictionary key - new dictionary was constructed. The is checks won't work. And even redefined exception classes won't match in an except clause.

Since the original test was created just to check that we can load module twice, we can do the same inside subinterpreter.

@bedevere-app bedevere-app bot added the tests Tests in the Lib/test dir label Jan 21, 2026
@python-cla-bot
Copy link

python-cla-bot bot commented Jan 21, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant