GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GH-97850: Remove all uses and definitions of `load_module()` from importlib by brettcannon · Pull Request #142205 · python/cpython

Conversation

@brettcannon

@brettcannon brettcannon commented Dec 2, 2025 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Issue: Meta issue for cleaning up import system cruft #97850

📚 Documentation preview 📚: https://cpython-previews--142205.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@brettcannon
pythonGH-97850: Remove all uses and definitions of load_module() fr…
d39b42d
…om importlib
@brettcannon brettcannon self-assigned this Dec 2, 2025
@brettcannon
brettcannon requested review from ericsnowcurrently, ncoghlan and warsaw as code owners December 2, 2025 23:40
@bedevere-app bedevere-app Bot mentioned this pull request Dec 2, 2025
Meta issue for cleaning up import system cruft #97850
Open
25 of 31 tasks
@bedevere-app bedevere-app Bot added the awaiting core review label Dec 2, 2025
brettcannon added 2 commits December 2, 2025 15:45
@brettcannon
Make the docs build happy
d70a7fb
@brettcannon
Remove references to load_module() from What's New
e256f38
@brettcannon
brettcannon requested a review from AA-Turner as a code owner December 2, 2025 23:58
brettcannon added 2 commits December 2, 2025 16:03
@brettcannon
Try to make the docs build happy
845c868
@brettcannon
Merge branch 'main' into remove-load_module
ed166d8
brettcannon
brettcannon commented Dec 9, 2025
View reviewed changes
Comment thread Doc/library/importlib.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@brettcannon
Update Doc/library/importlib.rst
b7def8f
brettcannon
brettcannon commented Dec 9, 2025
View reviewed changes
Comment thread Doc/library/importlib.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

brettcannon added 3 commits December 9, 2025 11:24
@brettcannon
Update Doc/library/importlib.rst
2d571cc
@brettcannon
Simplify import handling by removing namespace package logic
0dd7fd8
Remove handling for namespace packages in import.
@brettcannon
Merge branch 'main' into remove-load_module
b57d28e
@brettcannon
brettcannon merged commit 880a790 into python:main Dec 10, 2025
46 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@brettcannon
brettcannon deleted the remove-load_module branch December 10, 2025 23:35
@bedevere-app bedevere-app Bot removed the awaiting core review label Dec 10, 2025
@gaborbernat gaborbernat mentioned this pull request Jun 3, 2026
Remove private stdlib helpers orphaned by past removals #150882
Closed
gaborbernat added a commit to gaborbernat/cpython that referenced this pull request Jun 3, 2026
@gaborbernat
pythongh-150882: Remove unused importlib._bootstrap._object_name
ab23622
Introduced in pythonGH-23469 (bpo-26131, "Deprecate usage of load_module()")
to render an object's qualified name inside the load_module()
deprecation warnings.

Orphaned by pythongh-142205 (pythonGH-97850, "Remove all uses and definitions of
load_module() from importlib"), which deleted the warning-building call
sites f"{_object_name(spec.loader)}.exec_module() not found; ..." and
left the helper with no caller.

A word-boundary search across Lib, Modules, Python, Objects and Include
finds zero references outside its own definition, and a GitHub code
search finds no downstream importers. The frozen importlib was
regenerated; importlib._bootstrap._object_name no longer exists at
runtime and the full test_importlib suite passes.
This was referenced Jun 3, 2026
gh-150886: Remove unused importlib._bootstrap._object_name #150884
Merged
Remove unused private function importlib._bootstrap._object_name #150886
Closed
gaborbernat added a commit to gaborbernat/cpython that referenced this pull request Jun 3, 2026
@gaborbernat
pythongh-150886: Remove unused importlib._bootstrap._object_name
9ca2291
Introduced in pythonGH-23469 (bpo-26131, "Deprecate usage of load_module()")
to render an object's qualified name inside the load_module()
deprecation warnings.

Orphaned by pythongh-142205 (pythonGH-97850, "Remove all uses and definitions of
load_module() from importlib"), which deleted the warning-building call
sites f"{_object_name(spec.loader)}.exec_module() not found; ..." and
left the helper with no caller.

A word-boundary search across Lib, Modules, Python, Objects and Include
finds zero references outside its own definition, and a GitHub code
search finds no downstream importers. The frozen importlib was
regenerated; importlib._bootstrap._object_name no longer exists at
runtime and the full test_importlib suite passes.
brettcannon pushed a commit that referenced this pull request Jun 4, 2026
@gaborbernat
gh-150886: Remove unused importlib._bootstrap._object_name (#150884)
f906522
Introduced in GH-23469 (bpo-26131, "Deprecate usage of load_module()")
to render an object's qualified name inside the load_module()
deprecation warnings.

Orphaned by gh-142205 (GH-97850, "Remove all uses and definitions of
load_module() from importlib"), which deleted the warning-building call
sites f"{_object_name(spec.loader)}.exec_module() not found; ..." and
left the helper with no caller.

A word-boundary search across Lib, Modules, Python, Objects and Include
finds zero references outside its own definition, and a GitHub code
search finds no downstream importers. The frozen importlib was
regenerated; importlib._bootstrap._object_name no longer exists at
runtime and the full test_importlib suite passes.
philthompson10 pushed a commit to philthompson10/cpython that referenced this pull request Jun 17, 2026
@gaborbernat @philthompson10
pythongh-150886: Remove unused importlib._bootstrap._object_name (pyt…
f484684
…hon#150884)

Introduced in pythonGH-23469 (bpo-26131, "Deprecate usage of load_module()")
to render an object's qualified name inside the load_module()
deprecation warnings.

Orphaned by pythongh-142205 (pythonGH-97850, "Remove all uses and definitions of
load_module() from importlib"), which deleted the warning-building call
sites f"{_object_name(spec.loader)}.exec_module() not found; ..." and
left the helper with no caller.

A word-boundary search across Lib, Modules, Python, Objects and Include
finds zero references outside its own definition, and a GitHub code
search finds no downstream importers. The frozen importlib was
regenerated; importlib._bootstrap._object_name no longer exists at
runtime and the full test_importlib suite passes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner
@ncoghlan ncoghlan Awaiting requested review from ncoghlan ncoghlan is a code owner
@warsaw warsaw Awaiting requested review from warsaw warsaw is a code owner
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@brettcannon brettcannon

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@brettcannon
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.