Skip to content

Commit e93f572

Browse files
miss-islingtonsobolevnhugovk
authored
[3.11] gh-101100: Fix sphinx warnings in threading.rst (GH-108684) (#108708)
Co-authored-by: Nikita Sobolev <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 385b195 commit e93f572

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

Doc/library/threading.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ The instance's values will be different for separate threads.
254254
A class that represents thread-local data.
255255

256256
For more details and extensive examples, see the documentation string of the
257-
:mod:`_threading_local` module: :source:`Lib/_threading_local.py`.
257+
:mod:`!_threading_local` module: :source:`Lib/_threading_local.py`.
258258

259259

260260
.. _thread-objects:
@@ -267,7 +267,7 @@ thread of control. There are two ways to specify the activity: by passing a
267267
callable object to the constructor, or by overriding the :meth:`~Thread.run`
268268
method in a subclass. No other methods (except for the constructor) should be
269269
overridden in a subclass. In other words, *only* override the
270-
:meth:`~Thread.__init__` and :meth:`~Thread.run` methods of this class.
270+
``__init__()`` and :meth:`~Thread.run` methods of this class.
271271

272272
Once a thread object is created, its activity must be started by calling the
273273
thread's :meth:`~Thread.start` method. This invokes the :meth:`~Thread.run`
@@ -319,7 +319,7 @@ since it is impossible to detect the termination of alien threads.
319319
are:
320320

321321
*group* should be ``None``; reserved for future extension when a
322-
:class:`ThreadGroup` class is implemented.
322+
:class:`!ThreadGroup` class is implemented.
323323

324324
*target* is the callable object to be invoked by the :meth:`run` method.
325325
Defaults to ``None``, meaning nothing is called.
@@ -991,7 +991,7 @@ This class represents an action that should be run only after a certain amount
991991
of time has passed --- a timer. :class:`Timer` is a subclass of :class:`Thread`
992992
and as such also functions as an example of creating custom threads.
993993

994-
Timers are started, as with threads, by calling their :meth:`~Timer.start`
994+
Timers are started, as with threads, by calling their :meth:`Timer.start <Thread.start>`
995995
method. The timer can be stopped (before its action has begun) by calling the
996996
:meth:`~Timer.cancel` method. The interval the timer will wait before
997997
executing its action may not be exactly the same as the interval specified by
@@ -1129,10 +1129,10 @@ As an example, here is a simple way to synchronize a client and server thread::
11291129
Using locks, conditions, and semaphores in the :keyword:`!with` statement
11301130
-------------------------------------------------------------------------
11311131

1132-
All of the objects provided by this module that have :meth:`acquire` and
1133-
:meth:`release` methods can be used as context managers for a :keyword:`with`
1134-
statement. The :meth:`acquire` method will be called when the block is
1135-
entered, and :meth:`release` will be called when the block is exited. Hence,
1132+
All of the objects provided by this module that have ``acquire`` and
1133+
``release`` methods can be used as context managers for a :keyword:`with`
1134+
statement. The ``acquire`` method will be called when the block is
1135+
entered, and ``release`` will be called when the block is exited. Hence,
11361136
the following snippet::
11371137

11381138
with some_lock:

Doc/tools/.nitignore

-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ Doc/library/tarfile.rst
126126
Doc/library/tempfile.rst
127127
Doc/library/termios.rst
128128
Doc/library/test.rst
129-
Doc/library/threading.rst
130129
Doc/library/time.rst
131130
Doc/library/tkinter.rst
132131
Doc/library/tkinter.scrolledtext.rst

0 commit comments

Comments
 (0)