René's URL Explorer Experiment


Title: gh-151408: Re-register submodules in sys.modules on lazy re-import by bhuvi27 · Pull Request #151411 · python/cpython · GitHub

Open Graph Title: gh-151408: Re-register submodules in sys.modules on lazy re-import by bhuvi27 · Pull Request #151411 · python/cpython

X Title: gh-151408: Re-register submodules in sys.modules on lazy re-import by bhuvi27 · Pull Request #151411 · python/cpython

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

Open Graph Description: Fixes #151408 Deleting a submodule from sys.modules and then re-resolving it via lazy import returned the module object still cached on the parent package but did not put it back in sys.modules. Re...

X Description: Fixes #151408 Deleting a submodule from sys.modules and then re-resolving it via lazy import returned the module object still cached on the parent package but did not put it back in sys.modules. Re...

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

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:0b90c797-f9c0-599b-1a0c-ccf82b2a241b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB34E:B53AF:378943E:49E0289:6B02108A
html-safe-noncef4b0d39dfccde1da960db48828a393be3f64886d6c14be65a49928bb4998f145
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMzRFOkI1M0FGOjM3ODk0M0U6NDlFMDI4OTo2QjAyMTA4QSIsInZpc2l0b3JfaWQiOiIzNzcxNzEzMjYxNzc5Njg1NTE0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacb854ecd8b0e8cf7a67fefca91b5772480fb65837af9a384d4b902ec2df33b4e2
hovercard-subject-tagpull_request:3855838714
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///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/cpython/151411/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/4a636ea7e0d3434c32b5589afb0fd353d8f26cb6993da7c449ca935cfb6203f0/python/cpython/pull/151411
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4a636ea7e0d3434c32b5589afb0fd353d8f26cb6993da7c449ca935cfb6203f0/python/cpython/pull/151411
og:image:altFixes #151408 Deleting a submodule from sys.modules and then re-resolving it via lazy import returned the module object still cached on the parent package but did not put it back in sys.modules. Re...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebhuvi27
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
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
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/python/cpython/pull/151411#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F151411
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F151411
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/151411
Reloadhttps://github.com/python/cpython/pull/151411
Reloadhttps://github.com/python/cpython/pull/151411
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
https://github.com/python/cpython
bhuvi27https://github.com/bhuvi27
python:mainhttps://github.com/python/cpython/tree/main
bhuvi27:gh-151408-fix-lazy-reimporthttps://github.com/bhuvi27/cpython/tree/gh-151408-fix-lazy-reimport
Conversationhttps://github.com/python/cpython/pull/151411
Commits1 (1)https://github.com/python/cpython/pull/151411/commits
Checkshttps://github.com/python/cpython/pull/151411/checks
Files changedhttps://github.com/python/cpython/pull/151411/files
gh-151408: Re-register submodules in sys.modules on lazy re-importhttps://github.com/python/cpython/pull/151411#top
bhuvi27https://github.com/bhuvi27
python:mainhttps://github.com/python/cpython/tree/main
bhuvi27:gh-151408-fix-lazy-reimporthttps://github.com/bhuvi27/cpython/tree/gh-151408-fix-lazy-reimport
https://github.com/bhuvi27
bhuvi27https://github.com/bhuvi27
Jun 12, 2026https://github.com/python/cpython/pull/151411#issue-4650613686
Please reload this pagehttps://github.com/python/cpython/pull/151411
#151408https://github.com/python/cpython/issues/151408
When re-importing a submodule lazily after removing it, it's never added back to sys.modules. #151408https://github.com/python/cpython/issues/151408
Please reload this pagehttps://github.com/python/cpython/pull/151411
https://github.com/bhuvi27
pythongh-151408https://github.com/python/cpython/issues/151408
: Re-register submodules in sys.modules on lazy re-importhttps://github.com/python/cpython/pull/151411/commits/b347b1b897451e9b4643922fe993c0577980ea62
b347b1bhttps://github.com/python/cpython/pull/151411/commits/b347b1b897451e9b4643922fe993c0577980ea62
https://github.com/bhuvi27
bhuvi27https://github.com/bhuvi27
DinoVhttps://github.com/DinoV
FFY00https://github.com/FFY00
Yhg1shttps://github.com/Yhg1s
brettcannonhttps://github.com/brettcannon
ericsnowcurrentlyhttps://github.com/ericsnowcurrently
kumaraditya303https://github.com/kumaraditya303
markshannonhttps://github.com/markshannon
ncoghlanhttps://github.com/ncoghlan
pablogsalhttps://github.com/pablogsal
warsawhttps://github.com/warsaw
code ownershttps://github.com/python/cpython/blob/d986124d83465190987357f987ee24bd7a817cac/.github/CODEOWNERS#L302
June 12, 2026 15:46https://github.com/python/cpython/pull/151411#event-26683031671
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20review%22
Jun 12, 2026https://github.com/python/cpython/pull/151411#event-26683033693
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Jun 12, 2026 https://github.com/python/cpython/pull/151411#ref-issue-4650440875
When re-importing a submodule lazily after removing it, it's never added back to sys.modules. #151408 https://github.com/python/cpython/issues/151408
https://github.com/brettcannon
brettcannonhttps://github.com/brettcannon
June 12, 2026 17:09https://github.com/python/cpython/pull/151411#event-26686321110
https://github.com/ZeroIntensity
ZeroIntensityhttps://github.com/ZeroIntensity
Jun 12, 2026https://github.com/python/cpython/pull/151411#issuecomment-4694493668
#151412https://github.com/python/cpython/pull/151412
Please reload this pagehttps://github.com/python/cpython/pull/151411
https://github.com/ZeroIntensity
ZeroIntensityhttps://github.com/ZeroIntensity
Jun 12, 2026https://github.com/python/cpython/pull/151411#event-26690816039
https://github.co/hiddenchars
https://github.com/python/cpython/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F151411
https://github.com/Yhg1s
Yhg1s https://github.com/Yhg1s
https://github.com/DinoV
DinoV https://github.com/DinoV
https://github.com/pablogsal
pablogsal https://github.com/pablogsal
https://github.com/ericsnowcurrently
ericsnowcurrently https://github.com/ericsnowcurrently
https://github.com/ncoghlan
ncoghlan https://github.com/ncoghlan
https://github.com/warsaw
warsaw https://github.com/warsaw
https://github.com/FFY00
FFY00 https://github.com/FFY00
https://github.com/kumaraditya303
kumaraditya303 https://github.com/kumaraditya303
https://github.com/markshannon
markshannon https://github.com/markshannon
Please reload this pagehttps://github.com/python/cpython/pull/151411
awaiting review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20review%22
When re-importing a submodule lazily after removing it, it's never added back to sys.modules. https://github.com/python/cpython/issues/151408
Please reload this pagehttps://github.com/python/cpython/pull/151411
https://github.com/bhuvi27
https://github.com/ZeroIntensity
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.