]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Docs: Fix backtick errors found by sphinx-lint (#97998)
authorHugo van Kemenade <hugovk@users.noreply.github.com>
Fri, 7 Oct 2022 01:01:30 +0000 (18:01 -0700)
committerGitHub <noreply@github.com>
Fri, 7 Oct 2022 01:01:30 +0000 (18:01 -0700)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
55 files changed:
Doc/c-api/init.rst
Doc/c-api/type.rst
Doc/faq/design.rst
Doc/howto/enum.rst
Doc/howto/logging-cookbook.rst
Doc/howto/logging.rst
Doc/howto/perf_profiling.rst
Doc/install/index.rst
Doc/library/asyncio-protocol.rst
Doc/library/asyncio-task.rst
Doc/library/bdb.rst
Doc/library/bz2.rst
Doc/library/concurrent.futures.rst
Doc/library/ctypes.rst
Doc/library/curses.rst
Doc/library/datetime.rst
Doc/library/decimal.rst
Doc/library/dis.rst
Doc/library/email.compat32-message.rst
Doc/library/email.headerregistry.rst
Doc/library/fractions.rst
Doc/library/hashlib.rst
Doc/library/io.rst
Doc/library/lzma.rst
Doc/library/os.rst
Doc/library/select.rst
Doc/library/socket.rst
Doc/library/statistics.rst
Doc/library/sys.rst
Doc/library/unittest.mock-examples.rst
Doc/library/xml.dom.minidom.rst
Doc/library/xmlrpc.client.rst
Doc/library/xmlrpc.server.rst
Doc/reference/expressions.rst
Doc/reference/import.rst
Doc/reference/simple_stmts.rst
Doc/requirements.txt
Doc/using/configure.rst
Doc/using/unix.rst
Doc/using/windows.rst
Doc/whatsnew/2.6.rst
Doc/whatsnew/2.7.rst
Doc/whatsnew/3.10.rst
Doc/whatsnew/3.11.rst
Doc/whatsnew/3.12.rst
Doc/whatsnew/3.2.rst
Doc/whatsnew/3.3.rst
Doc/whatsnew/3.5.rst
Doc/whatsnew/3.6.rst
Doc/whatsnew/3.7.rst
Doc/whatsnew/3.9.rst
Misc/NEWS.d/next/Core and Builtins/2022-10-01-08-55-09.gh-issue-97591.pw6kkH.rst
Misc/NEWS.d/next/Documentation/2022-09-01-17-03-04.gh-issue-96432.1EJ1-4.rst
Misc/NEWS.d/next/Library/2022-05-09-21-31-41.gh-issue-92445.tJosdm.rst
Misc/NEWS.d/next/Library/2022-07-06-14-57-33.gh-issue-94619.PRqKVX.rst

index 513ef93a3842029599950995e2a7fa2b52f6d1fa..9b7383373e98413f0f6feff2f39ec1f6461d0f5e 100644 (file)
@@ -1929,7 +1929,7 @@ is not possible due to its implementation being opaque at build time.
    Free the given *key* allocated by :c:func:`PyThread_tss_alloc`, after
    first calling :c:func:`PyThread_tss_delete` to ensure any associated
    thread locals have been unassigned. This is a no-op if the *key*
-   argument is `NULL`.
+   argument is ``NULL``.
 
    .. note::
       A freed key becomes a dangling pointer. You should reset the key to
index deb5502a4dff9e8e7a3465fd3e3c1d9c7dea52e9..1dc05001adfa374784997d6ac6cd6028cced81db 100644 (file)
@@ -40,7 +40,7 @@ Type Objects
 .. c:function:: unsigned long PyType_GetFlags(PyTypeObject* type)
 
    Return the :c:member:`~PyTypeObject.tp_flags` member of *type*. This function is primarily
-   meant for use with `Py_LIMITED_API`; the individual flag bits are
+   meant for use with ``Py_LIMITED_API``; the individual flag bits are
    guaranteed to be stable across Python releases, but access to
    :c:member:`~PyTypeObject.tp_flags` itself is not part of the limited API.
 
index 52388fca5cdbcab7296fbffcbae7cee6530e74d0..ccdc9bf02b1c7b0dbe6bae61511e67c92a963181 100644 (file)
@@ -155,7 +155,7 @@ Why can't I use an assignment in an expression?
 
 Starting in Python 3.8, you can!
 
-Assignment expressions using the walrus operator `:=` assign a variable in an
+Assignment expressions using the walrus operator ``:=`` assign a variable in an
 expression::
 
    while chunk := fp.read(200):
index 376934a0e7936510f3507e58936cc69fdb2d3403..03f05657997cfda39af90d68a1ca76e4eb5f194f 100644 (file)
@@ -1109,7 +1109,7 @@ Enum Classes
 The :class:`EnumType` metaclass is responsible for providing the
 :meth:`__contains__`, :meth:`__dir__`, :meth:`__iter__` and other methods that
 allow one to do things with an :class:`Enum` class that fail on a typical
-class, such as `list(Color)` or `some_enum_var in Color`.  :class:`EnumType` is
+class, such as ``list(Color)`` or ``some_enum_var in Color``.  :class:`EnumType` is
 responsible for ensuring that various other methods on the final :class:`Enum`
 class are correct (such as :meth:`__new__`, :meth:`__getnewargs__`,
 :meth:`__str__` and :meth:`__repr__`).
index ff7ba0789608ff7c01385b9c518e1e20a25c3d48..913502eba764348c08d18dedbc6e7ab875ff8798 100644 (file)
@@ -562,7 +562,7 @@ To run a logging listener in production, you may need to use a process-managemen
 such as `Supervisor <http://supervisord.org/>`_. `Here
 <https://gist.github.com/vsajip/4b227eeec43817465ca835ca66f75e2b>`_ is a Gist which
 provides the bare-bones files to run the above functionality using Supervisor: you
-will need to change the `/path/to/` parts in the Gist to reflect the actual paths you
+will need to change the ``/path/to/`` parts in the Gist to reflect the actual paths you
 want to use.
 
 
@@ -2774,7 +2774,7 @@ Formatting times using UTC (GMT) via configuration
 --------------------------------------------------
 
 Sometimes you want to format times using UTC, which can be done using a class
-such as `UTCFormatter`, shown below::
+such as ``UTCFormatter``, shown below::
 
     import logging
     import time
index 0caff13bd15d82f4eaae20371dca2a0b539a42fe..145449b2dfbd9fc35083237add093bae938c4451 100644 (file)
@@ -555,14 +555,14 @@ raw message.  If there is no date format string, the default date format is:
 
     %Y-%m-%d %H:%M:%S
 
-with the milliseconds tacked on at the end. The ``style`` is one of `%`, '{'
-or '$'. If one of these is not specified, then '%' will be used.
+with the milliseconds tacked on at the end. The ``style`` is one of ``'%'``,
+``'{'``, or ``'$'``. If one of these is not specified, then ``'%'`` will be used.
 
-If the ``style`` is '%', the message format string uses
+If the ``style`` is ``'%'``, the message format string uses
 ``%(<dictionary key>)s`` styled string substitution; the possible keys are
-documented in :ref:`logrecord-attributes`. If the style is '{', the message
+documented in :ref:`logrecord-attributes`. If the style is ``'{'``, the message
 format string is assumed to be compatible with :meth:`str.format` (using
-keyword arguments), while if the style is '$' then the message format string
+keyword arguments), while if the style is ``'$'`` then the message format string
 should conform to what is expected by :meth:`string.Template.substitute`.
 
 .. versionchanged:: 3.2
