René's URL Explorer Experiment


Title: gh-105699: Use a _Py_hashtable_t for the PyModuleDef Cache by ericsnowcurrently · Pull Request #106974 · python/cpython · GitHub

Open Graph Title: gh-105699: Use a _Py_hashtable_t for the PyModuleDef Cache by ericsnowcurrently · Pull Request #106974 · python/cpython

X Title: gh-105699: Use a _Py_hashtable_t for the PyModuleDef Cache by ericsnowcurrently · Pull Request #106974 · python/cpython

Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.

Open Graph Description: This fixes a crasher due to a race condition, triggered infrequently when two isolated (own GIL) subinterpreters simultaneously initialize their sys or builtins modules. The crash happened due the...

X Description: This fixes a crasher due to a race condition, triggered infrequently when two isolated (own GIL) subinterpreters simultaneously initialize their sys or builtins modules. The crash happened due the...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:6b5c743c-413a-fcfc-0c51-12ac56f42478
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB6EA:2943C4:2FD5C6:4389D2:696A4C9F
html-safe-noncefd96a090ce934389117ff0bb2f998d103e1591ff94ad7c1283aee0d6f73f5326
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNkVBOjI5NDNDNDoyRkQ1QzY6NDM4OUQyOjY5NkE0QzlGIiwidmlzaXRvcl9pZCI6IjMwNDQ0MDYyNDAwMzc0NTcwNTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac3256a15dfbe4eed7a3bf2c3e27ad8a19dd1e863304731ab11864820bb044716b
hovercard-subject-tagpull_request:1445012911
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/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/106974/commits
twitter:imagehttps://opengraph.githubassets.com/dbdf670c8d24192c854797d560f31a32c110f2ef8b88d423c1366bb3836935f5/python/cpython/pull/106974
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/dbdf670c8d24192c854797d560f31a32c110f2ef8b88d423c1366bb3836935f5/python/cpython/pull/106974
og:image:altThis fixes a crasher due to a race condition, triggered infrequently when two isolated (own GIL) subinterpreters simultaneously initialize their sys or builtins modules. The crash happened due the...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameericsnowcurrently
hostnamegithub.com
expected-hostnamegithub.com
None3f871c8e07f0ae1886fa8dac284166d28b09ad5bada6476fc10b674e489788ef
turbo-cache-controlno-cache
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release63c426b30d262aba269ef14c40e3c817b384cd61
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/106974/commits#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F106974%2Fcommits
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%2F106974%2Fcommits
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%2Fcommits&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/106974/commits
Reloadhttps://github.com/python/cpython/pull/106974/commits
Reloadhttps://github.com/python/cpython/pull/106974/commits
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/106974/commits
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/106974/commits
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
ericsnowcurrentlyhttps://github.com/ericsnowcurrently
python:mainhttps://github.com/python/cpython/tree/main
ericsnowcurrently:fix-extensions-tstate-althttps://github.com/ericsnowcurrently/cpython/tree/fix-extensions-tstate-alt
Conversationhttps://github.com/python/cpython/pull/106974
Commits14 (14)https://github.com/python/cpython/pull/106974/commits
Checkshttps://github.com/python/cpython/pull/106974/checks
Files changedhttps://github.com/python/cpython/pull/106974/files
gh-105699: Use a _Py_hashtable_t for the PyModuleDef Cachehttps://github.com/python/cpython/pull/106974/commits#top
ericsnowcurrentlyhttps://github.com/ericsnowcurrently
python:mainhttps://github.com/python/cpython/tree/main
ericsnowcurrently:fix-extensions-tstate-althttps://github.com/ericsnowcurrently/cpython/tree/fix-extensions-tstate-alt
Add a comment.https://github.com/python/cpython/pull/106974/commits/33977774c6f8229eb098417da1d0f21a61357924
https://github.com/ericsnowcurrently
ericsnowcurrentlyhttps://github.com/python/cpython/commits?author=ericsnowcurrently
3397777https://github.com/python/cpython/pull/106974/commits/33977774c6f8229eb098417da1d0f21a61357924
https://github.com/python/cpython/tree/33977774c6f8229eb098417da1d0f21a61357924
Add a TODO.https://github.com/python/cpython/pull/106974/commits/670e632496b32dc638117e3a5d42df877aae0182
https://github.com/ericsnowcurrently
ericsnowcurrentlyhttps://github.com/python/cpython/commits?author=ericsnowcurrently
670e632https://github.com/python/cpython/pull/106974/commits/670e632496b32dc638117e3a5d42df877aae0182
https://github.com/python/cpython/tree/670e632496b32dc638117e3a5d42df877aae0182
Use a low-level hashtable instead of a dict.https://github.com/python/cpython/pull/106974/commits/485d130637503a207b0440a4f600a42fffb32042
https://github.com/ericsnowcurrently
ericsnowcurrentlyhttps://github.com/python/cpython/commits?author=ericsnowcurrently
485d130https://github.com/python/cpython/pull/106974/commits/485d130637503a207b0440a4f600a42fffb32042
https://github.com/python/cpython/tree/485d130637503a207b0440a4f600a42fffb32042
Drop _PyThreadState_*Detached().https://github.com/python/cpython/pull/106974/commits/77d5e8f298ae4dcfd5aa5e8cf7f6cd3f0254e8fc
https://github.com/ericsnowcurrently
ericsnowcurrentlyhttps://github.com/python/cpython/commits?author=ericsnowcurrently
77d5e8fhttps://github.com/python/cpython/pull/106974/commits/77d5e8f298ae4dcfd5aa5e8cf7f6cd3f0254e8fc
https://github.com/python/cpython/tree/77d5e8f298ae4dcfd5aa5e8cf7f6cd3f0254e8fc
Set "byname" properly for the reload case.https://github.com/python/cpython/pull/106974/commits/04a19c456b6b63aab9a1272d0ea08c66b6e46875
https://github.com/ericsnowcurrently
ericsnowcurrentlyhttps://github.com/python/cpython/commits?author=ericsnowcurrently
04a19c4https://github.com/python/cpython/pull/106974/commits/04a19c456b6b63aab9a1272d0ea08c66b6e46875
https://github.com/python/cpython/tree/04a19c456b6b63aab9a1272d0ea08c66b6e46875
Use a flat hashtable instead of a nested one.https://github.com/python/cpython/pull/106974/commits/5fde127bbd6fe6d332f45f91fc655ebd6289cea4
https://github.com/ericsnowcurrently
ericsnowcurrentlyhttps://github.com/python/cpython/commits?author=ericsnowcurrently
5fde127https://github.com/python/cpython/pull/106974/commits/5fde127bbd6fe6d332f45f91fc655ebd6289cea4
https://github.com/python/cpython/tree/5fde127bbd6fe6d332f45f91fc655ebd6289cea4
Merge branch 'main' into fix-extensions-tstate-althttps://github.com/python/cpython/pull/106974/commits/818d828ca7458fe2637f8000dc13c4d691366712
https://github.com/ericsnowcurrently
ericsnowcurrentlyhttps://github.com/python/cpython/commits?author=ericsnowcurrently
818d828https://github.com/python/cpython/pull/106974/commits/818d828ca7458fe2637f8000dc13c4d691366712
https://github.com/python/cpython/tree/818d828ca7458fe2637f8000dc13c4d691366712
Use the right allocator.https://github.com/python/cpython/pull/106974/commits/e83b0cccc1429b92091f6576349b33e13b6ec5bd
https://github.com/ericsnowcurrently
ericsnowcurrentlyhttps://github.com/python/cpython/commits?author=ericsnowcurrently
e83b0cchttps://github.com/python/cpython/pull/106974/commits/e83b0cccc1429b92091f6576349b33e13b6ec5bd
https://github.com/python/cpython/tree/e83b0cccc1429b92091f6576349b33e13b6ec5bd
Use PyUnicode_AsUTF8AndSize() (and fix the assert).https://github.com/python/cpython/pull/106974/commits/9e81cd5bcf45c147c05de6503d4339c1dde2692e
ericsnowcurrentlyhttps://github.com/python/cpython/commits?author=ericsnowcurrently
Yhg1shttps://github.com/python/cpython/commits?author=Yhg1s
9e81cd5https://github.com/python/cpython/pull/106974/commits/9e81cd5bcf45c147c05de6503d4339c1dde2692e
https://github.com/python/cpython/tree/9e81cd5bcf45c147c05de6503d4339c1dde2692e
Raise MemoryError where appropriate.https://github.com/python/cpython/pull/106974/commits/430716b1b27f5ead37fc6d765e68292d0f401cba
https://github.com/ericsnowcurrently
ericsnowcurrentlyhttps://github.com/python/cpython/commits?author=ericsnowcurrently
430716bhttps://github.com/python/cpython/pull/106974/commits/430716b1b27f5ead37fc6d765e68292d0f401cba
https://github.com/python/cpython/tree/430716b1b27f5ead37fc6d765e68292d0f401cba
Add a comment.https://github.com/python/cpython/pull/106974/commits/647fbc2c81dbd09b00aa39d489ead78580fdcf00
https://github.com/ericsnowcurrently
ericsnowcurrentlyhttps://github.com/python/cpython/commits?author=ericsnowcurrently
647fbc2https://github.com/python/cpython/pull/106974/commits/647fbc2c81dbd09b00aa39d489ead78580fdcf00
https://github.com/python/cpython/tree/647fbc2c81dbd09b00aa39d489ead78580fdcf00
Use a constant for the cache separator character.https://github.com/python/cpython/pull/106974/commits/bbe5eda9b7f833ac487f05591798295601bcd966
https://github.com/ericsnowcurrently
ericsnowcurrentlyhttps://github.com/python/cpython/commits?author=ericsnowcurrently
bbe5edahttps://github.com/python/cpython/pull/106974/commits/bbe5eda9b7f833ac487f05591798295601bcd966
https://github.com/python/cpython/tree/bbe5eda9b7f833ac487f05591798295601bcd966
Decref when clearing the hashtable.https://github.com/python/cpython/pull/106974/commits/1d7cbd00cc85c154567f4718fd965b981944a5b3
https://github.com/ericsnowcurrently
ericsnowcurrentlyhttps://github.com/python/cpython/commits?author=ericsnowcurrently
1d7cbd0https://github.com/python/cpython/pull/106974/commits/1d7cbd00cc85c154567f4718fd965b981944a5b3
https://github.com/python/cpython/tree/1d7cbd00cc85c154567f4718fd965b981944a5b3
Make the cached module defs immortal.https://github.com/python/cpython/pull/106974/commits/20c8b9d9415c81a65bd292c2474b050e531e1dc9
https://github.com/ericsnowcurrently
ericsnowcurrentlyhttps://github.com/python/cpython/commits?author=ericsnowcurrently
20c8b9dhttps://github.com/python/cpython/pull/106974/commits/20c8b9d9415c81a65bd292c2474b050e531e1dc9
https://github.com/python/cpython/tree/20c8b9d9415c81a65bd292c2474b050e531e1dc9
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.