Skip to content

Commit bce24a6

Browse files
committed
[3.12] pythongh-101100: Fix Sphinx Lint warnings in Misc/ (pythonGH-113946)
Fix Sphinx Lint warnings in Misc/ (cherry picked from commit 794983c) Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 7b7cf75 commit bce24a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+332
-332
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ repos:
2828
hooks:
2929
- id: sphinx-lint
3030
args: [--enable=default-role]
31-
files: ^Doc/|^Misc/NEWS.d/next/
31+
files: ^Doc/|^Misc/NEWS.d/
3232

3333
- repo: meta
3434
hooks:

Misc/NEWS.d/3.10.0a1.rst

+14-14
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.. release date: 2020-10-05
55
.. section: Security
66
7-
Fixes `python3x._pth` being ignored on Windows, caused by the fix for
7+
Fixes ``python3x._pth`` being ignored on Windows, caused by the fix for
88
:issue:`29778` (CVE-2020-15801).
99

1010
..
@@ -217,7 +217,7 @@ Port the :mod:`_opcode` extension module to multi-phase initialization
217217
.. nonce: 3-VJiH
218218
.. section: Core and Builtins
219219
220-
Fixes the wrong error description in the error raised by using 2 `,` in
220+
Fixes the wrong error description in the error raised by using 2 ``,`` in
221221
format string in f-string and :meth:`str.format`.
222222

223223
..
@@ -747,7 +747,7 @@ Galindo.
747747
748748
Fix a bug where a line with only a line continuation character is not
749749
considered a blank line at tokenizer level. In such cases, more than a
750-
single `NEWLINE` token was emitted. The old parser was working around the
750+
single ``NEWLINE`` token was emitted. The old parser was working around the
751751
issue, but the new parser threw a :exc:`SyntaxError` for valid input due to
752752
this. For example, an empty line following a line continuation character was
753753
interpreted as a :exc:`SyntaxError`.
@@ -1157,7 +1157,7 @@ The :class:`threading.Thread` constructor now uses the target name if the
11571157
.. nonce: bnh-VG
11581158
.. section: Library
11591159
1160-
fix `tkinter.EventType` Enum so all members are strings, and none are tuples
1160+
fix ``tkinter.EventType`` Enum so all members are strings, and none are tuples
11611161

11621162
..
11631163
@@ -1229,8 +1229,8 @@ Previously there was no way to check that without using private API. See the
12291229
.. nonce: pI_uZQ
12301230
.. section: Library
12311231
1232-
Honor `object` overrides in `Enum` class creation (specifically, `__str__`,
1233-
`__repr__`, `__format__`, and `__reduce_ex__`).
1232+
Honor ``object`` overrides in ``Enum`` class creation (specifically, ``__str__``,
1233+
``__repr__``, ``__format__``, and ``__reduce_ex__``).
12341234

