]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-115664: Fix ordering of more versionadded and versionchanged directives...
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 7 Mar 2024 08:35:24 +0000 (10:35 +0200)
committerGitHub <noreply@github.com>
Thu, 7 Mar 2024 08:35:24 +0000 (08:35 +0000)
(cherry picked from commit 1e75fe146857b5e6624bd3281675cf20cc356273)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 808a77612fb89b125d25efac2788522a100e8a6d)

19 files changed:
Doc/c-api/contextvars.rst
Doc/c-api/import.rst
Doc/c-api/init.rst
Doc/library/asyncio-eventloop.rst
Doc/library/bz2.rst
Doc/library/collections.rst
Doc/library/faulthandler.rst
Doc/library/functools.rst
Doc/library/hashlib.rst
Doc/library/importlib.metadata.rst
Doc/library/os.rst
Doc/library/pdb.rst
Doc/library/stdtypes.rst
Doc/library/threading.rst
Doc/library/time.rst
Doc/library/urllib.request.rst
Doc/reference/lexical_analysis.rst
Doc/reference/simple_stmts.rst
Doc/using/cmdline.rst

index d970f5443b1df5770b75005e0b86f74bef9e6173..fe7b8f93f2c6cf7a4ea95c8d15474b19aa019a0d 100644 (file)
@@ -6,6 +6,8 @@ Context Variables Objects
 -------------------------
 
 .. _contextvarsobjects_pointertype_change:
+.. versionadded:: 3.7
+
 .. versionchanged:: 3.7.1
 
    .. note::
@@ -24,8 +26,6 @@ Context Variables Objects
       See :issue:`34762` for more details.
 
 
-.. versionadded:: 3.7
-
 This section details the public C API for the :mod:`contextvars` module.
 
 .. c:type:: PyContext
index 61c523285e6be18f75ff1722ec79ebf488b6be67..f046c109e1c7d6661b0adcf31abda7797cc02be1 100644 (file)
@@ -281,7 +281,7 @@ Importing Modules
 
       The module name, as an ASCII encoded string.
 
-   .. c: member:: PyObject* (*initfunc)(void)
+   .. c:member:: PyObject* (*initfunc)(void)
 
       Initialization function for a module built into the interpreter.
 
index 86e6ec3f3cbfce50a690cce102d8471d33bd1b37..2fc3fd1f5b59450561e7fc79bde942df6e05daec 100644 (file)
@@ -1533,14 +1533,14 @@ pointer and a void pointer argument.
       function is generally **not** suitable for calling Python code from
       arbitrary C threads.  Instead, use the :ref:`PyGILState API<gilstate>`.
 
+   .. versionadded:: 3.1
+
    .. versionchanged:: 3.9
       If this function is called in a subinterpreter, the function *func* is
       now scheduled to be called from the subinterpreter, rather than being
       called from the main interpreter. Each subinterpreter now has its own
       list of scheduled calls.
 
-   .. versionadded:: 3.1
-
 .. _profiling:
 
 Profiling and Tracing
index b8c3af0155bb549c0042c591cbc21bb9e7d6b756..a4adb49a58fb368715a9ae3bd2616deb761aad6b 100644 (file)
@@ -588,6 +588,9 @@ Opening network connections
       The *family*, *proto*, *flags*, *reuse_address*, *reuse_port*,
       *allow_broadcast*, and *sock* parameters were added.
 
+   .. versionchanged:: 3.8
+      Added support for Windows.
+
    .. versionchanged:: 3.8.1
       The *reuse_address* parameter is no longer supported, as using
       :ref:`socket.SO_REUSEADDR <socket-unix-constants>`
@@ -605,9 +608,6 @@ Opening network connections
       prevents processes with differing UIDs from assigning sockets to the same
       socket address.
 
-   .. versionchanged:: 3.8
-      Added support for Windows.
-
    .. versionchanged:: 3.11
       The *reuse_address* parameter, disabled since Python 3.8.1,
       3.7.6 and 3.6.10, has been entirely removed.
index 51b1da89683eadd582da33eb3d4b3bdbc1629f24..68220c6c414e4681cedaacd1071f51761880c3dc 100644 (file)
@@ -156,7 +156,6 @@ The :mod:`bz2` module contains:
       Support was added for *filename* being a :term:`file object` instead of an
       actual filename.
 
-   .. versionchanged:: 3.3
       The ``'a'`` (append) mode was added, along with support for reading
       multi-stream files.
 
index 10cd1e8e2f1e1da63db5b8feef7ddc41dff89a1a..2e8b29c9e302ac2ab35d637386f4eb40148cc5ce 100644 (file)
@@ -342,7 +342,7 @@ superset relationships: ``==``, ``!=``, ``<``, ``<=``, ``>``, ``>=``.
 All of those tests treat missing elements as having zero counts so that
 ``Counter(a=1) == Counter(a=1, b=0)`` returns true.
 
