René's URL Explorer Experiment


Title: gh-76785: Handle Legacy Interpreters Properly by ericsnowcurrently · Pull Request #117490 · python/cpython · GitHub

Open Graph Title: gh-76785: Handle Legacy Interpreters Properly by ericsnowcurrently · Pull Request #117490 · python/cpython

X Title: gh-76785: Handle Legacy Interpreters Properly by ericsnowcurrently · Pull Request #117490 · python/cpython

Description: 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. Issue: gh-76785

Open Graph Description: 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...

X Description: 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...

Opengraph URL: https://github.com/python/cpython/pull/117490

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:ec8252e4-51c5-2f3b-5405-be9ceb6d973b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idEACE:E8423:296CDB6:36AA607:696B2880
html-safe-nonce5fbcd4ad42e95e3ffe158aa5888f835f019a83e01ae6dede6af7a8886e88aa4a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQUNFOkU4NDIzOjI5NkNEQjY6MzZBQTYwNzo2OTZCMjg4MCIsInZpc2l0b3JfaWQiOiIxNDI5ODk4MTY2MjY4NTM2OTYwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmaca9c2904495e7283dcfcdc37406109ec0ea0b9cf8e265280302b48bf7d94f7ed1
hovercard-subject-tagpull_request:1803503327
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/117490/files
twitter:imagehttps://avatars.githubusercontent.com/u/1152074?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1152074?s=400&v=4
og:image:altThis 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...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release82560a55c6b2054555076f46e683151ee28a19bc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/117490/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F117490%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F117490%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/117490/files
Reloadhttps://github.com/python/cpython/pull/117490/files
Reloadhttps://github.com/python/cpython/pull/117490/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/117490/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/117490/files
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
ericsnowcurrentlyhttps://github.com/ericsnowcurrently
python:mainhttps://github.com/python/cpython/tree/main
ericsnowcurrently:hide-legacy-subinterpretershttps://github.com/ericsnowcurrently/cpython/tree/hide-legacy-subinterpreters
Conversation 0 https://github.com/python/cpython/pull/117490
Commits 19 https://github.com/python/cpython/pull/117490/commits
Checks 0 https://github.com/python/cpython/pull/117490/checks
Files changed https://github.com/python/cpython/pull/117490/files
Please reload this pagehttps://github.com/python/cpython/pull/117490/files
gh-76785: Handle Legacy Interpreters Properly https://github.com/python/cpython/pull/117490/files#top
Show all changes 19 commits https://github.com/python/cpython/pull/117490/files
5b68f4d Identify unmanaged interpreters. ericsnowcurrently Mar 22, 2024 https://github.com/python/cpython/pull/117490/commits/5b68f4d9d7be36eec8e834d1889d1a7320d773fa
1811e50 Implement using a hashtable. ericsnowcurrently Mar 25, 2024 https://github.com/python/cpython/pull/117490/commits/1811e50dcbad10ba30bbd7b20233db8051919d4a
05a3923 Call drop_owned() after Py_EndInterpreter(), not before. ericsnowcurrently Apr 2, 2024 https://github.com/python/cpython/pull/117490/commits/05a39235771d62f656824d4c2a059993ffde9747
6f7c83d Use a linked list. ericsnowcurrently Mar 25, 2024 https://github.com/python/cpython/pull/117490/commits/6f7c83d8f6ab9edbe5dd46f387b1089aac2d9235
3a60142 Add restrictions. ericsnowcurrently Mar 25, 2024 https://github.com/python/cpython/pull/117490/commits/3a60142d907850beda1d32f9a8c3b0befc9eb51c
98fc876 Hide unmanaged interpreters. ericsnowcurrently Mar 25, 2024 https://github.com/python/cpython/pull/117490/commits/98fc876ba91f69667c89760693c4abc21f1d144e
c2629b7 Use Interpreter for unmanaged interpreters. ericsnowcurrently Mar 25, 2024 https://github.com/python/cpython/pull/117490/commits/c2629b78c4e8f393721f68f008a119431efb55b3
f1e2461 Fix other tests. ericsnowcurrently Apr 9, 2024 https://github.com/python/cpython/pull/117490/commits/f1e2461cb84ffca9902f598129be73b460c32fde
55a1c31 Default to require_owned=False. ericsnowcurrently Apr 9, 2024 https://github.com/python/cpython/pull/117490/commits/55a1c3100ea2be8b8fbe53dbf3b3acab2c1faf92
f73b6f3 Interpreter.owned -> Interpreter.whence ericsnowcurrently Apr 10, 2024 https://github.com/python/cpython/pull/117490/commits/f73b6f329c042f4714149c4d93c3520d10d02478
7e6432c require_owned -> restrict ericsnowcurrently Apr 10, 2024 https://github.com/python/cpython/pull/117490/commits/7e6432c3ea4e3bdc617b7edbdc740030f8d49d95
19b68eb Add PyInterpreterState._whence. ericsnowcurrently Apr 10, 2024 https://github.com/python/cpython/pull/117490/commits/19b68ebd15f9930fd4c579ae097bbb7819550b25
d713ecf Drop the module's global state. ericsnowcurrently Apr 10, 2024 https://github.com/python/cpython/pull/117490/commits/d713ecff3ec4553c51160542e83d672a9ccd38c7
fe362d1 Drop a duplicate module func def. ericsnowcurrently Apr 10, 2024 https://github.com/python/cpython/pull/117490/commits/fe362d18d4f7ceda7d9bd71e3dfb23392081d530
cd7d5ee Require the interpreter to be ready for most operations. ericsnowcurrently Apr 10, 2024 https://github.com/python/cpython/pull/117490/commits/cd7d5ee63a1b11214926eaf3a049bbdb248ff430
4f92794 Do not expose not-ready interpreters in the high-level module. ericsnowcurrently Apr 10, 2024 https://github.com/python/cpython/pull/117490/commits/4f92794abde4324bdcbb2f30cf02384ae610156e
e38f141 Fix destroying a not-ready interpreter. ericsnowcurrently Apr 10, 2024 https://github.com/python/cpython/pull/117490/commits/e38f141d5653bafc9fae65a170d81400a3a1f61e
2274d6e Hide a variable on non-debug builds. ericsnowcurrently Apr 11, 2024 https://github.com/python/cpython/pull/117490/commits/2274d6ef7956de5b71381d000365f27c58f01fb8
c796cfa Merge branch 'main' into hide-legacy-subinterpreters ericsnowcurrently Apr 11, 2024 https://github.com/python/cpython/pull/117490/commits/c796cfae708493a671fe935667cbaa857bc5e196
Clear filters https://github.com/python/cpython/pull/117490/files
Please reload this pagehttps://github.com/python/cpython/pull/117490/files
Please reload this pagehttps://github.com/python/cpython/pull/117490/files
pycore_crossinterp.h https://github.com/python/cpython/pull/117490/files#diff-bd777cc84e5161f6ac0876c7d6627dbcd366e928760e905f761f153240074e2f
pycore_interp.h https://github.com/python/cpython/pull/117490/files#diff-cb06b7ba43789a1d6ae5bef46baa8a255b72dbcd2b44bfec7f146ea4e94dbfa0
__init__.py https://github.com/python/cpython/pull/117490/files#diff-d3fef8a3cf6ac71c9803bc02034a6644296cea6d9ec25bbfbf9be8f57954a25c
test_api.py https://github.com/python/cpython/pull/117490/files#diff-235125e49dffbab69561d5c71a0ad9e3eb1eda2e8dba6ab2fb2a6bbbb9cae76c
utils.py https://github.com/python/cpython/pull/117490/files#diff-c9747ab82a0ec51d03e9f5b69adfc81323028e9fc166259f06593fd8b5879bca
_testinternalcapi.c https://github.com/python/cpython/pull/117490/files#diff-687f4a736f1f6ad4b6cd4ff65c8e0113408304e8d65530dbd41b3f59a081a126
_xxsubinterpretersmodule.c https://github.com/python/cpython/pull/117490/files#diff-f29800af0b7052514f5cc3d1a5858d704a8f0dee4c88788b741c00a0ff39f8d0
crossinterp.c https://github.com/python/cpython/pull/117490/files#diff-88c171bf6a3ab394012cb7af2d9929543d379573ff46279de7ad38d4e7a12c54
pystate.c https://github.com/python/cpython/pull/117490/files#diff-7ac11e526f79b42d6ea9d3592cb99da46775640c69fa5510f4a6de87cced7141
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L331
Include/internal/pycore_crossinterp.hhttps://github.com/python/cpython/pull/117490/files#diff-bd777cc84e5161f6ac0876c7d6627dbcd366e928760e905f761f153240074e2f
View file https://github.com/ericsnowcurrently/cpython/blob/c796cfae708493a671fe935667cbaa857bc5e196/Include/internal/pycore_crossinterp.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/117490/{{ revealButtonHref }}
https://github.com/python/cpython/pull/117490/files#diff-bd777cc84e5161f6ac0876c7d6627dbcd366e928760e905f761f153240074e2f
https://github.com/python/cpython/pull/117490/files#diff-bd777cc84e5161f6ac0876c7d6627dbcd366e928760e905f761f153240074e2f
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L317
Include/internal/pycore_interp.hhttps://github.com/python/cpython/pull/117490/files#diff-cb06b7ba43789a1d6ae5bef46baa8a255b72dbcd2b44bfec7f146ea4e94dbfa0
View file https://github.com/ericsnowcurrently/cpython/blob/c796cfae708493a671fe935667cbaa857bc5e196/Include/internal/pycore_interp.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/117490/{{ revealButtonHref }}
https://github.com/python/cpython/pull/117490/files#diff-cb06b7ba43789a1d6ae5bef46baa8a255b72dbcd2b44bfec7f146ea4e94dbfa0
https://github.com/python/cpython/pull/117490/files#diff-cb06b7ba43789a1d6ae5bef46baa8a255b72dbcd2b44bfec7f146ea4e94dbfa0
https://github.com/python/cpython/pull/117490/files#diff-cb06b7ba43789a1d6ae5bef46baa8a255b72dbcd2b44bfec7f146ea4e94dbfa0
https://github.com/python/cpython/pull/117490/files#diff-cb06b7ba43789a1d6ae5bef46baa8a255b72dbcd2b44bfec7f146ea4e94dbfa0
Lib/test/support/interpreters/__init__.pyhttps://github.com/python/cpython/pull/117490/files#diff-d3fef8a3cf6ac71c9803bc02034a6644296cea6d9ec25bbfbf9be8f57954a25c
View file https://github.com/ericsnowcurrently/cpython/blob/c796cfae708493a671fe935667cbaa857bc5e196/Lib/test/support/interpreters/__init__.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/117490/{{ revealButtonHref }}
https://github.com/python/cpython/pull/117490/files#diff-d3fef8a3cf6ac71c9803bc02034a6644296cea6d9ec25bbfbf9be8f57954a25c
https://github.com/python/cpython/pull/117490/files#diff-d3fef8a3cf6ac71c9803bc02034a6644296cea6d9ec25bbfbf9be8f57954a25c
https://github.com/python/cpython/pull/117490/files#diff-d3fef8a3cf6ac71c9803bc02034a6644296cea6d9ec25bbfbf9be8f57954a25c
https://github.com/python/cpython/pull/117490/files#diff-d3fef8a3cf6ac71c9803bc02034a6644296cea6d9ec25bbfbf9be8f57954a25c
https://github.com/python/cpython/pull/117490/files#diff-d3fef8a3cf6ac71c9803bc02034a6644296cea6d9ec25bbfbf9be8f57954a25c
Please reload this pagehttps://github.com/python/cpython/pull/117490/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.