Skip to content

Commit 808a776

Browse files
gh-115664: Fix ordering of more versionadded and versionchanged directives (GH-116298)
1 parent 40b79ef commit 808a776

22 files changed

+80
-109
lines changed

Doc/c-api/contextvars.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Context Variables Objects
66
-------------------------
77

88
.. _contextvarsobjects_pointertype_change:
9+
.. versionadded:: 3.7
10+
911
.. versionchanged:: 3.7.1
1012

1113
.. note::
@@ -24,8 +26,6 @@ Context Variables Objects
2426
See :issue:`34762` for more details.
2527

2628

27-
.. versionadded:: 3.7
28-
2929
This section details the public C API for the :mod:`contextvars` module.
3030

3131
.. c:type:: PyContext

Doc/c-api/import.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ Importing Modules
308308
309309
The module name, as an ASCII encoded string.
310310
311-
.. c: member:: PyObject* (*initfunc)(void)
311+
.. c:member:: PyObject* (*initfunc)(void)
312312
313313
Initialization function for a module built into the interpreter.
314314

Doc/c-api/init.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,14 +1575,14 @@ pointer and a void pointer argument.
15751575
function is generally **not** suitable for calling Python code from
15761576
arbitrary C threads. Instead, use the :ref:`PyGILState API<gilstate>`.
15771577
1578+
.. versionadded:: 3.1
1579+
15781580
.. versionchanged:: 3.9
15791581
If this function is called in a subinterpreter, the function *func* is
15801582
now scheduled to be called from the subinterpreter, rather than being
15811583
called from the main interpreter. Each subinterpreter now has its own
15821584
list of scheduled calls.
15831585
1584-
.. versionadded:: 3.1
1585-
15861586
.. _profiling:
15871587
15881588
Profiling and Tracing

Doc/c-api/refcounting.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ of Python objects.
2323
2424
Use the :c:func:`Py_SET_REFCNT()` function to set an object reference count.
2525
26-
.. versionchanged:: 3.11
27-
The parameter type is no longer :c:expr:`const PyObject*`.
28-
2926
.. versionchanged:: 3.10
3027
:c:func:`Py_REFCNT()` is changed to the inline static function.
3128
29+
.. versionchanged:: 3.11
30+
The parameter type is no longer :c:expr:`const PyObject*`.
31+
3232
3333
.. c:function:: void Py_SET_REFCNT(PyObject *o, Py_ssize_t refcnt)
3434

Doc/library/asyncio-eventloop.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,9 @@ Opening network connections
605605
The *family*, *proto*, *flags*, *reuse_address*, *reuse_port*,
606606
*allow_broadcast*, and *sock* parameters were added.
607607

608+
.. versionchanged:: 3.8
609+
Added support for Windows.
610+
608611
.. versionchanged:: 3.8.1
609612
The *reuse_address* parameter is no longer supported, as using
610613
:ref:`socket.SO_REUSEADDR <socket-unix-constants>`
@@ -622,9 +625,6 @@ Opening network connections
622625
prevents processes with differing UIDs from assigning sockets to the same
623626
socket address.
624627

625-
.. versionchanged:: 3.8
626-
Added support for Windows.
627-
628628
.. versionchanged:: 3.11
629629
The *reuse_address* parameter, disabled since Python 3.8.1,
630630
3.7.6 and 3.6.10, has been entirely removed.

Doc/library/bz2.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ The :mod:`bz2` module contains:
156156
Support was added for *filename* being a :term:`file object` instead of an
157157
actual filename.
158158

159-
.. versionchanged:: 3.3
160159
The ``'a'`` (append) mode was added, along with support for reading
161160
multi-stream files.
162161

Doc/library/collections.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ superset relationships: ``==``, ``!=``, ``<``, ``<=``, ``>``, ``>=``.
343343
All of those tests treat missing elements as having zero counts so that
344344
``Counter(a=1) == Counter(a=1, b=0)`` returns true.
345345

346-
.. versionadded:: 3.10
346+
.. versionchanged:: 3.10
347347
Rich comparison operations were added.
348348

