Skip to content

Commit

Permalink
pythongh-101100: Fix Sphinx Lint warnings in Misc/ (python#113946)
Browse files Browse the repository at this point in the history
Fix Sphinx Lint warnings in Misc/
  • Loading branch information
hugovk authored and Glyphack committed Jan 27, 2024
1 parent d0d6e55 commit 295f519
Show file tree
Hide file tree
Showing 43 changed files with 332 additions and 332 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repos:
hooks:
- id: sphinx-lint
args: [--enable=default-role]
files: ^Doc/|^Misc/NEWS.d/next/
files: ^Doc/|^Misc/NEWS.d/

- repo: meta
hooks:
Expand Down
28 changes: 14 additions & 14 deletions Misc/NEWS.d/3.10.0a1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.. release date: 2020-10-05
.. section: Security
Fixes `python3x._pth` being ignored on Windows, caused by the fix for
Fixes ``python3x._pth`` being ignored on Windows, caused by the fix for
:issue:`29778` (CVE-2020-15801).

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

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

..
Expand Down Expand Up @@ -1229,8 +1229,8 @@ Previously there was no way to check that without using private API. See the
.. nonce: pI_uZQ
.. section: Library
Honor `object` overrides in `Enum` class creation (specifically, `__str__`,
`__repr__`, `__format__`, and `__reduce_ex__`).
Honor ``object`` overrides in ``Enum`` class creation (specifically, ``__str__``,
``__repr__``, ``__format__``, and ``__reduce_ex__``).

..
Expand All @@ -1239,7 +1239,7 @@ Honor `object` overrides in `Enum` class creation (specifically, `__str__`,
.. nonce: IpYkEe
.. section: Library
`enum.Flag` and `enum.IntFlag` members are now iterable
``enum.Flag`` and ``enum.IntFlag`` members are now iterable.

..
Expand Down Expand Up @@ -1557,7 +1557,7 @@ activation.
.. nonce: wqrj8C
.. section: Library
Recursive evaluation of `typing.ForwardRef` in `get_type_hints`.
Recursive evaluation of ``typing.ForwardRef`` in ``get_type_hints``.

..
Expand Down Expand Up @@ -1851,8 +1851,8 @@ Merry.
.. nonce: 1dk8Bu
.. section: Library
:mod:`ensurepip` now disables the use of `pip` cache when installing the
bundled versions of `pip` and `setuptools`. Patch by Krzysztof Konopko.
:mod:`ensurepip` now disables the use of ``pip`` cache when installing the
bundled versions of ``pip`` and ``setuptools``. Patch by Krzysztof Konopko.

..
Expand Down Expand Up @@ -1933,7 +1933,7 @@ Smith and Tal Einat.
.. nonce: n7fOwS
.. section: Library
Added a `defaults` parameter to :class:`logging.Formatter`, to allow
Added a ``defaults`` parameter to :class:`logging.Formatter`, to allow
specifying default values for custom fields. Patch by Asaf Alon and Bar
Harel.

Expand Down Expand Up @@ -2225,7 +2225,7 @@ policy.
.. nonce: ps7Yf1
.. section: Library
func:`hashlib.new` passed ``usedforsecurity`` to OpenSSL EVP constructor
:func:`hashlib.new` passed ``usedforsecurity`` to OpenSSL EVP constructor
``_hashlib.new()``. test_hashlib and test_smtplib handle strict security
policy better.

Expand Down Expand Up @@ -2393,8 +2393,8 @@ closes connection during TLS negotiation
.. nonce: kOOaHn
.. section: Library
fix default `_missing_` so a duplicate `ValueError` is not set as the
`__context__` of the original `ValueError`
fix default ``_missing_`` so a duplicate ``ValueError`` is not set as the
``__context__`` of the original ``ValueError``.

..
Expand Down
16 changes: 8 additions & 8 deletions Misc/NEWS.d/3.10.0a2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ Goldschmidt.
.. nonce: d4a-8o
.. section: Core and Builtins
Fix a bug in the parser, where a curly brace following a `primary` didn't
fail immediately. This led to invalid expressions like `a {b}` to throw a
Fix a bug in the parser, where a curly brace following a ``primary`` didn't
fail immediately. This led to invalid expressions like ``a {b}`` to throw a
:exc:`SyntaxError` with a wrong offset, or invalid expressions ending with a
curly brace like `a {` to not fail immediately in the REPL.
curly brace like ``a {`` to not fail immediately in the REPL.

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

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

..
Expand Down Expand Up @@ -649,7 +649,7 @@ Document __format__ functionality for IP addresses.
.. nonce: CzBMit
.. section: Documentation
Document the default implementation of `object.__eq__`.
Document the default implementation of ``object.__eq__``.

..
Expand Down Expand Up @@ -878,7 +878,7 @@ targeting 3.10 or later.
.. nonce: sh8IDY
.. section: C API
Add `_Py_closerange` function to provide performant closing of a range of
Add ``_Py_closerange`` function to provide performant closing of a range of
file descriptors.

..
Expand All @@ -898,7 +898,7 @@ available again in limited API.
.. nonce: ZZ5wJG
.. section: C API
Add `PyIter_Send` function to allow sending value into
Add ``PyIter_Send`` function to allow sending value into
generator/coroutine/iterator without raising StopIteration exception to
signal return.

Expand Down
20 changes: 10 additions & 10 deletions Misc/NEWS.d/3.10.0a3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ fixes union type expressions not de-duplicating ``GenericAlias`` objects.
.. nonce: B-Veg7
.. section: Core and Builtins
The import system triggers a `ImportWarning` when it falls back to using
`load_module()`.
The import system triggers a ``ImportWarning`` when it falls back to using
``load_module()``.

..
Expand Down Expand Up @@ -464,8 +464,8 @@ Support signal module on VxWorks.
.. nonce: r9rNCj
.. section: Library
We fixed an issue in `pickle.whichmodule` in which importing
`multiprocessing` could change the how pickle identifies which module an
We fixed an issue in ``pickle.whichmodule`` in which importing
``multiprocessing`` could change the how pickle identifies which module an
object belongs to, potentially breaking the unpickling of those objects.

..
Expand Down Expand Up @@ -602,7 +602,7 @@ function when ``os.open`` fails.
.. nonce: F363jO
.. section: Library
Fix `os.sendfile()` on illumos.
Fix ``os.sendfile()`` on illumos.

..
Expand Down Expand Up @@ -718,8 +718,8 @@ Improve asyncio.wait function to create the futures set just one time.
.. nonce: BzizYV
.. section: Library
Update various modules in the stdlib to fall back on `__spec__.loader` when
`__loader__` isn't defined on a module.
Update various modules in the stdlib to fall back on ``__spec__.loader`` when
``__loader__`` isn't defined on a module.

..
Expand All @@ -728,8 +728,8 @@ Update various modules in the stdlib to fall back on `__spec__.loader` when
.. nonce: CAsI3O
.. section: Library
The `load_module()` methods found in importlib now trigger a
DeprecationWarning.
The ``load_module()`` methods found in ``importlib`` now trigger a
``DeprecationWarning``.

..
Expand Down Expand Up @@ -872,7 +872,7 @@ extension during TLS handshake when no custom context is supplied.
.. nonce: 5mi7b0
.. section: Library
Add func:`os.eventfd` to provide a low level interface for Linux's event
Add :func:`os.eventfd` to provide a low level interface for Linux's event
notification file descriptor.

..
Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.10.0a4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ Define THREAD_STACK_SIZE for VxWorks.
.. nonce: x8TASR
.. section: Library
[Enum] `_EnumDict.update()` is now supported
[Enum] ``_EnumDict.update()`` is now supported.

..
Expand Down
10 changes: 5 additions & 5 deletions Misc/NEWS.d/3.10.0a7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ the annotations _Py_NO_SANITIZE_ADDRESS, _Py_NO_SANITIZE_THREAD, and
_Py_NO_SANITIZE_MEMORY. Those annotations are no longer needed.

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

Co-authored-by: Tim Peters <tim.peters@gmail.com>

Expand Down Expand Up @@ -664,11 +664,11 @@ on failure.
.. nonce: f1dr_5
.. section: Library
Enum's `repr()` and `str()` have changed: `repr()` is now
*EnumClass.MemberName* and `str()` is *MemberName*. Additionally, stdlib
Enum's ``repr()`` and ``str()`` have changed: ``repr()`` is now
*EnumClass.MemberName* and ``str()`` is *MemberName*. Additionally, stdlib
Enum's whose contents are available as module attributes, such as
`RegexFlag.IGNORECASE`, have their `repr()` as *module.name*, e.g.
`re.IGNORECASE`.
``RegexFlag.IGNORECASE``, have their ``repr()`` as *module.name*, e.g.
``re.IGNORECASE``.

..
Expand Down
4 changes: 2 additions & 2 deletions Misc/NEWS.d/3.10.0b1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1181,8 +1181,8 @@ Lewis Gaul.
.. nonce: NzLVaR
.. section: Library
Add `pathlib.Path.hardlink_to()` method that supersedes `link_to()`. The new
method has the same argument order as `symlink_to()`.
Add ``pathlib.Path.hardlink_to()`` method that supersedes ``link_to()``. The new
method has the same argument order as ``symlink_to()``.

..
Expand Down
8 changes: 4 additions & 4 deletions Misc/NEWS.d/3.11.0a1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3204,7 +3204,7 @@ deprecated, for removal in 3.14.
.. section: Library
When :class:`http.server.SimpleHTTPRequestHandler` sends a ``301 (Moved
Permanently)`` for a directory path not ending with `/`, add a
Permanently)`` for a directory path not ending with ``/``, add a
``Content-Length: 0`` header. This improves the behavior for certain
clients.

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

..
Expand Down
6 changes: 3 additions & 3 deletions Misc/NEWS.d/3.11.0a2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ Waygood.
.. section: Library
Make :func:`inspect.getmodule` catch ``FileNotFoundError`` raised by
:'func:`inspect.getabsfile`, and return ``None`` to indicate that the module
:func:`inspect.getabsfile`, and return ``None`` to indicate that the module
could not be determined.

..
Expand Down Expand Up @@ -897,8 +897,8 @@ was often the case on macOS.
.. nonce: F18qcE
.. section: Tests
Add more test cases for `@functools.singledispatchmethod` when combined with
`@classmethod` or `@staticmethod`.
Add more test cases for ``@functools.singledispatchmethod`` when combined with
``@classmethod`` or ``@staticmethod``.

..
Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.11.0a3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ Galindo.
.. section: Library
Fix possible crash when getting an attribute of
class:`xml.etree.ElementTree.Element` simultaneously with replacing the
:class:`xml.etree.ElementTree.Element` simultaneously with replacing the
``attrib`` dict.

..
Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.11.0a4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ Remove special-casing of ``__new__`` in :meth:`enum.Enum.__dir__`.
Improve day constants in :mod:`calendar`.

Now all constants (`MONDAY` ... `SUNDAY`) are documented, tested, and added
Now all constants (``MONDAY`` ... ``SUNDAY``) are documented, tested, and added
to ``__all__``.

..
Expand Down
4 changes: 2 additions & 2 deletions Misc/NEWS.d/3.11.0a5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ Do not use POSIX semaphores on NetBSD
.. nonce: M9m8Qd
.. section: Core and Builtins
Improve the exc:`TypeError` message for non-string second arguments passed
Improve the :exc:`TypeError` message for non-string second arguments passed
to the built-in functions :func:`getattr` and :func:`hasattr`. Patch by Géry
Ogam.

Expand Down Expand Up @@ -673,7 +673,7 @@ file
.. section: Tests
Mocks can no longer be provided as the specs for other Mocks. As a result,
an already-mocked object cannot be passed to `mock.Mock()`. This can uncover
an already-mocked object cannot be passed to ``mock.Mock()``. This can uncover
bugs in tests since these Mock-derived Mocks will always pass certain tests
(e.g. isinstance) and builtin assert functions (e.g.
assert_called_once_with) will unconditionally pass.
Expand Down
4 changes: 2 additions & 2 deletions Misc/NEWS.d/3.11.0a6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ if zlib uses the s390x hardware accelerator. Patch by Victor Stinner.
.. nonce: jfciLG
.. section: Build
Respect `--with-suffix` when building on case-insensitive file systems.
Respect ``--with-suffix`` when building on case-insensitive file systems.

..
Expand Down Expand Up @@ -1151,7 +1151,7 @@ Make query dialogs on Windows start with a cursor in the entry box.
.. nonce: FhiH5P
.. section: IDLE
Apply IDLE syntax highlighting to `.pyi` files. Patch by Alex Waygood and
Apply IDLE syntax highlighting to ``.pyi`` files. Patch by Alex Waygood and
Terry Jan Reedy.

..
Expand Down
Loading

0 comments on commit 295f519

Please sign in to comment.