]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-150886: Remove unused importlib._bootstrap._object_name (#150884)
authorBernát Gábor <gaborjbernat@gmail.com>
Thu, 4 Jun 2026 20:08:58 +0000 (13:08 -0700)
committerGitHub <noreply@github.com>
Thu, 4 Jun 2026 20:08:58 +0000 (20:08 +0000)
commitf906522a4e1f4565ae7a449d3556dc8f70591b20
tree75ca9edabd8cc734427fbabb527233bdeac2f7a1
parentd4a8066c82a9b71c26d98c285db233fe2ef07517
gh-150886: Remove unused importlib._bootstrap._object_name (#150884)

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.
Lib/importlib/_bootstrap.py
Misc/NEWS.d/next/Library/2026-06-03-21-59-11.gh-issue-150886.r2c25g.rst [new file with mode: 0644]