349349
.. versionchanged:: 3.10

Doc/library/faulthandler.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ Dumping the tracebacks after a timeout
118118

119119
This function is implemented using a watchdog thread.
120120

121-
.. versionchanged:: 3.7
122-
This function is now always available.
123-
124121
.. versionchanged:: 3.5
125122
Added support for passing file descriptor to this function.
126123

124+
.. versionchanged:: 3.7
125+
This function is now always available.
126+
127127
.. function:: cancel_dump_traceback_later()
128128

129129
Cancel the last call to :func:`dump_traceback_later`.

Doc/library/functools.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -667,13 +667,9 @@ The :mod:`functools` module defines the following functions:
667667
on the wrapper function). :exc:`AttributeError` is still raised if the
668668
wrapper function itself is missing any attributes named in *updated*.
669669

670-
.. versionadded:: 3.2
671-
Automatic addition of the ``__wrapped__`` attribute.
672-
673-
.. versionadded:: 3.2
674-
Copying of the ``__annotations__`` attribute by default.
675-
676670
.. versionchanged:: 3.2
671+
The ``__wrapped__`` attribute is now automatically added.
672+
The ``__annotations__`` attribute is now copied by default.
677673
Missing attributes no longer trigger an :exc:`AttributeError`.
678674

679675
.. versionchanged:: 3.4

Doc/library/hashlib.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ accessible by name via :func:`new`. See :data:`algorithms_available`.
7777
SHA3 (Keccak) and SHAKE constructors :func:`sha3_224`, :func:`sha3_256`,
7878
:func:`sha3_384`, :func:`sha3_512`, :func:`shake_128`, :func:`shake_256`
7979
were added.
80-
81-
.. versionadded:: 3.6
8280
:func:`blake2b` and :func:`blake2s` were added.
8381

8482
.. _hashlib-usedforsecurity:

Doc/library/importlib.metadata.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ all the metadata in a JSON-compatible form per :PEP:`566`::
219219
The ``Description`` is now included in the metadata when presented
220220
through the payload. Line continuation characters have been removed.
221221

222-
.. versionadded:: 3.10
223222
The ``json`` attribute was added.
224223

225224

Doc/library/os.rst

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2614,7 +2614,6 @@ features:
26142614
.. versionchanged:: 3.8
26152615
Accepts a :term:`path-like object` and a bytes object on Windows.
26162616

2617-
.. versionchanged:: 3.8
26182617
Added support for directory junctions, and changed to return the
26192618
substitution path (which typically includes ``\\?\`` prefix) rather
26202619
than the optional "print name" field that was previously returned.
@@ -3115,21 +3114,21 @@ features:
31153114

31163115
Time of most recent access expressed in nanoseconds as an integer.
31173116

3118-
.. versionadded: 3.3
3117+
.. versionadded:: 3.3
31193118

31203119
.. attribute:: st_mtime_ns
31213120

31223121
Time of most recent content modification expressed in nanoseconds as an
31233122
integer.
31243123

3125-
.. versionadded: 3.3
3124+
.. versionadded:: 3.3
31263125

31273126
.. attribute:: st_ctime_ns
31283127

31293128
Time of most recent metadata change expressed in nanoseconds as an
31303129
integer.
31313130

3132-
.. versionadded: 3.3
3131+
.. versionadded:: 3.3
31333132

31343133
.. versionchanged:: 3.12
31353134
``st_ctime_ns`` is deprecated on Windows. Use ``st_birthtime_ns``
@@ -3257,10 +3256,10 @@ features:
32573256
Windows now returns the file index as :attr:`st_ino` when
32583257
available.
32593258

3260-
.. versionadded:: 3.7
3259+
.. versionchanged:: 3.7
32613260
Added the :attr:`st_fstype` member to Solaris/derivatives.
32623261

3263-
.. versionadded:: 3.8
3262+
.. versionchanged:: 3.8
32643263
Added the :attr:`st_reparse_tag` member on Windows.
32653264

