Skip to content

Commit 8b03e5f

Browse files
authored
GH-97850: Suppress cross-references to the removed module_repr method (#104133)
Suppress cross-references to ``module_repr``
1 parent 328435e commit 8b03e5f

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

Doc/reference/import.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ Here are the exact rules used:
706706
* Otherwise, just use the module's ``__name__`` in the repr.
707707

708708
.. versionchanged:: 3.12
709-
Use of :meth:`module_repr`, having been deprecated since Python 3.4, was
709+
Use of :meth:`!module_repr`, having been deprecated since Python 3.4, was
710710
removed in Python 3.12 and is no longer called during the resolution of a
711711
module's repr.
712712

Doc/whatsnew/3.10.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,7 +1612,7 @@ Deprecated
16121612
(superseded by :meth:`~importlib.abc.Finder.find_spec`),
16131613
:meth:`~importlib.abc.Loader.load_module`
16141614
(superseded by :meth:`~importlib.abc.Loader.exec_module`),
1615-
:meth:`~importlib.abc.Loader.module_repr` (which the import system
1615+
:meth:`!module_repr` (which the import system
16161616
takes care of for you), the ``__package__`` attribute
16171617
(superseded by ``__spec__.parent``), the ``__loader__`` attribute
16181618
(superseded by ``__spec__.loader``), and the ``__cached__`` attribute
@@ -1693,14 +1693,14 @@ Deprecated
16931693
(Contributed by Brett Cannon in :issue:`43720`.)
16941694
16951695
* The import system now uses the ``__spec__`` attribute on modules before
1696-
falling back on :meth:`~importlib.abc.Loader.module_repr` for a module's
1696+
falling back on :meth:`!module_repr` for a module's
16971697
``__repr__()`` method. Removal of the use of ``module_repr()`` is scheduled
16981698
for Python 3.12.
16991699
(Contributed by Brett Cannon in :issue:`42137`.)
17001700
1701-
* :meth:`importlib.abc.Loader.module_repr`,
1702-
:meth:`importlib.machinery.FrozenLoader.module_repr`, and
1703-
:meth:`importlib.machinery.BuiltinLoader.module_repr` are deprecated and
1701+
* :meth:`!importlib.abc.Loader.module_repr`,
1702+
:meth:`!importlib.machinery.FrozenLoader.module_repr`, and
1703+
:meth:`!importlib.machinery.BuiltinLoader.module_repr` are deprecated and
17041704
slated for removal in Python 3.12.
17051705
(Contributed by Brett Cannon in :issue:`42136`.)
17061706

Doc/whatsnew/3.11.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1877,7 +1877,7 @@ C APIs pending removal are
18771877
* The :class:`typing.re <typing.Pattern>` namespace
18781878
* :func:`!cgi.log`
18791879
* :func:`!importlib.find_loader`
1880-
* :meth:`importlib.abc.Loader.module_repr`
1880+
* :meth:`!importlib.abc.Loader.module_repr`
18811881
* :meth:`!importlib.abc.MetaPathFinder.find_module`
18821882
* :meth:`!importlib.abc.PathEntryFinder.find_loader`
18831883
* :meth:`!importlib.abc.PathEntryFinder.find_module`

Doc/whatsnew/3.12.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ Removed
983983
* Many previously deprecated cleanups in :mod:`importlib` have now been
984984
completed:
985985

986-
* References to, and support for ``module_repr()`` has been removed.
986+
* References to, and support for :meth:`!module_repr()` has been removed.
987987
(Contributed by Barry Warsaw in :gh:`97850`.)
988988

989989
* ``importlib.util.set_package`` has been removed. (Contributed by Brett

Doc/whatsnew/3.4.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2096,7 +2096,7 @@ Deprecations in the Python API
20962096
:meth:`importlib.abc.InspectLoader.exec_module`
20972097
:meth:`importlib.abc.SourceLoader.exec_module`) and let the import system
20982098
take care of the rest; and
2099-
:meth:`importlib.abc.Loader.module_repr`,
2099+
:meth:`!importlib.abc.Loader.module_repr`,
21002100
:meth:`importlib.util.module_for_loader`, :meth:`importlib.util.set_loader`,
21012101
and :meth:`importlib.util.set_package` are no longer needed because their
21022102
functions are now handled automatically by the import system.

0 commit comments

Comments
 (0)