index ed8de888b3bc21a59d8c0ebb12f067481e4addef..387fb3ff89356150d8b8cf4bde5439f0bf763e7c 100644 (file)
@@ -151,7 +151,7 @@ Enabling perf profiling mode
 ----------------------------
 
 There are two main ways to activate the perf profiling mode. If you want it to be
-active since the start of the Python interpreter, you can use the `-Xperf` option:
+active since the start of the Python interpreter, you can use the ``-Xperf`` option:
 
     $ python -Xperf my_script.py
 
index 3fc670b191424d77a9ec91503eefe3a2ce66a416..ab581d785ef7f041f83466f573811472af78b26d 100644 (file)
@@ -765,7 +765,7 @@ And on Windows, the configuration files are:
 +--------------+-------------------------------------------------+-------+
 
 On all platforms, the "personal" file can be temporarily disabled by
-passing the `--no-user-cfg` option.
+passing the ``--no-user-cfg`` option.
 
 Notes:
 
index 8b67f4b8957ef6bb38caa856c7832acdeaa7ca56..969354ceb163b5883e2f01fd8fd70427e5a9ab63 100644 (file)
@@ -553,7 +553,7 @@ accept factories that return streaming protocols.
    a connection is open.
 
    However, :meth:`protocol.eof_received() <Protocol.eof_received>`
-   is called at most once.  Once `eof_received()` is called,
+   is called at most once.  Once ``eof_received()`` is called,
    ``data_received()`` is not called anymore.
 
 .. method:: Protocol.eof_received()
index 9c17dc6397365fddfa3508a01408cf92030b28fe..fb6d23fda03e41df4f6f54395b6489dbd07d1f38 100644 (file)
@@ -631,7 +631,7 @@ Timeouts
 
             Change the time the timeout will trigger.
 
-            If *when* is `None`, any current deadline will be removed, and the
+            If *when* is ``None``, any current deadline will be removed, and the
             context manager will wait indefinitely.
 
             If *when* is a float, it is set as the new deadline.
@@ -867,17 +867,17 @@ Running in Threads
        # blocking_io complete at 19:50:54
        # finished main at 19:50:54
 
-   Directly calling `blocking_io()` in any coroutine would block the event loop
+   Directly calling ``blocking_io()`` in any coroutine would block the event loop
    for its duration, resulting in an additional 1 second of run time. Instead,
-   by using `asyncio.to_thread()`, we can run it in a separate thread without
+   by using ``asyncio.to_thread()``, we can run it in a separate thread without
    blocking the event loop.
 
    .. note::
 
-      Due to the :term:`GIL`, `asyncio.to_thread()` can typically only be used
+      Due to the :term:`GIL`, ``asyncio.to_thread()`` can typically only be used
       to make IO-bound functions non-blocking. However, for extension modules
       that release the GIL or alternative Python implementations that don't
-      have one, `asyncio.to_thread()` can also be used for CPU-bound functions.
+      have one, ``asyncio.to_thread()`` can also be used for CPU-bound functions.
 
    .. versionadded:: 3.9
 