12351235
..
12361236
@@ -1239,7 +1239,7 @@ Honor `object` overrides in `Enum` class creation (specifically, `__str__`,
12391239
.. nonce: IpYkEe
12401240
.. section: Library
12411241
1242-
`enum.Flag` and `enum.IntFlag` members are now iterable
1242+
``enum.Flag`` and ``enum.IntFlag`` members are now iterable.
12431243

12441244
..
12451245
@@ -1557,7 +1557,7 @@ activation.
15571557
.. nonce: wqrj8C
15581558
.. section: Library
15591559
1560-
Recursive evaluation of `typing.ForwardRef` in `get_type_hints`.
1560+
Recursive evaluation of ``typing.ForwardRef`` in ``get_type_hints``.
15611561

15621562
..
15631563
@@ -1851,8 +1851,8 @@ Merry.
18511851
.. nonce: 1dk8Bu
18521852
.. section: Library
18531853
1854-
:mod:`ensurepip` now disables the use of `pip` cache when installing the
1855-
bundled versions of `pip` and `setuptools`. Patch by Krzysztof Konopko.
1854+
:mod:`ensurepip` now disables the use of ``pip`` cache when installing the
1855+
bundled versions of ``pip`` and ``setuptools``. Patch by Krzysztof Konopko.
18561856

18571857
..
18581858
@@ -1933,7 +1933,7 @@ Smith and Tal Einat.
19331933
.. nonce: n7fOwS
19341934
.. section: Library
19351935
1936-
Added a `defaults` parameter to :class:`logging.Formatter`, to allow
1936+
Added a ``defaults`` parameter to :class:`logging.Formatter`, to allow
19371937
specifying default values for custom fields. Patch by Asaf Alon and Bar
19381938
Harel.
19391939

@@ -2225,7 +2225,7 @@ policy.
22252225
.. nonce: ps7Yf1
22262226
.. section: Library
22272227
2228-
func:`hashlib.new` passed ``usedforsecurity`` to OpenSSL EVP constructor
2228+
:func:`hashlib.new` passed ``usedforsecurity`` to OpenSSL EVP constructor
22292229
``_hashlib.new()``. test_hashlib and test_smtplib handle strict security
22302230
policy better.
22312231

@@ -2393,8 +2393,8 @@ closes connection during TLS negotiation
23932393
.. nonce: kOOaHn
23942394
.. section: Library
23952395
2396-
fix default `_missing_` so a duplicate `ValueError` is not set as the
2397-
`__context__` of the original `ValueError`
2396+
fix default ``_missing_`` so a duplicate ``ValueError`` is not set as the
2397+
``__context__`` of the original ``ValueError``.
23982398

23992399
..
24002400

Misc/NEWS.d/3.10.0a2.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ Goldschmidt.
8888
.. nonce: d4a-8o
8989
.. section: Core and Builtins
9090
91-
Fix a bug in the parser, where a curly brace following a `primary` didn't
92-
fail immediately. This led to invalid expressions like `a {b}` to throw a
91+
Fix a bug in the parser, where a curly brace following a ``primary`` didn't
92+
fail immediately. This led to invalid expressions like ``a {b}`` to throw a
9393
:exc:`SyntaxError` with a wrong offset, or invalid expressions ending with a
94-
curly brace like `a {` to not fail immediately in the REPL.
94+
curly brace like ``a {`` to not fail immediately in the REPL.
9595

9696
..
9797
@@ -214,7 +214,7 @@ Micro optimization for range.index if step is 1. Patch by Donghee Na.
214214
.. nonce: qPWjJA
215215
.. section: Core and Builtins
216216
217-
Add `sys._current_exceptions()` function to retrieve a dictionary mapping
217+
Add ``sys._current_exceptions()`` function to retrieve a dictionary mapping
218218
each thread's identifier to the topmost exception currently active in that
219219
thread at the time the function is called.
220220

@@ -302,7 +302,7 @@ type to a heap type. Patch by Mohamed Koubaa and Victor Stinner.
302302
.. section: Library
303303
304304
Fix memory leak in :func:`subprocess.Popen` in case an uid (gid) specified
305-
in `user` (`group`, `extra_groups`) overflows `uid_t` (`gid_t`).
305+
in ``user`` (``group``, ``extra_groups``) overflows ``uid_t`` (``gid_t``).
306306

307307
..
308308
@@ -649,7 +649,7 @@ Document __format__ functionality for IP addresses.
649649
.. nonce: CzBMit
650650
.. section: Documentation
651651
652-
Document the default implementation of `object.__eq__`.
652+
Document the default implementation of ``object.__eq__``.
653653

654654
..
655655
@@ -878,7 +878,7 @@ targeting 3.10 or later.
878878
.. nonce: sh8IDY
879879
.. section: C API
880880
881-
Add `_Py_closerange` function to provide performant closing of a range of
881+
Add ``_Py_closerange`` function to provide performant closing of a range of
882882
file descriptors.
883883

884884
..
@@ -898,7 +898,7 @@ available again in limited API.
898898
.. nonce: ZZ5wJG
899899
.. section: C API
900900
901-
Add `PyIter_Send` function to allow sending value into
901+
Add ``PyIter_Send`` function to allow sending value into
902902
generator/coroutine/iterator without raising StopIteration exception to
903903
signal return.
904904

Misc/NEWS.d/3.10.0a3.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ fixes union type expressions not de-duplicating ``GenericAlias`` objects.
247247
.. nonce: B-Veg7
248248
.. section: Core and Builtins
249249
250-
The import system triggers a `ImportWarning` when it falls back to using
251-
`load_module()`.
250+
The import system triggers a ``ImportWarning`` when it falls back to using
251+
``load_module()``.
252252

253253
..
254254
@@ -464,8 +464,8 @@ Support signal module on VxWorks.
464464
.. nonce: r9rNCj
465465
.. section: Library
466466
467-
We fixed an issue in `pickle.whichmodule` in which importing
468-
`multiprocessing` could change the how pickle identifies which module an
467+
We fixed an issue in ``pickle.whichmodule`` in which importing
468+
``multiprocessing`` could change the how pickle identifies which module an
469469
object belongs to, potentially breaking the unpickling of those objects.
470470

471471
..
@@ -602,7 +602,7 @@ function when ``os.open`` fails.
602602
.. nonce: F363jO
603603
.. section: Library
604604
605-
Fix `os.sendfile()` on illumos.
605+
Fix ``os.sendfile()`` on illumos.
606606

607607
..
608608
@@ -718,8 +718,8 @@ Improve asyncio.wait function to create the futures set just one time.
718718
.. nonce: BzizYV
719719
.. section: Library
720720
721-
Update various modules in the stdlib to fall back on `__spec__.loader` when
722-
`__loader__` isn't defined on a module.
721+
Update various modules in the stdlib to fall back on ``__spec__.loader`` when
722+
``__loader__`` isn't defined on a module.
723723

724724
..
725725
@@ -728,8 +728,8 @@ Update various modules in the stdlib to fall back on `__spec__.loader` when
728728
.. nonce: CAsI3O
729729
.. section: Library
730730
731-
The `load_module()` methods found in importlib now trigger a
732-
DeprecationWarning.
731+
The ``load_module()`` methods found in ``importlib`` now trigger a
732+
``DeprecationWarning``.
733733

734734
..
735735
@@ -872,7 +872,7 @@ extension during TLS handshake when no custom context is supplied.
872872
.. nonce: 5mi7b0
873873
.. section: Library
874874
875-
Add func:`os.eventfd` to provide a low level interface for Linux's event
875+
Add :func:`os.eventfd` to provide a low level interface for Linux's event
876876
notification file descriptor.
877877

878878
..

Misc/NEWS.d/3.10.0a4.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ Define THREAD_STACK_SIZE for VxWorks.
516516
.. nonce: x8TASR
517517
.. section: Library
518518
519-
[Enum] `_EnumDict.update()` is now supported
519+
[Enum] ``_EnumDict.update()`` is now supported.
520520

521521
..
522522

Misc/NEWS.d/3.10.0a7.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ the annotations _Py_NO_SANITIZE_ADDRESS, _Py_NO_SANITIZE_THREAD, and
261261
_Py_NO_SANITIZE_MEMORY. Those annotations are no longer needed.
262262

263263
To disable the radix tree map, set a preprocessor flag as follows:
264-
`-DWITH_PYMALLOC_RADIX_TREE=0`.
264+
``-DWITH_PYMALLOC_RADIX_TREE=0``.
265265

266266
Co-authored-by: Tim Peters <[email protected]>
267267

@@ -664,11 +664,11 @@ on failure.
664664
.. nonce: f1dr_5
665665
.. section: Library
666666
667-
Enum's `repr()` and `str()` have changed: `repr()` is now
668-
*EnumClass.MemberName* and `str()` is *MemberName*. Additionally, stdlib
667+
Enum's ``repr()`` and ``str()`` have changed: ``repr()`` is now
668+
*EnumClass.MemberName* and ``str()`` is *MemberName*. Additionally, stdlib
669669
Enum's whose contents are available as module attributes, such as
670-
`RegexFlag.IGNORECASE`, have their `repr()` as *module.name*, e.g.
671-
`re.IGNORECASE`.
670+
``RegexFlag.IGNORECASE``, have their ``repr()`` as *module.name*, e.g.
671+
``re.IGNORECASE``.
672672

673673
..
674674

Misc/NEWS.d/3.10.0b1.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1181,8 +1181,8 @@ Lewis Gaul.
11811181
.. nonce: NzLVaR
11821182
.. section: Library
11831183
1184-
Add `pathlib.Path.hardlink_to()` method that supersedes `link_to()`. The new
1185-
method has the same argument order as `symlink_to()`.
1184+
Add ``pathlib.Path.hardlink_to()`` method that supersedes ``link_to()``. The new
1185+
method has the same argument order as ``symlink_to()``.
11861186

11871187
..
11881188

Misc/NEWS.d/3.11.0a1.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -3204,7 +3204,7 @@ deprecated, for removal in 3.14.
32043204
.. section: Library
32053205
32063206
When :class:`http.server.SimpleHTTPRequestHandler` sends a ``301 (Moved
3207-
Permanently)`` for a directory path not ending with `/`, add a
3207+
Permanently)`` for a directory path not ending with ``/``, add a
32083208
``Content-Length: 0`` header. This improves the behavior for certain
32093209
clients.
32103210

@@ -3240,7 +3240,7 @@ Patch by Erlend E. Aasland.
32403240
.. nonce: m72tlH
32413241
.. section: Library
32423242
3243-
AIX: `Lib/_aix_support.get_platform()` may fail in an AIX WPAR. The fileset
3243+
AIX: ``Lib/_aix_support.get_platform()`` may fail in an AIX WPAR. The fileset
32443244
bos.rte appears to have a builddate in both LPAR and WPAR so this fileset is
32453245
queried rather than bos.mp64. To prevent a similar situation (no builddate
32463246
in ODM) a value (9988) sufficient for completing a build is provided. Patch
@@ -3685,9 +3685,9 @@ equivalents are valid.
36853685
.. nonce: aJuvQF
36863686
.. section: Documentation
36873687
3688-
Removed the othergui.rst file, any references to it, and the list of GUI
3688+
Removed the ``othergui.rst`` file, any references to it, and the list of GUI
36893689
frameworks in the FAQ. In their place I've added links to the Python Wiki
3690-
`page on GUI frameworks <https://wiki.python.org/moin/GuiProgramming>`.
3690+
`page on GUI frameworks <https://wiki.python.org/moin/GuiProgramming>`_.
36913691

36923692
..
36933693

Misc/NEWS.d/3.11.0a2.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ Waygood.
507507
.. section: Library
508508
509509
Make :func:`inspect.getmodule` catch ``FileNotFoundError`` raised by
510-
:'func:`inspect.getabsfile`, and return ``None`` to indicate that the module
510+
:func:`inspect.getabsfile`, and return ``None`` to indicate that the module
511511
could not be determined.
512512

513513
..
@@ -897,8 +897,8 @@ was often the case on macOS.
897897
.. nonce: F18qcE
898898
.. section: Tests
899899
900-
Add more test cases for `@functools.singledispatchmethod` when combined with
901-
`@classmethod` or `@staticmethod`.
900+
Add more test cases for ``@functools.singledispatchmethod`` when combined with
901+
``@classmethod`` or ``@staticmethod``.
902902

903903
..
904904

Misc/NEWS.d/3.11.0a3.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ Galindo.
350350
.. section: Library
351351
352352
Fix possible crash when getting an attribute of
353-
class:`xml.etree.ElementTree.Element` simultaneously with replacing the
353+
:class:`xml.etree.ElementTree.Element` simultaneously with replacing the
354354
``attrib`` dict.
355355

356356
..

Misc/NEWS.d/3.11.0a4.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ Remove special-casing of ``__new__`` in :meth:`enum.Enum.__dir__`.
510510
511511
Improve day constants in :mod:`calendar`.
512512

513-
Now all constants (`MONDAY` ... `SUNDAY`) are documented, tested, and added
513+
Now all constants (``MONDAY`` ... ``SUNDAY``) are documented, tested, and added
514514
to ``__all__``.
515515

516516
..

Misc/NEWS.d/3.11.0a5.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ Do not use POSIX semaphores on NetBSD
275275
.. nonce: M9m8Qd
276276
.. section: Core and Builtins
277277
278-
Improve the exc:`TypeError` message for non-string second arguments passed
278+
Improve the :exc:`TypeError` message for non-string second arguments passed
279279
to the built-in functions :func:`getattr` and :func:`hasattr`. Patch by Géry
280280
Ogam.
281281

@@ -673,7 +673,7 @@ file
673673
.. section: Tests
674674
675675
Mocks can no longer be provided as the specs for other Mocks. As a result,
676-
an already-mocked object cannot be passed to `mock.Mock()`. This can uncover
676+
an already-mocked object cannot be passed to ``mock.Mock()``. This can uncover
677677
bugs in tests since these Mock-derived Mocks will always pass certain tests
678678
(e.g. isinstance) and builtin assert functions (e.g.
679679
assert_called_once_with) will unconditionally pass.

Misc/NEWS.d/3.11.0a6.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ if zlib uses the s390x hardware accelerator. Patch by Victor Stinner.
10341034
.. nonce: jfciLG
10351035
.. section: Build
10361036
1037-
Respect `--with-suffix` when building on case-insensitive file systems.
1037+
Respect ``--with-suffix`` when building on case-insensitive file systems.
10381038

10391039
..
10401040
@@ -1151,7 +1151,7 @@ Make query dialogs on Windows start with a cursor in the entry box.
11511151
.. nonce: FhiH5P
11521152
.. section: IDLE
11531153
1154-
Apply IDLE syntax highlighting to `.pyi` files. Patch by Alex Waygood and
1154+
Apply IDLE syntax highlighting to ``.pyi`` files. Patch by Alex Waygood and
11551155
Terry Jan Reedy.
11561156

11571157
..

0 commit comments

Comments
 (0)