-.. versionadded:: 3.10
+.. versionchanged:: 3.10
    Rich comparison operations were added.
 
 .. versionchanged:: 3.10
index b80de69a79a8ab8ce5442e5bd23c1a5df6541cd4..cd780f114bd521cd2d9e94a71694d4c86bb4ab11 100644 (file)
@@ -118,12 +118,12 @@ Dumping the tracebacks after a timeout
 
    This function is implemented using a watchdog thread.
 
-   .. versionchanged:: 3.7
-      This function is now always available.
-
    .. versionchanged:: 3.5
       Added support for passing file descriptor to this function.
 
+   .. versionchanged:: 3.7
+      This function is now always available.
+
 .. function:: cancel_dump_traceback_later()
 
    Cancel the last call to :func:`dump_traceback_later`.
index 76ca6e514952a2e45d7eb64e39aaa566860ec9ed..558d094f6b6c45641d14690bc4f92bc539e52855 100644 (file)
@@ -650,13 +650,9 @@ The :mod:`functools` module defines the following functions:
    on the wrapper function). :exc:`AttributeError` is still raised if the
    wrapper function itself is missing any attributes named in *updated*.
 
-   .. versionadded:: 3.2
-      Automatic addition of the ``__wrapped__`` attribute.
-
-   .. versionadded:: 3.2
-      Copying of the ``__annotations__`` attribute by default.
-
    .. versionchanged:: 3.2
+      The ``__wrapped__`` attribute is now automatically added.
+      The ``__annotations__`` attribute is now copied by default.
       Missing attributes no longer trigger an :exc:`AttributeError`.
 
    .. versionchanged:: 3.4
index 45f911ca58373d3ae4a52f0b1a744360ee2075ba..87d6b5dd195b725ad090914d35a1f3ab1343e3f7 100644 (file)
@@ -77,8 +77,6 @@ accessible by name via :func:`new`.  See :data:`algorithms_available`.
    SHA3 (Keccak) and SHAKE constructors :func:`sha3_224`, :func:`sha3_256`,
    :func:`sha3_384`, :func:`sha3_512`, :func:`shake_128`, :func:`shake_256`
    were added.
-
-.. versionadded:: 3.6
    :func:`blake2b` and :func:`blake2s` were added.
 
 .. _hashlib-usedforsecurity:
index 3566f7468f10870f18aa8ae18582fca71d2a459c..0c4f1dae4967258437f67cac037a7384d1ddead7 100644 (file)
@@ -218,7 +218,6 @@ all the metadata in a JSON-compatible form per :PEP:`566`::
    The ``Description`` is now included in the metadata when presented
    through the payload. Line continuation characters have been removed.
 
-.. versionadded:: 3.10
    The ``json`` attribute was added.
 
 
index d0d224aeff2fb4746e330e838b77bc6865a259bb..5fefee382fd8fb3833cbeb88df55cad4409160c4 100644 (file)
@@ -2366,7 +2366,6 @@ features:
    .. versionchanged:: 3.8
       Accepts a :term:`path-like object` and a bytes object on Windows.
 
-   .. versionchanged:: 3.8
       Added support for directory junctions, and changed to return the
       substitution path (which typically includes ``\\?\`` prefix) rather
       than the optional "print name" field that was previously returned.
@@ -2848,14 +2847,14 @@ features:
 
       Time of most recent access expressed in nanoseconds as an integer.
 
-      .. versionadded: 3.3
+      .. versionadded:: 3.3
 
    .. attribute:: st_mtime_ns
 
       Time of most recent content modification expressed in nanoseconds as an
       integer.
 
-      .. versionadded: 3.3
+      .. versionadded:: 3.3
 
    .. attribute:: st_ctime_ns
 
@@ -2865,7 +2864,7 @@ features:
       * the time of creation on Windows, expressed in nanoseconds as an
         integer.
 
-      .. versionadded: 3.3
+      .. versionadded:: 3.3
 
    .. note::
 
@@ -2975,10 +2974,10 @@ features:
       Windows now returns the file index as :attr:`st_ino` when
       available.
 
-   .. versionadded:: 3.7
+   .. versionchanged:: 3.7
       Added the :attr:`st_fstype` member to Solaris/derivatives.
 
-   .. versionadded:: 3.8
+   .. versionchanged:: 3.8
       Added the :attr:`st_reparse_tag` member on Windows.
 
    .. versionchanged:: 3.8
@@ -5121,20 +5120,20 @@ Random numbers
       easy-to-use interface to the random number generator provided by your
       platform, please see :class:`random.SystemRandom`.
 
