Skip to content

gh-139458: Fix Interpreter Methods For the Main Interpreter - #139521

Open
ericsnowcurrently wants to merge 5 commits into
python:mainfrom
ericsnowcurrently:fix-interp-0-not-recognized
Open

ericsnowcurrently wants to merge 5 commits into
python:mainfrom
ericsnowcurrently:fix-interp-0-not-recognized

Conversation

@ericsnowcurrently

@ericsnowcurrently ericsnowcurrently commented Oct 2, 2025 •

Copy link
Copy Markdown
Member

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/

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 30, 2026
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.15 bugs and security fixes label May 30, 2026
@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Jun 1, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 90 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Sep 3, 2026
@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Sep 10, 2026
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.

3 participants