← 返回首页
gh-76785: Handle Legacy Interpreters Properly by ericsnowcurrently · Pull Request #117490 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

gh-76785: Handle Legacy Interpreters Properly#117490

Merged
ericsnowcurrently merged 19 commits into
python:mainfrom
ericsnowcurrently:hide-legacy-subinterpreters
Apr 11, 2024
Merged

gh-76785: Handle Legacy Interpreters Properly#117490
ericsnowcurrently merged 19 commits into
python:mainfrom
ericsnowcurrently:hide-legacy-subinterpreters

Conversation

ericsnowcurrently commented Apr 2, 2024
edited
Loading

Copy link
Copy Markdown
Member

This is similar to the situation with threading._DummyThread. The methods (incl. __del__()) of interpreters.Interpreter objects must be careful with interpreters not created by interpreters.create(). The simplest thing is to disable any method that modifies or runs in the interpreter. As part of this, the runtime keeps track of where an interpreter was created. We also handle interpreter "refcounts" properly.

ericsnowcurrently force-pushed the hide-legacy-subinterpreters branch from 7de833a to e38f141 Compare April 11, 2024 00:40
ericsnowcurrently marked this pull request as ready for review April 11, 2024 20:40
ericsnowcurrently enabled auto-merge (squash) April 11, 2024 22:59
ericsnowcurrently merged commit fd259fd into python:main Apr 11, 2024
ericsnowcurrently deleted the hide-legacy-subinterpreters branch April 11, 2024 23:26
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
This is similar to the situation with threading._DummyThread. The methods (incl. __del__()) of interpreters.Interpreter objects must be careful with interpreters not created by interpreters.create(). The simplest thing to start with is to disable any method that modifies or runs in the interpreter. As part of this, the runtime keeps track of where an interpreter was created. We also handle interpreter "refcounts" properly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Footer

© 2026 GitHub, Inc.