-   .. versionchanged:: 3.6.0
-      On Linux, ``getrandom()`` is now used in blocking mode to increase the
-      security.
-
-   .. versionchanged:: 3.5.2
-      On Linux, if the ``getrandom()`` syscall blocks (the urandom entropy pool
-      is not initialized yet), fall back on reading ``/dev/urandom``.
-
    .. versionchanged:: 3.5
       On Linux 3.17 and newer, the ``getrandom()`` syscall is now used
       when available.  On OpenBSD 5.6 and newer, the C ``getentropy()``
       function is now used. These functions avoid the usage of an internal file
       descriptor.
 
+   .. versionchanged:: 3.5.2
+      On Linux, if the ``getrandom()`` syscall blocks (the urandom entropy pool
+      is not initialized yet), fall back on reading ``/dev/urandom``.
+
+   .. versionchanged:: 3.6
+      On Linux, ``getrandom()`` is now used in blocking mode to increase the
+      security.
+
    .. versionchanged:: 3.11
       On Windows, ``BCryptGenRandom()`` is used instead of ``CryptGenRandom()``
       which is deprecated.
index e9ad7af8b1f3cf3e24b984c46672ea946df8e61b..a845d5512ff1e531a4b55151a26867eb54e5172a 100644 (file)
@@ -273,15 +273,15 @@ typed at the debugger prompt.  This is particularly useful for aliases.  If both
 files exist, the one in the home directory is read first and aliases defined there
 can be overridden by the local file.
 
-.. versionchanged:: 3.11
-   :file:`.pdbrc` is now read with ``'utf-8'`` encoding. Previously, it was read
-   with the system locale encoding.
-
 .. versionchanged:: 3.2
    :file:`.pdbrc` can now contain commands that continue debugging, such as
    :pdbcmd:`continue` or :pdbcmd:`next`.  Previously, these commands had no
    effect.
 
+.. versionchanged:: 3.11
+   :file:`.pdbrc` is now read with ``'utf-8'`` encoding. Previously, it was read
+   with the system locale encoding.
+
 
 .. pdbcommand:: h(elp) [command]
 
index b5bbff077f030e403e2941dc978e6d605cddbf2d..c7369c0cf0a1bab1e74b794d255629ff5a505279 100644 (file)
@@ -1451,8 +1451,7 @@ objects that compare equal might have different :attr:`~range.start`,
    sequence of values they define (instead of comparing based on
    object identity).
 
-.. versionadded:: 3.3
-   The :attr:`~range.start`, :attr:`~range.stop` and :attr:`~range.step`
+   Added the :attr:`~range.start`, :attr:`~range.stop` and :attr:`~range.step`
    attributes.
 
 .. seealso::
index 180fe3b8988bb059e7c029680cbab716823fe534..ecf0397390d13f19ba52d6f092e16115bbc84aee 100644 (file)
@@ -342,12 +342,12 @@ since it is impossible to detect the termination of alien threads.
    base class constructor (``Thread.__init__()``) before doing anything else to
    the thread.
 
+   .. versionchanged:: 3.3
+      Added the *daemon* parameter.
+
    .. versionchanged:: 3.10
       Use the *target* name if *name* argument is omitted.
 
-   .. versionchanged:: 3.3
-      Added the *daemon* argument.
-
    .. method:: start()
 
       Start the thread's activity.
index da6383ed505d07d6ac9600c0cca3aae4364d37cc..ab99314683626bb33e0431b57286d78508c16130 100644 (file)
@@ -381,15 +381,14 @@ Functions
    * Or use ``nanosleep()`` if available (resolution: 1 nanosecond);
    * Or use ``select()`` (resolution: 1 microsecond).
 
-   .. versionchanged:: 3.11
-      On Unix, the ``clock_nanosleep()`` and ``nanosleep()`` functions are now
-      used if available. On Windows, a waitable timer is now used.
-
    .. versionchanged:: 3.5
       The function now sleeps at least *secs* even if the sleep is interrupted
       by a signal, except if the signal handler raises an exception (see
       :pep:`475` for the rationale).
 
+   .. versionchanged:: 3.11
+      On Unix, the ``clock_nanosleep()`` and ``nanosleep()`` functions are now
+      used if available. On Windows, a waitable timer is now used.
 
 .. index::
    single: % (percent); datetime format
index 3751e81ecfcc811332b9581b71966e0bce8e56de..c6fc325cfd92cf6130ea82523b0145f78a04a072 100644 (file)
@@ -105,11 +105,9 @@ The :mod:`urllib.request` module defines the following functions:
    .. versionchanged:: 3.2
       *cafile* and *capath* were added.
 
