René's URL Explorer Experiment


Title: gh-148587: Make `sys.lazy_modules` immutable by johnslavik · Pull Request #149408 · python/cpython · GitHub

Open Graph Title: gh-148587: Make `sys.lazy_modules` immutable by johnslavik · Pull Request #149408 · python/cpython

X Title: gh-148587: Make `sys.lazy_modules` immutable by johnslavik · Pull Request #149408 · python/cpython

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

Open Graph Description: Feel free to chime in with criticism. I'm not sure this is it yet, but take it in your own hands if you want. Issue: Revamp sys.lazy_modules #148587

X Description: Feel free to chime in with criticism. I'm not sure this is it yet, but take it in your own hands if you want. Issue: Revamp sys.lazy_modules #148587

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:db78ab52-add9-98ad-4724-76e1c9b8f6c6
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA928:33E8D:165271D:20708C7:6A562441
html-safe-noncef2268b10893b45ef690762965292856399c1607eb91235d281a18b24d8517500
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTI4OjMzRThEOjE2NTI3MUQ6MjA3MDhDNzo2QTU2MjQ0MSIsInZpc2l0b3JfaWQiOiI2NTE3NDc2MjY2NjEwNjE2OTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmace2b7a5d52c0884ca61915977f332474b4128ff0c495e294342a8d5c93f15d2d7
hovercard-subject-tagpull_request:3630141928
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/149408/commits
twitter:imagehttps://opengraph.githubassets.com/afaac267e6b79903757020fe5694d05439ef4048994cd15b401361c5fb63bd97/python/cpython/pull/149408
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/afaac267e6b79903757020fe5694d05439ef4048994cd15b401361c5fb63bd97/python/cpython/pull/149408
og:image:altFeel free to chime in with criticism. I'm not sure this is it yet, but take it in your own hands if you want. Issue: Revamp sys.lazy_modules #148587
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejohnslavik
hostnamegithub.com
expected-hostnamegithub.com
Noneeeb71977be324ce2bc7c4afd597296b8e3527d8922ad94632edd7a7296f8031b
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
release3e7957744c8a44d05ff1e464dc5d119e60b98fae
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/149408/commits#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F149408%2Fcommits
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
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
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
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/enterprise/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%2F149408%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/149408/commits
Reloadhttps://github.com/python/cpython/pull/149408/commits
Reloadhttps://github.com/python/cpython/pull/149408/commits
Please reload this pagehttps://github.com/python/cpython/pull/149408/commits
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/149408/commits
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.8k 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.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
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 and quality https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
johnslavikhttps://github.com/johnslavik
python:mainhttps://github.com/python/cpython/tree/main
johnslavik:gh-148587-revamp-sys-lazy-moduleshttps://github.com/johnslavik/cpython/tree/gh-148587-revamp-sys-lazy-modules
Conversationhttps://github.com/python/cpython/pull/149408
Commits14 (14)https://github.com/python/cpython/pull/149408/commits
Checkshttps://github.com/python/cpython/pull/149408/checks
Files changedhttps://github.com/python/cpython/pull/149408/files
gh-148587: Make sys.lazy_modules immutablehttps://github.com/python/cpython/pull/149408/commits#top
johnslavikhttps://github.com/johnslavik
python:mainhttps://github.com/python/cpython/tree/main
johnslavik:gh-148587-revamp-sys-lazy-moduleshttps://github.com/johnslavik/cpython/tree/gh-148587-revamp-sys-lazy-modules
gh-148587: Make sys.lazy_modules an immutable frozendict snapshothttps://github.com/python/cpython/pull/149408/commits/351473b6a188a71acd0524b00f19bb2577e6b1c1
https://github.com/johnslavik
johnslavikhttps://github.com/python/cpython/commits?author=johnslavik
351473bhttps://github.com/python/cpython/pull/149408/commits/351473b6a188a71acd0524b00f19bb2577e6b1c1
https://github.com/python/cpython/tree/351473b6a188a71acd0524b00f19bb2577e6b1c1
gh-148587: Expose live lazy import registry as sys._lazy_moduleshttps://github.com/python/cpython/pull/149408/commits/083bbe99cf66881ca407bdf5e81b4f4c569e2521
https://github.com/johnslavik
johnslavikhttps://github.com/python/cpython/commits?author=johnslavik
083bbe9https://github.com/python/cpython/pull/149408/commits/083bbe99cf66881ca407bdf5e81b4f4c569e2521
https://github.com/python/cpython/tree/083bbe99cf66881ca407bdf5e81b4f4c569e2521
gh-148587: Address review feedback on sys.lazy_moduleshttps://github.com/python/cpython/pull/149408/commits/eac60ede1e87f8eab8008a2a79a1e7e00a256bfb
https://github.com/johnslavik
johnslavikhttps://github.com/python/cpython/commits?author=johnslavik
eac60edhttps://github.com/python/cpython/pull/149408/commits/eac60ede1e87f8eab8008a2a79a1e7e00a256bfb
https://github.com/python/cpython/tree/eac60ede1e87f8eab8008a2a79a1e7e00a256bfb
gh-148587: Trim sys.lazy_modules contract test and NEWShttps://github.com/python/cpython/pull/149408/commits/0424a64806a0eb2c2ed31a85d7faf204dd4c6401
https://github.com/johnslavik
johnslavikhttps://github.com/python/cpython/commits?author=johnslavik
0424a64https://github.com/python/cpython/pull/149408/commits/0424a64806a0eb2c2ed31a85d7faf204dd4c6401
https://github.com/python/cpython/tree/0424a64806a0eb2c2ed31a85d7faf204dd4c6401
gh-148587: Align sys.__getattr__ with _ctypes/zlib patternhttps://github.com/python/cpython/pull/149408/commits/44049725abc3360b01a42f391dad5161ef317312
https://github.com/johnslavik
johnslavikhttps://github.com/python/cpython/commits?author=johnslavik
4404972https://github.com/python/cpython/pull/149408/commits/44049725abc3360b01a42f391dad5161ef317312
https://github.com/python/cpython/tree/44049725abc3360b01a42f391dad5161ef317312
gh-148587: Use METH_VARARGS for sys.__getattr__https://github.com/python/cpython/pull/149408/commits/f4f8fb2a47c07af69f7d8c724e55cb7a741c0f1a
https://github.com/johnslavik
johnslavikhttps://github.com/python/cpython/commits?author=johnslavik
f4f8fb2https://github.com/python/cpython/pull/149408/commits/f4f8fb2a47c07af69f7d8c724e55cb7a741c0f1a
https://github.com/python/cpython/tree/f4f8fb2a47c07af69f7d8c724e55cb7a741c0f1a
gh-148587: Pre-size and short-circuit empty in lazy modules snapshothttps://github.com/python/cpython/pull/149408/commits/a94f4e7a6672819948c173088688b17859ccf127
https://github.com/johnslavik
johnslavikhttps://github.com/python/cpython/commits?author=johnslavik
a94f4e7https://github.com/python/cpython/pull/149408/commits/a94f4e7a6672819948c173088688b17859ccf127
https://github.com/python/cpython/tree/a94f4e7a6672819948c173088688b17859ccf127
Revert pre-size and empty fast path in lazy modules snapshothttps://github.com/python/cpython/pull/149408/commits/926a02eecdd6e9a8d2c7d92641e3a02fbe738121
https://github.com/johnslavik
johnslavikhttps://github.com/python/cpython/commits?author=johnslavik
926a02ehttps://github.com/python/cpython/pull/149408/commits/926a02eecdd6e9a8d2c7d92641e3a02fbe738121
https://github.com/python/cpython/tree/926a02eecdd6e9a8d2c7d92641e3a02fbe738121
Add docstring to sys.__getattr__https://github.com/python/cpython/pull/149408/commits/ca32d07bedc36ebb269f473fff119ce0cd34937b
https://github.com/johnslavik
johnslavikhttps://github.com/python/cpython/commits?author=johnslavik
ca32d07https://github.com/python/cpython/pull/149408/commits/ca32d07bedc36ebb269f473fff119ce0cd34937b
https://github.com/python/cpython/tree/ca32d07bedc36ebb269f473fff119ce0cd34937b
Add sys.__dir__ so lazy_modules appears in tab completionhttps://github.com/python/cpython/pull/149408/commits/3dff9ef08fa8da73080233945f573e8951e36ed9
https://github.com/johnslavik
johnslavikhttps://github.com/python/cpython/commits?author=johnslavik
3dff9efhttps://github.com/python/cpython/pull/149408/commits/3dff9ef08fa8da73080233945f573e8951e36ed9
https://github.com/python/cpython/tree/3dff9ef08fa8da73080233945f573e8951e36ed9
Fix METH_NOARGS signature and wrap long line in sys_dir/sys_getattrhttps://github.com/python/cpython/pull/149408/commits/2c0e3f2d8e89c28c7334d7ed493ec841cc55a4e1
https://github.com/johnslavik
johnslavikhttps://github.com/python/cpython/commits?author=johnslavik
2c0e3f2https://github.com/python/cpython/pull/149408/commits/2c0e3f2d8e89c28c7334d7ed493ec841cc55a4e1
https://github.com/python/cpython/tree/2c0e3f2d8e89c28c7334d7ed493ec841cc55a4e1
Add sys.lazy_modules docs and fix CI test failureshttps://github.com/python/cpython/pull/149408/commits/17de69ef42653eb42c32f82f818affa1f6bda1cd
https://github.com/johnslavik
johnslavikhttps://github.com/python/cpython/commits?author=johnslavik
17de69ehttps://github.com/python/cpython/pull/149408/commits/17de69ef42653eb42c32f82f818affa1f6bda1cd
https://github.com/python/cpython/tree/17de69ef42653eb42c32f82f818affa1f6bda1cd
Remove internal _lazy_modules mention and bogus set_lazy_imports cross-ref from docshttps://github.com/python/cpython/pull/149408/commits/46c6033a5eb6efb6944671a9fe6f759685ecac7c
https://github.com/johnslavik
johnslavikhttps://github.com/python/cpython/commits?author=johnslavik
46c6033https://github.com/python/cpython/pull/149408/commits/46c6033a5eb6efb6944671a9fe6f759685ecac7c
https://github.com/python/cpython/tree/46c6033a5eb6efb6944671a9fe6f759685ecac7c
Fix test_sys_module_has_signatures: METH_NOARGS never has None text signaturehttps://github.com/python/cpython/pull/149408/commits/e4bbea82f46adf4ac426c1f400bfb45f948a15f4
https://github.com/johnslavik
johnslavikhttps://github.com/python/cpython/commits?author=johnslavik
e4bbea8https://github.com/python/cpython/pull/149408/commits/e4bbea82f46adf4ac426c1f400bfb45f948a15f4
https://github.com/python/cpython/tree/e4bbea82f46adf4ac426c1f400bfb45f948a15f4
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.