Uh oh!
There was an error while loading. Please reload this page.
GH-97850: Remove all uses and definitions of load_module() from importlib - #142205
Merged
Conversation
brettcannon
requested review from
ericsnowcurrently, ncoghlan and warsaw
as code ownersDecember 2, 2025 23:40
31 tasks
brettcannon
commented
Dec 9, 2025
Uh oh!
There was an error while loading. Please reload this page.
brettcannon
commented
Dec 9, 2025
Uh oh!
There was an error while loading. Please reload this page.
Remove handling for namespace packages in import.
Uh oh!
There was an error while loading. Please reload this page.
gaborbernat added a commit
to gaborbernat/cpython
that referenced
this pull request
Jun 3, 2026
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
gaborbernat added a commit
to gaborbernat/cpython
that referenced
this pull request
Jun 3, 2026
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
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
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📚 Documentation preview 📚: https://cpython-previews--142205.org.readthedocs.build/