index 7b74bbd652be3890a3dc577612250e283884f052..d201dc963b599506b26dc5bb9ba078c82f208eec 100644 (file)
@@ -143,7 +143,7 @@ The :mod:`bdb` module also defines two classes:
 
       For real file names, the canonical form is an operating-system-dependent,
       :func:`case-normalized <os.path.normcase>` :func:`absolute path
-      <os.path.abspath>`. A *filename* with angle brackets, such as `"<stdin>"`
+      <os.path.abspath>`. A *filename* with angle brackets, such as ``"<stdin>"``
       generated in interactive mode, is returned unchanged.
 
    .. method:: reset()
index 999892e95f47152ba3d3bc526a6933552194a102..ae5a1598f84b44e61f52c97348c4d0fb3e7e622b 100644 (file)
@@ -206,7 +206,7 @@ Incremental (de)compression
       will be set to ``True``.
 
       Attempting to decompress data after the end of stream is reached
-      raises an `EOFError`.  Any data found after the end of the
+      raises an :exc:`EOFError`.  Any data found after the end of the
       stream is ignored and saved in the :attr:`~.unused_data` attribute.
 
       .. versionchanged:: 3.5
@@ -303,7 +303,7 @@ Using :class:`BZ2Compressor` for incremental compression:
     >>> out = out + comp.flush()
 
 The example above uses a very "nonrandom" stream of data
-(a stream of `b"z"` chunks).  Random data tends to compress poorly,
+(a stream of ``b"z"`` chunks).  Random data tends to compress poorly,
 while ordered, repetitive data usually yields a high compression ratio.
 
 Writing and reading a bzip2-compressed file in binary mode:
index 95c9e50991423f9026a13938d7701c75d4437809..8106cc235e5a3c027ae965feab84c5f1d0fe0a90 100644 (file)
@@ -152,7 +152,7 @@ And::
 
    All threads enqueued to ``ThreadPoolExecutor`` will be joined before the
    interpreter can exit. Note that the exit handler which does this is
-   executed *before* any exit handlers added using `atexit`. This means
+   executed *before* any exit handlers added using ``atexit``. This means
    exceptions in the main thread must be caught and handled in order to
    signal threads to exit gracefully. For this reason, it is recommended
    that ``ThreadPoolExecutor`` not be used for long-running tasks.
@@ -411,13 +411,13 @@ The :class:`Future` class encapsulates the asynchronous execution of a callable.
        tests.
 
        If the method returns ``False`` then the :class:`Future` was cancelled,
-       i.e. :meth:`Future.cancel` was called and returned `True`.  Any threads
+       i.e. :meth:`Future.cancel` was called and returned ``True``.  Any threads
        waiting on the :class:`Future` completing (i.e. through
        :func:`as_completed` or :func:`wait`) will be woken up.
 
        If the method returns ``True`` then the :class:`Future` was not cancelled
        and has been put in the running state, i.e. calls to
-       :meth:`Future.running` will return `True`.
+       :meth:`Future.running` will return ``True``.
 
        This method can only be called once and cannot be called after
        :meth:`Future.set_result` or :meth:`Future.set_exception` have been
index 4b6b26c991fd38c67f835a361633caf70af429eb..0351ec970be0b8fd9124316249a2d8eb06538683 100644 (file)
@@ -1948,7 +1948,7 @@ Utility functions
 .. function:: GetLastError()
 
    Windows only: Returns the last error code set by Windows in the calling thread.
-   This function calls the Windows `GetLastError()` function directly,
+   This function calls the Windows ``GetLastError()`` function directly,
    it does not return the ctypes-private copy of the error code.
 
 .. function:: get_errno()
index bb203c48f19ffb472d71252175b997673eab0634..bf4e69a0170a62c6e1e8ee8fefbce38aea36c82c 100644 (file)
@@ -275,7 +275,7 @@ The module :mod:`curses` defines the following functions:
    Change the definition of a color, taking the number of the color to be changed
    followed by three RGB values (for the amounts of red, green, and blue
    components).  The value of *color_number* must be between ``0`` and
-   `COLORS - 1`.  Each of *r*, *g*, *b*, must be a value between ``0`` and
+   ``COLORS - 1``.  Each of *r*, *g*, *b*, must be a value between ``0`` and
    ``1000``.  When :func:`init_color` is used, all occurrences of that color on the
    screen immediately change to the new definition.  This function is a no-op on
    most terminals; it is active only if :func:`can_change_color` returns ``True``.
index c3a66a4674b10ac9f5fb46227c6a863864630ec6..f7e2bb3f3c6de333045bcbeb1c442e9626784e16 100644 (file)
@@ -1769,7 +1769,7 @@ Other constructor:
    ISO 8601 format, with the following exceptions:
 
    1. Time zone offsets may have fractional seconds.
-   2. The leading `T`, normally required in cases where there may be ambiguity between
+   2. The leading ``T``, normally required in cases where there may be ambiguity between
       a date and a time, is not required.
    3. Fractional seconds may have any number of digits (anything beyond 6 will
       be truncated).
@@ -2265,7 +2265,7 @@ where historical changes have been made to civil time.
   two digits of ``offset.hours`` and ``offset.minutes`` respectively.
 
   .. versionchanged:: 3.6
-     Name generated from ``offset=timedelta(0)`` is now plain `'UTC'`, not
+     Name generated from ``offset=timedelta(0)`` is now plain ``'UTC'``, not
      ``'UTC+00:00'``.
 
 
index b7e836308fa8aab167415d078c922313eaac6d1a..260108136df7f119579141216826009756d31641 100644 (file)
@@ -576,11 +576,11 @@ Decimal objects
       Alternative constructor that only accepts instances of :class:`float` or
       :class:`int`.
 
-      Note `Decimal.from_float(0.1)` is not the same as `Decimal('0.1')`.
+      Note ``Decimal.from_float(0.1)`` is not the same as ``Decimal('0.1')``.
       Since 0.1 is not exactly representable in binary floating point, the
       value is stored as the nearest representable value which is
-      `0x1.999999999999ap-4`.  That equivalent value in decimal is
-      `0.1000000000000000055511151231257827021181583404541015625`.
+      ``0x1.999999999999ap-4``.  That equivalent value in decimal is
+      ``0.1000000000000000055511151231257827021181583404541015625``.
 
       .. note:: From Python 3.2 onwards, a :class:`Decimal` instance
          can also be constructed directly from a :class:`float`.
@@ -1209,7 +1209,7 @@ In addition to the three supplied contexts, new contexts can be created with the
 
    .. method:: exp(x)
 
-      Returns `e ** x`.
+      Returns ``e ** x``.
 
 
    .. method:: fma(x, y, z)
index 47e4bf6007217010cf1d3ad6cac88c1605f0c4c9..30a336197c397d66cc7c84bd542d5047b3be668b 100644 (file)
@@ -367,7 +367,7 @@ details of bytecode instructions as :class:`Instruction` instances:
 
 .. class:: Positions
 
-   In case the information is not available, some fields might be `None`.
+   In case the information is not available, some fields might be ``None``.
 
    .. data:: lineno
    .. data:: end_lineno
index 4eaa9d588ca35e28cb9e2d2fe54d01b2bbd706e7..5bef155a4af3103a1a610e281290cf8f2770bde4 100644 (file)
@@ -298,7 +298,7 @@ Here are the methods of the :class:`Message` class:
    In a model generated from bytes, any header values that (in contravention of
    the RFCs) contain non-ASCII bytes will, when retrieved through this
    interface, be represented as :class:`~email.header.Header` objects with
-   a charset of `unknown-8bit`.
+   a charset of ``unknown-8bit``.
 
 
    .. method:: __len__()
index 98527cea43da2a3b6b3c60776811755736152c63..00a954e0307ea640d03ca2c0a0b3c7c814dc7f94 100644 (file)
@@ -153,7 +153,7 @@ headers.
       specified as ``-0000`` (indicating it is in UTC but contains no
       information about the source timezone), then :attr:`.datetime` will be a
       naive :class:`~datetime.datetime`.  If a specific timezone offset is
-      found (including `+0000`), then :attr:`.datetime` will contain an aware
+      found (including ``+0000``), then :attr:`.datetime` will contain an aware
       ``datetime`` that uses :class:`datetime.timezone` to record the timezone
       offset.
 
index 3751800b3b11189430d884cb663dfbb2d6f39f5b..c46d88b2297aa1645ccf524ca46db2245aa65946 100644 (file)
@@ -99,7 +99,7 @@ another rational number, or from a string.
       ``typing.SupportsInt`` instance checks.
 
    .. versionchanged:: 3.12
-      Space is allowed around the slash for string inputs: `Fraction('2 / 3')`.
+      Space is allowed around the slash for string inputs: ``Fraction('2 / 3')``.
 
    .. attribute:: numerator
 
index 386541acf510ac19ae94721c0f1eb975d79e1099..8e47312fe77bf57a1f37bbc671296eee4513d102 100644 (file)
@@ -426,7 +426,7 @@ Constructor functions also accept the following tree hashing parameters:
   BLAKE2s, 0 in sequential mode).
 
 * *last_node*: boolean indicating whether the processed node is the last
-  one (`False` for sequential mode).
+  one (``False`` for sequential mode).
 
 .. figure:: hashlib-blake2-tree.png
    :alt: Explanation of tree mode parameters.
index 8fd6b3537019aa96efba28c0ac60ac62eb1a81ab..0968509fbafec29b5584f38e8fc9ff2938521f61 100644 (file)
@@ -1055,10 +1055,10 @@ Text I/O
    The initial value of the buffer can be set by providing *initial_value*.
    If newline translation is enabled, newlines will be encoded as if by
    :meth:`~TextIOBase.write`.  The stream is positioned at the start of the
-   buffer which emulates opening an existing file in a `w+` mode, making it
+   buffer which emulates opening an existing file in a ``w+`` mode, making it
    ready for an immediate write from the beginning or for a write that
-   would overwrite the initial value.  To emulate opening a file in an `a+`
-   mode ready for appending, use `f.seek(0, io.SEEK_END)` to reposition the
+   would overwrite the initial value.  To emulate opening a file in an ``a+``
+   mode ready for appending, use ``f.seek(0, io.SEEK_END)`` to reposition the
    stream at the end of the buffer.
 
    The *newline* argument works like that of :class:`TextIOWrapper`,
index f7aaa0cb30c2a86c6aceab4dddb530560aea2582..a9311f2a03563fb1690260c7de9f4a3f924715c5 100644 (file)
@@ -258,7 +258,7 @@ Compressing and decompressing data in memory
       will be set to ``True``.
 
       Attempting to decompress data after the end of stream is reached
-      raises an `EOFError`.  Any data found after the end of the
+      raises an :exc:`EOFError`.  Any data found after the end of the
       stream is ignored and saved in the :attr:`~.unused_data` attribute.
 
       .. versionchanged:: 3.5
index cb06dc690b4d074542133a94ed4cfe51e3c4b9d5..23b014b0b65924e9d20e63761978a3c1ac4ef106 100644 (file)
@@ -3194,7 +3194,7 @@ features:
    system records access and modification times; see :func:`~os.stat`. The best
    way to preserve exact times is to use the *st_atime_ns* and *st_mtime_ns*
    fields from the :func:`os.stat` result object with the *ns* parameter to
-   `utime`.
+   :func:`utime`.
 
    This function can support :ref:`specifying a file descriptor <path_fd>`,
    :ref:`paths relative to directory descriptors <dir_fd>` and :ref:`not