-   .. versionchanged:: 3.2
       HTTPS virtual hosts are now supported if possible (that is, if
       :const:`ssl.HAS_SNI` is true).
 
-   .. versionadded:: 3.2
       *data* can be an iterable object.
 
    .. versionchanged:: 3.3
index 384b854a98712686dfd908b2328b453222628eb3..6cfe2b3d4f74ca5d9bbf83ae60a1996878085da6 100644 (file)
@@ -508,7 +508,6 @@ is not supported.
    The ``'rb'`` prefix of raw bytes literals has been added as a synonym
    of ``'br'``.
 
-.. versionadded:: 3.3
    Support for the unicode legacy literal (``u'value'``) was reintroduced
    to simplify the maintenance of dual Python 2.x and 3.x codebases.
    See :pep:`414` for more information.
index 1a94a94e46776ed80042f7d42c7445d2519b118f..5a315f71daced72510f89d8f60bf2b6c2e75f254 100644 (file)
@@ -663,8 +663,7 @@ and information about handling exceptions is in section :ref:`try`.
 .. versionchanged:: 3.3
     :const:`None` is now permitted as ``Y`` in ``raise X from Y``.
 
-.. versionadded:: 3.3
-    The :attr:`~BaseException.__suppress_context__` attribute to suppress
+    Added the :attr:`~BaseException.__suppress_context__` attribute to suppress
     automatic display of the exception context.
 
 .. versionchanged:: 3.11
index 0421b80d3ada9af47c3f3f82be88d48520cdc783..abaf088ac904285795c9b7b91c0ea823b0c0bb03 100644 (file)
@@ -372,11 +372,11 @@ Miscellaneous options
    :envvar:`PYTHONHASHSEED` allows you to set a fixed value for the hash
    seed secret.
 
+   .. versionadded:: 3.2.3
+
    .. versionchanged:: 3.7
       The option is no longer ignored.
 
-   .. versionadded:: 3.2.3
-
 
 .. option:: -s
 
@@ -542,23 +542,22 @@ Miscellaneous options
    It also allows passing arbitrary values and retrieving them through the
    :data:`sys._xoptions` dictionary.
 
-   .. versionchanged:: 3.2
-      The :option:`-X` option was added.
+   .. versionadded:: 3.2
 
-   .. versionadded:: 3.3
-      The ``-X faulthandler`` option.
+   .. versionchanged:: 3.3
+      Added the ``-X faulthandler`` option.
 
-   .. versionadded:: 3.4
-      The ``-X showrefcount`` and ``-X tracemalloc`` options.
+   .. versionchanged:: 3.4
+      Added the ``-X showrefcount`` and ``-X tracemalloc`` options.
 
-   .. versionadded:: 3.6
-      The ``-X showalloccount`` option.
+   .. versionchanged:: 3.6
+      Added the ``-X showalloccount`` option.
 
-   .. versionadded:: 3.7
-      The ``-X importtime``, ``-X dev`` and ``-X utf8`` options.
+   .. versionchanged:: 3.7
+      Added the ``-X importtime``, ``-X dev`` and ``-X utf8`` options.
 
-   .. versionadded:: 3.8
-      The ``-X pycache_prefix`` option. The ``-X dev`` option now logs
+   .. versionchanged:: 3.8
+      Added the ``-X pycache_prefix`` option. The ``-X dev`` option now logs
       ``close()`` exceptions in :class:`io.IOBase` destructor.
 
    .. versionchanged:: 3.9
@@ -567,18 +566,13 @@ Miscellaneous options
 
       The ``-X showalloccount`` option has been removed.
 
-   .. versionadded:: 3.10
-      The ``-X warn_default_encoding`` option.
+   .. versionchanged:: 3.10
+      Added the ``-X warn_default_encoding`` option.
       Removed the ``-X oldparser`` option.
 
-   .. versionadded:: 3.11
-      The ``-X no_debug_ranges`` option.
-
-   .. versionadded:: 3.11
-      The ``-X frozen_modules`` option.
-
-   .. versionadded:: 3.11
-      The ``-X int_max_str_digits`` option.
+   .. versionchanged:: 3.11
+      Added the ``-X no_debug_ranges``, ``-X frozen_modules`` and
+      ``-X int_max_str_digits`` options.
 
 
 Options you shouldn't use
@@ -895,11 +889,11 @@ conflict.
    * ``malloc_debug``: same as ``malloc`` but also install debug hooks.
    * ``pymalloc_debug``: same as ``pymalloc`` but also install debug hooks.
 
+   .. versionadded:: 3.6
+
    .. versionchanged:: 3.7
       Added the ``"default"`` allocator.
 
-   .. versionadded:: 3.6
-
 
 .. envvar:: PYTHONMALLOCSTATS