Skip to content

Commit bb0b085

Browse files
authored
bpo-40204: Fix reference to terms in the doc (GH-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 87d8287 commit bb0b085

14 files changed

+22
-19
lines changed

Doc/extending/newtypes_tutorial.rst

+1-1
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

+1-1
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

+1-1
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

+2-1
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

+2-2
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

+2-1
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

+1-1
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

+2-1
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

+2-2
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

+1-1
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

Doc/whatsnew/3.2.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2311,7 +2311,7 @@ Multi-threading
23112311
===============
23122312

23132313
* The mechanism for serializing execution of concurrently running Python threads
2314-
(generally known as the :term:`GIL` or :term:`Global Interpreter Lock`) has
2314+
(generally known as the :term:`GIL` or Global Interpreter Lock) has
23152315
been rewritten. Among the objectives were more predictable switching
23162316
intervals and reduced overhead due to lock contention and the number of
23172317
ensuing system calls. The notion of a "check interval" to allow thread

Doc/whatsnew/3.5.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ uses were to provide type hints to function parameters and return values. It
412412
became evident that it would be beneficial for Python users, if the
413413
standard library included the base definitions and tools for type annotations.
414414

415-
:pep:`484` introduces a :term:`provisional module <provisional api>` to
415+
:pep:`484` introduces a :term:`provisional module <provisional API>` to
416416
provide these standard definitions and tools, along with some conventions
417417
for situations where annotations are not available.
418418

@@ -726,7 +726,7 @@ New Modules
726726
typing
727727
------
728728

729-
The new :mod:`typing` :term:`provisional <provisional api>` module
729+
The new :mod:`typing` :term:`provisional <provisional API>` module
730730
provides standard definitions and tools for function type annotations.
731731
See :ref:`Type Hints <whatsnew-pep-484>` for more information.
732732

@@ -772,7 +772,7 @@ Steven Bethard, paul j3 and Daniel Eriksson in :issue:`14910`.)
772772
asyncio
773773
-------
774774

775-
Since the :mod:`asyncio` module is :term:`provisional <provisional api>`,
775+
Since the :mod:`asyncio` module is :term:`provisional <provisional API>`,
776776
all changes introduced in Python 3.5 have also been backported to Python 3.4.x.
777777

778778
Notable changes in the :mod:`asyncio` module since Python 3.4.0:
@@ -1867,7 +1867,7 @@ A new :func:`~sys.set_coroutine_wrapper` function allows setting a global
18671867
hook that will be called whenever a :term:`coroutine object <coroutine>`
18681868
is created by an :keyword:`async def` function. A corresponding
18691869
:func:`~sys.get_coroutine_wrapper` can be used to obtain a currently set
1870-
wrapper. Both functions are :term:`provisional <provisional api>`,
1870+
wrapper. Both functions are :term:`provisional <provisional API>`,
18711871
and are intended for debugging purposes only. (Contributed by Yury Selivanov
18721872
in :issue:`24017`.)
18731873

Doc/whatsnew/3.6.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,7 @@ to filter block traces by their address space (domain).
15971597
typing
15981598
------
15991599

1600-
Since the :mod:`typing` module is :term:`provisional <provisional api>`,
1600+
Since the :mod:`typing` module is :term:`provisional <provisional API>`,
16011601
all changes introduced in Python 3.6 have also been
16021602
backported to Python 3.5.x.
16031603

Doc/whatsnew/3.7.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ The :mod:`asyncio` module has received many new features, usability and
636636
:ref:`performance improvements <whatsnew37-asyncio-perf>`. Notable changes
637637
include:
638638

639-
* The new :term:`provisional <provisional api>` :func:`asyncio.run` function can
639+
* The new :term:`provisional <provisional API>` :func:`asyncio.run` function can
640640
be used to run a coroutine from synchronous code by automatically creating and
641641
destroying the event loop.
642642
(Contributed by Yury Selivanov in :issue:`32314`.)

0 commit comments

Comments
 (0)