@@ -4094,7 +4094,7 @@ written in Python, such as a mail server's external command delivery program.
    library :c:data:`POSIX_SPAWN_RESETIDS` flag.
 
    If the *setsid* argument is ``True``, it will create a new session ID
-   for `posix_spawn`. *setsid* requires :c:data:`POSIX_SPAWN_SETSID`
+   for ``posix_spawn``. *setsid* requires :c:data:`POSIX_SPAWN_SETSID`
    or :c:data:`POSIX_SPAWN_SETSID_NP` flag. Otherwise, :exc:`NotImplementedError`
    is raised.
 
index a8df81f5bd1f0714dee09a6a2ddaac68738aedc4..2890706bab729c59781ba9331e0c54887db326fb 100644 (file)
@@ -61,7 +61,7 @@ The module defines the following:
    events.
 
    *sizehint* informs epoll about the expected number of events to be
-   registered.  It must be positive, or `-1` to use the default. It is only
+   registered.  It must be positive, or ``-1`` to use the default. It is only
    used on older systems where :c:func:`epoll_create1` is not available;
    otherwise it has no effect (though its value is still checked).
 
index ee0c68e3a70779f22343ea726615e34de54002af..3f6cb4803716173e15121a4dfeea05fa887605f8 100644 (file)
@@ -689,7 +689,7 @@ The following functions all create :ref:`socket objects <socket-objects>`.
       When :const:`SOCK_NONBLOCK` or :const:`SOCK_CLOEXEC`
       bit flags are applied to *type* they are cleared, and
       :attr:`socket.type` will not reflect them.  They are still passed
