Skip to content

Commit c41910d

Browse files
[3.13] gh-151950: Fix Sphinx reference warnings in Doc/library/importlib.rst (GH-157610) (#157701)
gh-151950: Fix Sphinx reference warnings in `Doc/library/importlib.rst` (GH-157610) (cherry picked from commit a9e7895) Co-authored-by: Jade <[email protected]>
1 parent bfbd499 commit c41910d

2 files changed

Lines changed: 13 additions & 10 deletions

File tree

Doc/library/importlib.rst

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,11 @@ ABC hierarchy::
310310
See :pep:`302` for the exact definition for a loader.
311311

312312
Loaders that wish to support resource reading should implement a
313-
:meth:`get_resource_reader` method as specified by
313+
:meth:`!get_resource_reader` method as specified by
314314
:class:`importlib.resources.abc.ResourceReader`.
315315

316316
.. versionchanged:: 3.7
317-
Introduced the optional :meth:`get_resource_reader` method.
317+
Introduced the optional :meth:`!get_resource_reader` method.
318318

319319
.. method:: create_module(spec)
320320

@@ -881,7 +881,8 @@ find and load modules.
881881

882882
.. versionchanged:: 3.5
883883
As part of :pep:`489`, the builtin importer now implements
884-
:meth:`Loader.create_module` and :meth:`Loader.exec_module`
884+
:meth:`Loader.create_module <importlib.abc.Loader.create_module>`
885+
and :meth:`Loader.exec_module <importlib.abc.Loader.exec_module>`
885886

886887

887888
.. class:: FrozenImporter
@@ -894,7 +895,8 @@ find and load modules.
894895
instantiation.
895896

896897
.. versionchanged:: 3.4
897-
Gained :meth:`~Loader.create_module` and :meth:`~Loader.exec_module`
898+
Gained :meth:`~importlib.abc.Loader.create_module` and
899+
:meth:`~importlib.abc.Loader.exec_module`
898900
methods.
899901

900902

@@ -1327,8 +1329,8 @@ an :term:`importer`.
13271329
with the source *path*. For example, if *path* is ``/foo/bar/baz.py`` the return
13281330
value would be ``/foo/bar/__pycache__/baz.cpython-32.pyc`` for Python 3.2.
13291331
The ``cpython-32`` string comes from the current magic tag (see
1330-
:func:`get_tag`; if :attr:`sys.implementation.cache_tag` is not defined then
1331-
:exc:`NotImplementedError` will be raised).
1332+
:attr:`sys.implementation.cache_tag <sys.implementation>`; if it is not
1333+
defined then :exc:`NotImplementedError` will be raised).
13321334

13331335
The *optimization* parameter is used to specify the optimization level of the
13341336
bytecode file. An empty string represents no optimization, so
@@ -1363,7 +1365,7 @@ an :term:`importer`.
13631365
``/foo/bar/__pycache__/baz.cpython-32.pyc`` the returned path would be
13641366
``/foo/bar/baz.py``. *path* need not exist, however if it does not conform
13651367
to :pep:`3147` or :pep:`488` format, a :exc:`ValueError` is raised. If
1366-
:attr:`sys.implementation.cache_tag` is not defined,
1368+
:attr:`sys.implementation.cache_tag <sys.implementation>` is not defined,
13671369
:exc:`NotImplementedError` is raised.
13681370

13691371
.. versionadded:: 3.4
@@ -1413,7 +1415,8 @@ an :term:`importer`.
14131415
If **name** is for a submodule (contains a dot), the parent module is
14141416
automatically imported.
14151417

1416-
**name** and **package** work the same as for :func:`import_module`.
1418+
**name** and **package** work the same as for
1419+
:func:`importlib.import_module`.
14171420

14181421
.. versionadded:: 3.4
14191422

@@ -1443,7 +1446,8 @@ an :term:`importer`.
14431446
A factory function for creating a :class:`~importlib.machinery.ModuleSpec`
14441447
instance based on a loader. The parameters have the same meaning as they do
14451448
for ModuleSpec. The function uses available :term:`loader` APIs, such as
1446-
:meth:`InspectLoader.is_package`, to fill in any missing
1449+
:meth:`InspectLoader.is_package
1450+
<importlib.abc.InspectLoader.is_package>`, to fill in any missing
14471451
information on the spec.
14481452

14491453
.. versionadded:: 3.4

Doc/tools/.nitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Doc/library/asyncio-extending.rst
99
Doc/library/asyncio-policy.rst
1010
Doc/library/email.charset.rst
1111
Doc/library/email.parser.rst
12-
Doc/library/importlib.rst
1312
Doc/library/logging.config.rst
1413
Doc/library/logging.handlers.rst
1514
Doc/library/mmap.rst

0 commit comments

Comments
 (0)