Skip to content

Conversation

ericsnowcurrently
Copy link
Member

@ericsnowcurrently ericsnowcurrently commented Oct 2, 2025

Some methods of concurrent.interpreters.Interpreter were not working for the object representing the main interpreter (ID 0). The relevant code was identifying an interpreter not created by the interpreters module as "unrecognized". However, the error message was a bit confusing since it did not distinguish between "not supported" and "doesn't exist".

This is addressed here for the main interpreter by special-casing it. The relevant methods now fail with a clearer message along the lines of "already running main". For other interpreters (e.g. created via C-API), the message is now clearer as well.


📚 Documentation preview 📚: https://cpython-previews--139521.org.readthedocs.build/

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

Successfully merging this pull request may close these issues.

1 participant