-      to the underlying system `socket()` call.  Therefore,
+      to the underlying system ``socket()`` call.  Therefore,
 
       ::
 
index c3f9c1f5239e8b09db4ef5305a8787c4855978d2..88a887960edb5874e0df4867b2bcbcc311eeae4a 100644 (file)
@@ -839,7 +839,7 @@ of applications in statistics.
        The relative likelihood is computed as the probability of a sample
        occurring in a narrow range divided by the width of the range (hence
        the word "density").  Since the likelihood is relative to other points,
-       its value can be greater than `1.0`.
+       its value can be greater than ``1.0``.
 
     .. method:: NormalDist.cdf(x)
 
index aab3f6aa83fced96b9459dfa51ba309376fe29b3..542b08b1878ed0b1eafe6039a1eda5b53cf66466 100644 (file)
@@ -250,7 +250,7 @@ always available.
    Print low-level information to stderr about the state of CPython's memory
    allocator.
 
-   If Python is `built in debug mode <debug-build>` (:option:`configure
+   If Python is :ref:`built in debug mode <debug-build>` (:option:`configure
    --with-pydebug option <--with-pydebug>`), it also performs some expensive
    internal consistency checks.
 
@@ -349,7 +349,7 @@ always available.
    files to (and read them from) a parallel directory tree rooted at this
    directory, rather than from ``__pycache__`` directories in the source code
    tree. Any ``__pycache__`` directories in the source code tree will be ignored
-   and new `.pyc` files written within the pycache prefix. Thus if you use
+   and new ``.pyc`` files written within the pycache prefix. Thus if you use
    :mod:`compileall` as a pre-build step, you must ensure you run it with the
    same pycache prefix (if any) that you will use at runtime.
 
@@ -874,7 +874,7 @@ always available.
 .. function:: get_asyncgen_hooks()
 
    Returns an *asyncgen_hooks* object, which is similar to a
-   :class:`~collections.namedtuple` of the form `(firstiter, finalizer)`,
+   :class:`~collections.namedtuple` of the form ``(firstiter, finalizer)``,
    where *firstiter* and *finalizer* are expected to be either ``None`` or
    functions which take an :term:`asynchronous generator iterator` as an
    argument, and are used to schedule finalization of an asynchronous
index 054efa81266326bb00da9302643bb1d540c0f15a..f9a207bad6903f440484062dadfc3e5b253ae244 100644 (file)
@@ -1116,7 +1116,7 @@ on first use).
 That aside there is a way to use ``mock`` to affect the results of an import.
 Importing fetches an *object* from the :data:`sys.modules` dictionary. Note that it
 fetches an *object*, which need not be a module. Importing a module for the
-first time results in a module object being put in `sys.modules`, so usually
+first time results in a module object being put in ``sys.modules``, so usually
 when you import something you get a module back. This need not be the case
 however.
 
index 82e5d6aea2310e619da0076a3c5fa483c47603c5..72a7a98c2ac4f212f7b597085b26bfe2352758df 100644 (file)
@@ -148,8 +148,8 @@ module documentation.  This section lists the differences between the API and
    Similarly, explicitly stating the *standalone* argument causes the
    standalone document declarations to be added to the prologue of the XML
    document.
-   If the value is set to `True`, `standalone="yes"` is added,
-   otherwise it is set to `"no"`.
+   If the value is set to ``True``, ``standalone="yes"`` is added,
+   otherwise it is set to ``"no"``.
    Not stating the argument will omit the declaration from the document.
 
    .. versionchanged:: 3.8
index 8b09acd4bd3049100b5e9196d1bdfe86d98359d5..bd2c49a6edab7fa4859ecb83788f2d4b2550a86d 100644 (file)
@@ -60,7 +60,7 @@ between conformable Python objects and XML on the wire.
    may be passed to calls.
    The *headers* parameter is an optional sequence of HTTP headers to send with
    each request, expressed as a sequence of 2-tuples representing the header
-   name and value. (e.g. `[('Header-Name', 'value')]`).
+   name and value. (e.g. ``[('Header-Name', 'value')]``).
    The obsolete *use_datetime* flag is similar to *use_builtin_types* but it
    applies only to date/time values.
 
index 9778a859da1fbf70b7b1a08f211b1964fda85a1c..016369d2b89d2c37f1c9ee12dc2b9232d307f31d 100644 (file)
@@ -263,7 +263,7 @@ This ExampleService demo can be invoked from the command line::
 
 
 The client that interacts with the above server is included in
-`Lib/xmlrpc/client.py`::
+``Lib/xmlrpc/client.py``::
 
     server = ServerProxy("http://localhost:8000")
 
index a661e03b173498310b19d23f7f40d069bb4befd4..11f49a8c33dc88099eec7ba07738e44ef18b5e21 100644 (file)
@@ -1562,7 +1562,7 @@ built-in types.
     true).
 
 * Mappings (instances of :class:`dict`) compare equal if and only if they have
-  equal `(key, value)` pairs. Equality comparison of the keys and values
+  equal ``(key, value)`` pairs. Equality comparison of the keys and values
   enforces reflexivity.
 
   Order comparisons (``<``, ``>``, ``<=``, and ``>=``) raise :exc:`TypeError`.
index b7a53cd0886f290496c8ad2e9a8e07afe8a5f969..3fa875f52e013ef2963785c89b92bc2156ac37b9 100644 (file)
@@ -822,7 +822,7 @@ The path based finder iterates over every entry in the search path, and
 for each of these, looks for an appropriate :term:`path entry finder`
 (:class:`~importlib.abc.PathEntryFinder`) for the
 path entry.  Because this can be an expensive operation (e.g. there may be
-`stat()` call overheads for this search), the path based finder maintains
+``stat()`` call overheads for this search), the path based finder maintains
 a cache mapping path entries to path entry finders.  This cache is maintained
 in :data:`sys.path_importer_cache` (despite the name, this cache actually
 stores finder objects rather than being limited to :term:`importer` objects).
index 8311de0457f6afa62781555342adfd711616b9b1..5c9937fb5b6d72f0276e9fc8b7603d6e5e89ece1 100644 (file)
@@ -994,20 +994,12 @@ The :keyword:`!nonlocal` statement
 .. productionlist:: python-grammar
    nonlocal_stmt: "nonlocal" `identifier` ("," `identifier`)*
 
-.. XXX add when implemented
-                : ["=" (`target_list` "=")+ starred_expression]
-                : | "nonlocal" identifier augop expression_list
-
 The :keyword:`nonlocal` statement causes the listed identifiers to refer to
 previously bound variables in the nearest enclosing scope excluding globals.
 This is important because the default behavior for binding is to search the
 local namespace first.  The statement allows encapsulated code to rebind
 variables outside of the local scope besides the global (module) scope.
 
-.. XXX not implemented
-   The :keyword:`nonlocal` statement may prepend an assignment or augmented
-   assignment, but not an expression.
-
 Names listed in a :keyword:`nonlocal` statement, unlike those listed in a
 :keyword:`global` statement, must refer to pre-existing bindings in an
 enclosing scope (the scope in which a new binding should be created cannot
index 960ac54d7b91ef3d63fe22ccd759c67bc6c1ddc0..7f82dc32113a9d7924a5fb1cbe5e58697e1e1fbc 100644 (file)
@@ -10,7 +10,7 @@ blurb
 # sphinx-lint 0.6.2 yields many default role errors due to the new regular
 # expression used for default role detection, so we don't use the version
 # until the errors are fixed.
-sphinx-lint==0.6.1
+sphinx-lint==0.6.4
 
 # The theme used by the documentation is stored separately, so we need
 # to install that as well.
index ec57c880ee7ad02da73dc86e15a671ac35153241..b99d9bdaa3f007f03d230be4a9f7711e039cef62 100644 (file)
@@ -755,12 +755,12 @@ Compiler flags
 
    In particular, :envvar:`CFLAGS` should not contain:
 
-   * the compiler flag `-I` (for setting the search path for include files).
-     The `-I` flags are processed from left to right, and any flags in
-     :envvar:`CFLAGS` would take precedence over user- and package-supplied `-I`
+   * the compiler flag ``-I`` (for setting the search path for include files).
+     The ``-I`` flags are processed from left to right, and any flags in
+     :envvar:`CFLAGS` would take precedence over user- and package-supplied ``-I``
      flags.
 
-   * hardening flags such as `-Werror` because distributions cannot control
+   * hardening flags such as ``-Werror`` because distributions cannot control
      whether packages installed by users conform to such heightened
      standards.
 
@@ -878,9 +878,9 @@ Linker flags
 
    In particular, :envvar:`LDFLAGS` should not contain:
 
-   * the compiler flag `-L` (for setting the search path for libraries).
-     The `-L` flags are processed from left to right, and any flags in
-     :envvar:`LDFLAGS` would take precedence over user- and package-supplied `-L`
+   * the compiler flag ``-L`` (for setting the search path for libraries).
+     The ``-L`` flags are processed from left to right, and any flags in
+     :envvar:`LDFLAGS` would take precedence over user- and package-supplied ``-L``
      flags.
 
 .. envvar:: CONFIGURE_LDFLAGS_NODIST
index 061cfa5be88f29b2bd872346421caf308d333361..24c02c99f871d56adee38450d64a590b9afe90b0 100644 (file)
@@ -170,7 +170,7 @@ Custom OpenSSL
       $ popd
 
 3. Build Python with custom OpenSSL
-   (see the configure `--with-openssl` and `--with-openssl-rpath` options)
+   (see the configure ``--with-openssl`` and ``--with-openssl-rpath`` options)
 
    .. code-block:: shell-session
 
index 9c339521c3115194e980db51b8d98a12153f1125..b5c2c8ca71204196ad2002cb5861a8d98fd28843 100644 (file)
@@ -216,7 +216,7 @@ of available options is shown below.
 +---------------------------+--------------------------------------+--------------------------+
 | Include_pip               | Install bundled pip and setuptools   | 1                        |
 +---------------------------+--------------------------------------+--------------------------+
-| Include_symbols           | Install debugging symbols (`*`.pdb)  | 0                        |
+| Include_symbols           | Install debugging symbols (``*.pdb``)| 0                        |
 +---------------------------+--------------------------------------+--------------------------+
 | Include_tcltk             | Install Tcl/Tk support and IDLE      | 1                        |
 +---------------------------+--------------------------------------+--------------------------+
index 731ce6aac6919d8df5d9e6d9d124f033c5230557..34f2656f765c7df4473c11ae816d1de4eb5599c6 100644 (file)
@@ -717,13 +717,13 @@ This will produce the output::
 PEP 3101: Advanced String Formatting
 =====================================================
 
-In Python 3.0, the `%` operator is supplemented by a more powerful string
+In Python 3.0, the ``%`` operator is supplemented by a more powerful string
 formatting method, :meth:`format`.  Support for the :meth:`str.format` method
 has been backported to Python 2.6.
 
-In 2.6, both 8-bit and Unicode strings have a `.format()` method that
+In 2.6, both 8-bit and Unicode strings have a ``.format()`` method that
 treats the string as a template and takes the arguments to be formatted.
-The formatting template uses curly brackets (`{`, `}`) as special characters::
+The formatting template uses curly brackets (``{``, ``}``) as special characters::
 
      >>> # Substitute positional argument 0 into the string.
      >>> "User ID: {0}".format("root")
index e8f701d254cd28a8a1b5a857399188cd47b65154..276ab63b97f8a92bf29fcc3dd4af3ec526a89fda 100644 (file)
@@ -2485,8 +2485,8 @@ In the standard library:
 
 * The ElementTree library, :mod:`xml.etree`, no longer escapes
   ampersands and angle brackets when outputting an XML processing
-  instruction (which looks like `<?xml-stylesheet href="#style1"?>`)
-  or comment (which looks like `<!-- comment -->`).
+  instruction (which looks like ``<?xml-stylesheet href="#style1"?>``)
+  or comment (which looks like ``<!-- comment -->``).
   (Patch by Neil Muller; :issue:`2746`.)
 
 * The :meth:`~StringIO.StringIO.readline` method of :class:`~StringIO.StringIO` objects now does
index 428a19453db522c8cd677184468e50667c7d0b66..8beb8b19463f82e5ee1a1555f0b987e9d04a5c84 100644 (file)
@@ -1184,7 +1184,7 @@ and will be incorrect in some rare cases, including some ``_``-s in
 
 New in 3.10 maintenance releases.
 
-Apply syntax highlighting to `.pyi` files. (Contributed by Alex
+Apply syntax highlighting to ``.pyi`` files. (Contributed by Alex
 Waygood and Terry Jan Reedy in :issue:`45447`.)
 
 Include prompts when saving Shell with inputs and outputs.
index 6103da76a34d03eba66886b366b437ad286a56ea..56a35f4e4802ba7e6ceb550c883e30b01a3ac185 100644 (file)
@@ -723,7 +723,7 @@ hashlib
 IDLE and idlelib
 ----------------
 
-* Apply syntax highlighting to `.pyi` files. (Contributed by Alex
+* Apply syntax highlighting to ``.pyi`` files. (Contributed by Alex
   Waygood and Terry Jan Reedy in :issue:`45447`.)
 
 * Include prompts when saving Shell with inputs and outputs.
index d18c31fbe9866eeb29bb685f138d252199847a03..405de11e716b44a026d6480d05083775fa6864f1 100644 (file)
@@ -588,7 +588,7 @@ Porting to Python 3.12
   ``tp_weaklistoffset``, respectively.
   The use of ``tp_dictoffset`` and ``tp_weaklistoffset`` is still
   supported, but does not fully support multiple inheritance
-  (:gh: `95589`), and performance may be worse.
+  (:gh:`95589`), and performance may be worse.
   Classes declaring :const:`Py_TPFLAGS_MANAGED_DICT` should call
   :c:func:`_PyObject_VisitManagedDict` and :c:func:`_PyObject_ClearManagedDict`
   to traverse and clear their instance's dictionaries.
index 65100b0be36a5a08a4f93fb1a66d2b8890f93232..6037db9f954d264e866a368acd8aa82a58622f6e 100644 (file)
@@ -1746,7 +1746,7 @@ names.
   instead of module names for running specific tests (:issue:`10620`).  The new
   test discovery can find tests within packages, locating any test importable
   from the top-level directory.  The top-level directory can be specified with
-  the `-t` option, a pattern for matching files with ``-p``, and a directory to
+  the ``-t`` option, a pattern for matching files with ``-p``, and a directory to
   start discovery with ``-s``:
 
   .. code-block:: shell-session
@@ -1857,7 +1857,7 @@ asyncore
 
 :class:`asyncore.dispatcher` now provides a
 :meth:`~asyncore.dispatcher.handle_accepted()` method
-returning a `(sock, addr)` pair which is called when a connection has actually
+returning a ``(sock, addr)`` pair which is called when a connection has actually
 been established with a new remote endpoint. This is supposed to be used as a
 replacement for old :meth:`~asyncore.dispatcher.handle_accept()` and avoids
 the user  to call :meth:`~asyncore.dispatcher.accept()` directly.
index fef1a8ac4c010137955e456664ff388e9a937b18..96a632577b2c5666a4520048fd716668988d67ea 100644 (file)
@@ -2389,10 +2389,10 @@ Porting Python code
   :attr:`sys.path_importer_cache` where it represents the use of implicit
   finders, but semantically it should not change anything.
 
-* :class:`importlib.abc.Finder` no longer specifies a `find_module()` abstract
+* :class:`importlib.abc.Finder` no longer specifies a ``find_module()`` abstract
   method that must be implemented. If you were relying on subclasses to
   implement that method, make sure to check for the method's existence first.
-  You will probably want to check for `find_loader()` first, though, in the
+  You will probably want to check for ``find_loader()`` first, though, in the
   case of working with :term:`path entry finders <path entry finder>`.
 
 * :mod:`pkgutil` has been converted to use :mod:`importlib` internally. This
index 2c83c7ba3ad3b0f61993f5b38a8c58c45b81ab67..f872579ef546f59577358ba126f540d685628c99 100644 (file)
@@ -2469,11 +2469,11 @@ Changes in the Python API
   ``opt-`` tag in ``.pyc`` file names. The
   :func:`importlib.util.cache_from_source` has gained an *optimization*
   parameter to help control the ``opt-`` tag. Because of this, the
-  *debug_override* parameter of the function is now deprecated. `.pyo` files
+  *debug_override* parameter of the function is now deprecated. ``.pyo`` files
   are also no longer supported as a file argument to the Python interpreter and
   thus serve no purpose when distributed on their own (i.e. sourceless code
   distribution). Due to the fact that the magic number for bytecode has changed
-  in Python 3.5, all old `.pyo` files from previous versions of Python are
+  in Python 3.5, all old ``.pyo`` files from previous versions of Python are
   invalid regardless of this PEP.
 
 * The :mod:`socket` module now exports the :data:`~socket.CAN_RAW_FD_FRAMES`
index dfb56770ae7026570d695d08b503de61f3df7904..9308d1a76fec7a1bf98916001bf38e618640c0e4 100644 (file)
@@ -960,8 +960,8 @@ contextlib
 
 The :class:`contextlib.AbstractContextManager` class has been added to
 provide an abstract base class for context managers.  It provides a
-sensible default implementation for `__enter__()` which returns
-``self`` and leaves `__exit__()` an abstract method.  A matching
+sensible default implementation for ``__enter__()`` which returns
+``self`` and leaves ``__exit__()`` an abstract method.  A matching
 class has been added to the :mod:`typing` module as
 :class:`typing.ContextManager`.
 (Contributed by Brett Cannon in :issue:`25609`.)
@@ -1388,7 +1388,7 @@ are treated as punctuation.
 site
 ----
 
-When specifying paths to add to :attr:`sys.path` in a `.pth` file,
+When specifying paths to add to :attr:`sys.path` in a ``.pth`` file,
 you may now specify file paths on top of directories (e.g. zip files).
 (Contributed by Wolfgang Langner in :issue:`26587`).
 
index f06cf29c713f9939fffeae1da2a8a08eab8915e9..df3b636cb9ec466e7e5936820125b8bc9193fd19 100644 (file)
@@ -2497,7 +2497,7 @@ number of other issues). Some known details affected:
 
 * :c:func:`PySys_AddWarnOptionUnicode` is not currently usable by embedding
   applications due to the requirement to create a Unicode object prior to
-  calling `Py_Initialize`. Use :c:func:`PySys_AddWarnOption` instead.
+  calling ``Py_Initialize``. Use :c:func:`PySys_AddWarnOption` instead.
 
 * warnings filters added by an embedding application with
   :c:func:`PySys_AddWarnOption` should now more consistently take precedence
index ff01a65772991f01f243395df1fb9a19bfd811f6..624e71f9254c457b1120ec3bb1b62bd159ff0101 100644 (file)
@@ -500,7 +500,7 @@ Reedy in :issue:`40468`.)  Move the indent space setting from the Font tab to
 the new Windows tab.  (Contributed by Mark Roseman and Terry Jan Reedy in
 :issue:`33962`.)
 
-Apply syntax highlighting to `.pyi` files. (Contributed by Alex
+Apply syntax highlighting to ``.pyi`` files. (Contributed by Alex
 Waygood and Terry Jan Reedy in :issue:`45447`.)
 
 imaplib
index d3a5867db7fce2cdaffda1647c723d0bf1f94f1f..6f07529f15bba392170d80a9f331a049191497c5 100644 (file)
@@ -1,2 +1,2 @@
-Fixed a missing incref/decref pair in `Exception.__setstate__()`.
+Fixed a missing incref/decref pair in ``Exception.__setstate__()``.
 Patch by Ofey Chan.
index a5858f432932cabadc9b161785fe12e498886ab8..c4d296e626b1b5bf66a111892a4b35965a3ac64d 100644 (file)
@@ -1,2 +1,2 @@
 Fraction literals now support whitespace around the forward slash,
-`Fraction('2 / 3')`.
+``Fraction('2 / 3')``.
index ba69a011601fd065bb2c309380cea82ffd179830..16bad6d34b1c0bb9d3ed1a71d3c31044b05f10ee 100644 (file)
@@ -1,3 +1,3 @@
-Fix a bug in :mod:`argparse` where `nargs="*"` would raise an error instead of returning
+Fix a bug in :mod:`argparse` where ``nargs="*"`` would raise an error instead of returning
 an empty list when 0 arguments were supplied if choice was also defined in
 ``parser.add_argument``.
index a7905034424684197264903297e9d793fc5be4c0..987ea6b045afda2964262d66abee258efb789fb1 100644 (file)
@@ -1 +1 @@
-Remove the long-deprecated `module_repr()` from `importlib`.
+Remove the long-deprecated ``module_repr()`` from :mod:`importlib`.