32663265
.. versionchanged:: 3.8
@@ -3274,16 +3273,13 @@ features:
32743273
platforms, but for now still contains creation time.
32753274
Use :attr:`st_birthtime` for the creation time.
32763275

3277-
.. versionchanged:: 3.12
32783276
On Windows, :attr:`st_ino` may now be up to 128 bits, depending
32793277
on the file system. Previously it would not be above 64 bits, and
32803278
larger file identifiers would be arbitrarily packed.
32813279

3282-
.. versionchanged:: 3.12
32833280
On Windows, :attr:`st_rdev` no longer returns a value. Previously
32843281
it would contain the same as :attr:`st_dev`, which was incorrect.
32853282

3286-
.. versionadded:: 3.12
32873283
Added the :attr:`st_birthtime` member on Windows.
32883284

32893285

@@ -4496,15 +4492,15 @@ written in Python, such as a mail server's external command delivery program.
44964492
On macOS the use of this function is unsafe when mixed with using
44974493
higher-level system APIs, and that includes using :mod:`urllib.request`.
44984494

4495+
.. versionchanged:: 3.8
4496+
Calling ``forkpty()`` in a subinterpreter is no longer supported
4497+
(:exc:`RuntimeError` is raised).
4498+
44994499
.. versionchanged:: 3.12
45004500
If Python is able to detect that your process has multiple
45014501
threads, this now raises a :exc:`DeprecationWarning`. See the
45024502
longer explanation on :func:`os.fork`.
45034503

4504-
.. versionchanged:: 3.8
4505-
Calling ``forkpty()`` in a subinterpreter is no longer supported
4506-
(:exc:`RuntimeError` is raised).
4507-
45084504
.. availability:: Unix, not Emscripten, not WASI.
45094505

45104506

@@ -4719,8 +4715,6 @@ written in Python, such as a mail server's external command delivery program.
47194715

47204716
.. versionchanged:: 3.13
47214717
*env* parameter accepts ``None``.
4722-
4723-
.. versionchanged:: 3.13
47244718
``os.POSIX_SPAWN_CLOSEFROM`` is available on platforms where
47254719
:c:func:`!posix_spawn_file_actions_addclosefrom_np` exists.
47264720

@@ -5708,20 +5702,20 @@ Random numbers
57085702
easy-to-use interface to the random number generator provided by your
57095703
platform, please see :class:`random.SystemRandom`.
57105704

5711-
.. versionchanged:: 3.6.0
5712-
On Linux, ``getrandom()`` is now used in blocking mode to increase the
5713-
security.
5714-
5715-
.. versionchanged:: 3.5.2
5716-
On Linux, if the ``getrandom()`` syscall blocks (the urandom entropy pool
5717-
is not initialized yet), fall back on reading ``/dev/urandom``.
5718-
57195705
.. versionchanged:: 3.5
57205706
On Linux 3.17 and newer, the ``getrandom()`` syscall is now used
57215707
when available. On OpenBSD 5.6 and newer, the C ``getentropy()``
57225708
function is now used. These functions avoid the usage of an internal file
57235709
descriptor.
57245710

5711+
.. versionchanged:: 3.5.2
5712+
On Linux, if the ``getrandom()`` syscall blocks (the urandom entropy pool
5713+
is not initialized yet), fall back on reading ``/dev/urandom``.
5714+
5715+
.. versionchanged:: 3.6
5716+
On Linux, ``getrandom()`` is now used in blocking mode to increase the
5717+
security.
5718+
57255719
.. versionchanged:: 3.11
57265720
On Windows, ``BCryptGenRandom()`` is used instead of ``CryptGenRandom()``
57275721
which is deprecated.

Doc/library/pdb.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,15 +292,15 @@ typed at the debugger prompt. This is particularly useful for aliases. If both
292292
files exist, the one in the home directory is read first and aliases defined there
293293
can be overridden by the local file.
294294

