Skip to content

Commit 7ece712

Browse files
vstinnerSeth Sims
authored andcommitted
bpo-40204: Fix reference to terms in the doc (pythonGH-21865)
Sphinx 3 requires to refer to terms with the exact case. For example, fix the Sphinx 3 warning: Doc/library/pkgutil.rst:71: WARNING: term Loader not found in case sensitive match.made a reference to loader instead.
1 parent fd6664c commit 7ece712

File tree

14 files changed

+22
-19
lines changed

14 files changed

+22
-19
lines changed

Doc/extending/newtypes_tutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ But this would be risky. Our type doesn't restrict the type of the
416416
``first`` member, so it could be any kind of object. It could have a
417417
destructor that causes code to be executed that tries to access the
418418
``first`` member; or that destructor could release the
419-
:term:`Global interpreter Lock` and let arbitrary code run in other
419+
:term:`Global interpreter Lock <GIL>` and let arbitrary code run in other
420420
threads that accesses and modifies our object.
421421

422422
To be paranoid and protect ourselves against this possibility, we almost

Doc/glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ Glossary
587587
and :class:`tuple`) and some non-sequence types like :class:`dict`,
588588
:term:`file objects <file object>`, and objects of any classes you define
589589
with an :meth:`__iter__` method or with a :meth:`__getitem__` method
590-
that implements :term:`Sequence` semantics.
590+
that implements :term:`Sequence <sequence>` semantics.
591591

592592
Iterables can be
593593
used in a :keyword:`for` loop and in many other places where a sequence is

Doc/library/collections.abc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ ABC Inherits from Abstract Methods Mixin
185185
expressions. Custom implementations must provide the :meth:`__await__`
186186
method.
187187

188-
:term:`Coroutine` objects and instances of the
188+
:term:`Coroutine <coroutine>` objects and instances of the
189189
:class:`~collections.abc.Coroutine` ABC are all instances of this ABC.
190190

191191
.. note::

Doc/library/concurrent.futures.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ ProcessPoolExecutor
221221
The :class:`ProcessPoolExecutor` class is an :class:`Executor` subclass that
222222
uses a pool of processes to execute calls asynchronously.
223223
:class:`ProcessPoolExecutor` uses the :mod:`multiprocessing` module, which
224-
allows it to side-step the :term:`Global Interpreter Lock` but also means that
224+
allows it to side-step the :term:`Global Interpreter Lock
225+
<global interpreter lock>` but also means that
225226
only picklable objects can be executed and returned.
226227

227228
The ``__main__`` module must be importable by worker subprocesses. This means

Doc/library/importlib.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ find and load modules.
10731073

10741074
.. class:: WindowsRegistryFinder
10751075

1076-
:term:`Finder` for modules declared in the Windows registry. This class
1076+
:term:`Finder <finder>` for modules declared in the Windows registry. This class
10771077
implements the :class:`importlib.abc.MetaPathFinder` ABC.
10781078

10791079
Only class methods are defined by this class to alleviate the need for
@@ -1088,7 +1088,7 @@ find and load modules.
10881088

10891089
.. class:: PathFinder
10901090

1091-
A :term:`Finder` for :data:`sys.path` and package ``__path__`` attributes.
1091+
A :term:`Finder <finder>` for :data:`sys.path` and package ``__path__`` attributes.
10921092
This class implements the :class:`importlib.abc.MetaPathFinder` ABC.
10931093

10941094
Only class methods are defined by this class to alleviate the need for

Doc/library/multiprocessing.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ Introduction
1414
:mod:`multiprocessing` is a package that supports spawning processes using an
1515
API similar to the :mod:`threading` module. The :mod:`multiprocessing` package
1616
offers both local and remote concurrency, effectively side-stepping the
17-
:term:`Global Interpreter Lock` by using subprocesses instead of threads. Due
17+
:term:`Global Interpreter Lock <global interpreter lock>` by using
18+
subprocesses instead of threads. Due
1819
to this, the :mod:`multiprocessing` module allows the programmer to fully
1920
leverage multiple processors on a given machine. It runs on both Unix and
2021
Windows.

Doc/library/pkgutil.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ support.
6868

6969
.. class:: ImpLoader(fullname, file, filename, etc)
7070

71-
:term:`Loader` that wraps Python's "classic" import algorithm.
71+
:term:`Loader <loader>` that wraps Python's "classic" import algorithm.
7272

7373
.. deprecated:: 3.3
7474
This emulation is no longer needed, as the standard import mechanism

Doc/library/threading.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,8 @@ since it is impossible to detect the termination of alien threads.
394394

395395
.. impl-detail::
396396

397-
In CPython, due to the :term:`Global Interpreter Lock`, only one thread
397+
In CPython, due to the :term:`Global Interpreter Lock
398+
<global interpreter lock>`, only one thread
398399
can execute Python code at once (even though certain performance-oriented
399400
libraries might overcome this limitation).
400401
If you want your application to make better use of the computational

Doc/reference/datamodel.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2601,7 +2601,7 @@ Awaitable Objects
26012601
-----------------
26022602

26032603
An :term:`awaitable` object generally implements an :meth:`__await__` method.
2604-
:term:`Coroutine` objects returned from :keyword:`async def` functions
2604+
:term:`Coroutine objects <coroutine>` returned from :keyword:`async def` functions
26052605
are awaitable.
26062606

26072607
.. note::
@@ -2626,7 +2626,7 @@ are awaitable.
26262626
Coroutine Objects
26272627
-----------------
26282628

2629-
:term:`Coroutine` objects are :term:`awaitable` objects.
2629+
:term:`Coroutine objects <coroutine>` are :term:`awaitable` objects.
26302630
A coroutine's execution can be controlled by calling :meth:`__await__` and
26312631
iterating over the result. When the coroutine has finished executing and
26322632
returns, the iterator raises :exc:`StopIteration`, and the exception's

Doc/tutorial/classes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ defines :meth:`__next__`, then :meth:`__iter__` can just return ``self``::
849849
Generators
850850
==========
851851

852-
:term:`Generator`\s are a simple and powerful tool for creating iterators. They
852+
:term:`Generators <generator>` are a simple and powerful tool for creating iterators. They
853853
are written like regular functions but use the :keyword:`yield` statement
854854
whenever they want to return data. Each time :func:`next` is called on it, the
855855
generator resumes where it left off (it remembers all the data values and which

0 commit comments

Comments
 (0)