]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-97850: Suppress cross-references to the removed ``module_repr`` method (#104133)
authorAdam Turner <9087854+AA-Turner@users.noreply.github.com>
Wed, 3 May 2023 12:57:23 +0000 (13:57 +0100)
committerGitHub <noreply@github.com>
Wed, 3 May 2023 12:57:23 +0000 (13:57 +0100)
Suppress cross-references to ``module_repr``

Doc/reference/import.rst
Doc/whatsnew/3.10.rst
Doc/whatsnew/3.11.rst
Doc/whatsnew/3.12.rst
Doc/whatsnew/3.4.rst

index 8f30181ae0a10d9c931916bcba936c34fe59290d..0f416a5c583f8593fc47d04fa95b177e1b5fa48d 100644 (file)
@@ -706,7 +706,7 @@ Here are the exact rules used:
  * Otherwise, just use the module's ``__name__`` in the repr.
 
 .. versionchanged:: 3.12
-   Use of :meth:`module_repr`, having been deprecated since Python 3.4, was
+   Use of :meth:`!module_repr`, having been deprecated since Python 3.4, was
    removed in Python 3.12 and is no longer called during the resolution of a
    module's repr.
 
index 3d7bcf8969447756ffe9b0335133ac775dcf61a1..f689930ff0caca4be8497f738130a607f08a23c4 100644 (file)
@@ -1612,7 +1612,7 @@ Deprecated
   (superseded by :meth:`~importlib.abc.Finder.find_spec`),
   :meth:`~importlib.abc.Loader.load_module`
   (superseded by :meth:`~importlib.abc.Loader.exec_module`),
-  :meth:`~importlib.abc.Loader.module_repr` (which the import system
+  :meth:`!module_repr` (which the import system
   takes care of for you), the ``__package__`` attribute
   (superseded by ``__spec__.parent``), the ``__loader__`` attribute
   (superseded by ``__spec__.loader``), and the ``__cached__`` attribute
@@ -1693,14 +1693,14 @@ Deprecated
   (Contributed by Brett Cannon in :issue:`43720`.)
 
 * The import system now uses the ``__spec__`` attribute on modules before
-  falling back on :meth:`~importlib.abc.Loader.module_repr` for a module's
+  falling back on :meth:`!module_repr` for a module's
   ``__repr__()`` method. Removal of the use of ``module_repr()`` is scheduled
   for Python 3.12.
   (Contributed by Brett Cannon in :issue:`42137`.)
 
-* :meth:`importlib.abc.Loader.module_repr`,
-  :meth:`importlib.machinery.FrozenLoader.module_repr`, and
-  :meth:`importlib.machinery.BuiltinLoader.module_repr` are deprecated and
+* :meth:`!importlib.abc.Loader.module_repr`,
+  :meth:`!importlib.machinery.FrozenLoader.module_repr`, and
+  :meth:`!importlib.machinery.BuiltinLoader.module_repr` are deprecated and
   slated for removal in Python 3.12.
   (Contributed by Brett Cannon in :issue:`42136`.)
 
index 6df30ad6c19c2c7fc6f26d1c0fdb20c2a26383c8..7d3639f67952f6ef18425e091673fec70915c657 100644 (file)
@@ -1877,7 +1877,7 @@ C APIs pending removal are
 * The :class:`typing.re <typing.Pattern>` namespace
 * :func:`!cgi.log`
 * :func:`!importlib.find_loader`
-* :meth:`importlib.abc.Loader.module_repr`
+* :meth:`!importlib.abc.Loader.module_repr`
 * :meth:`!importlib.abc.MetaPathFinder.find_module`
 * :meth:`!importlib.abc.PathEntryFinder.find_loader`
 * :meth:`!importlib.abc.PathEntryFinder.find_module`
index 4ed08f3ca3b3d37d61c61eac9a609c5a43417938..3381ce7b6b0d563e607b0d7bf2279f402301b660 100644 (file)
@@ -983,7 +983,7 @@ Removed
 * Many previously deprecated cleanups in :mod:`importlib` have now been
   completed:
 
-  * References to, and support for ``module_repr()`` has been removed.
+  * References to, and support for :meth:`!module_repr()` has been removed.
     (Contributed by Barry Warsaw in :gh:`97850`.)
 
   * ``importlib.util.set_package`` has been removed. (Contributed by Brett
index dabfdaa230ff084d44da5e6da3c5d540429b3e9c..38f9449b9afe3a27a347b75ead74d127b6ebec54 100644 (file)
@@ -2096,7 +2096,7 @@ Deprecations in the Python API
   :meth:`importlib.abc.InspectLoader.exec_module`
   :meth:`importlib.abc.SourceLoader.exec_module`) and let the import system
   take care of the rest; and
-  :meth:`importlib.abc.Loader.module_repr`,
+  :meth:`!importlib.abc.Loader.module_repr`,
   :meth:`importlib.util.module_for_loader`, :meth:`importlib.util.set_loader`,
   and :meth:`importlib.util.set_package` are no longer needed because their
   functions are now handled automatically by the import system.