295-
.. versionchanged:: 3.11
296-
:file:`.pdbrc` is now read with ``'utf-8'`` encoding. Previously, it was read
297-
with the system locale encoding.
298-
299295
.. versionchanged:: 3.2
300296
:file:`.pdbrc` can now contain commands that continue debugging, such as
301297
:pdbcmd:`continue` or :pdbcmd:`next`. Previously, these commands had no
302298
effect.
303299

300+
.. versionchanged:: 3.11
301+
:file:`.pdbrc` is now read with ``'utf-8'`` encoding. Previously, it was read
302+
with the system locale encoding.
303+
304304

305305
.. pdbcommand:: h(elp) [command]
306306

Doc/library/stat.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ The following flags can be used in the *flags* argument of :func:`os.chflags`:
354354

355355
All user settable flags.
356356

357-
.. versionadded: 3.13
357+
.. versionadded:: 3.13
358358

359359
.. data:: UF_NODUMP
360360

@@ -384,13 +384,13 @@ The following flags can be used in the *flags* argument of :func:`os.chflags`:
384384

385385
Used for handling document IDs (macOS)
386386

387-
.. versionadded: 3.13
387+
.. versionadded:: 3.13
388388

389389
.. data:: UF_DATAVAULT
390390

391391
The file needs an entitlement for reading or writing (macOS 10.13+)
392392

393-
.. versionadded: 3.13
393+
.. versionadded:: 3.13
394394

395395
.. data:: UF_HIDDEN
396396

@@ -400,23 +400,23 @@ The following flags can be used in the *flags* argument of :func:`os.chflags`:
400400

401401
All super-user changeable flags
402402

403-
.. versionadded: 3.13
403+
.. versionadded:: 3.13
404404

405405
.. data:: SF_SUPPORTED
406406

407407
All super-user supported flags
408408

409409
.. availability:: macOS
410410

411-
.. versionadded: 3.13
411+
.. versionadded:: 3.13
412412

413413
.. data:: SF_SYNTHETIC
414414

415415
All super-user read-only synthetic flags
416416

417417
.. availability:: macOS
418418

419-
.. versionadded: 3.13
419+
.. versionadded:: 3.13
420420

421421
.. data:: SF_ARCHIVED
422422

@@ -434,7 +434,7 @@ The following flags can be used in the *flags* argument of :func:`os.chflags`:
434434

435435
The file needs an entitlement to write to (macOS 10.13+)
436436

437-
.. versionadded: 3.13
437+
.. versionadded:: 3.13
438438

439439
.. data:: SF_NOUNLINK
440440

@@ -448,13 +448,13 @@ The following flags can be used in the *flags* argument of :func:`os.chflags`:
448448

449449
The file is a firmlink (macOS 10.15+)
450450

451-
.. versionadded: 3.13
451+
.. versionadded:: 3.13
452452

453453
.. data:: SF_DATALESS
454454

455455
The file is a dataless object (macOS 10.15+)
456456

457-
.. versionadded: 3.13
457+
.. versionadded:: 3.13
458458

459459
See the \*BSD or macOS systems man page :manpage:`chflags(2)` for more information.
460460

Doc/library/stdtypes.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,8 +1491,7 @@ objects that compare equal might have different :attr:`~range.start`,
14911491
sequence of values they define (instead of comparing based on
14921492
object identity).
14931493

1494-
.. versionadded:: 3.3
1495-
The :attr:`~range.start`, :attr:`~range.stop` and :attr:`~range.step`
1494+
Added the :attr:`~range.start`, :attr:`~range.stop` and :attr:`~range.step`
14961495
attributes.
14971496

14981497
.. seealso::

Doc/library/threading.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,12 +363,12 @@ since it is impossible to detect the termination of alien threads.
363363
base class constructor (``Thread.__init__()``) before doing anything else to
364364
the thread.
365365

366+
.. versionchanged:: 3.3
367+
Added the *daemon* parameter.
368+
366369
.. versionchanged:: 3.10
367370
Use the *target* name if *name* argument is omitted.
368371

369-
.. versionchanged:: 3.3
370-
Added the *daemon* argument.
371-
372372
.. method:: start()
373373

374374
Start the thread's activity.

0 commit comments

Comments
 (0)