Skip to content

Commit 9af9ea2

Browse files
authored
[3.11] gh-95415: Make availability directive consistent (GH-95416) (GH-95438)
Co-authored-by: Christian Heimes <[email protected]>
1 parent ad2872f commit 9af9ea2

17 files changed

+207
-100
lines changed

Doc/library/_thread.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ This module defines the following constants and functions:
140140
information (4 KiB pages are common; using multiples of 4096 for the stack size is
141141
the suggested approach in the absence of more specific information).
142142

143-
.. availability:: Windows, systems with POSIX threads.
143+
.. availability:: Windows, pthreads.
144+
145+
Unix platforms with POSIX threads support.
144146

145147

146148
.. data:: TIMEOUT_MAX

Doc/library/codecs.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,7 @@ functions can be used directly if desired.
15301530

15311531
This module implements the ANSI codepage (CP_ACP).
15321532

1533-
.. availability:: Windows only.
1533+
.. availability:: Windows.
15341534

15351535
.. versionchanged:: 3.3
15361536
Support any error handler.

Doc/library/crypt.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ the :manpage:`crypt(3)` routine in the running system. Therefore, any
3636
extensions available on the current implementation will also be available on
3737
this module.
3838

39-
.. availability:: Unix. Not available on VxWorks.
39+
.. availability:: Unix, not VxWorks.
4040

4141
Hashing Methods
4242
---------------

Doc/library/intro.rst

+4
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,7 @@ Notes on availability
6060
* If not separately noted, all functions that claim "Availability: Unix" are
6161
supported on macOS, which builds on a Unix core.
6262

63+
* If an availability note contains both a minimum Kernel version and a minimum
64+
libc version, then both conditions must hold. For example a feature with note
65+
*Availability: Linux >= 3.17 with glibc >= 2.27* requires both Linux 3.17 or
66+
newer and glibc 2.27 or newer.

Doc/library/os.rst

+41-34
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ process and user.
301301
and ``'surrogateescape'`` error handler. Use :func:`os.getenvb` if you
302302
would like to use a different encoding.
303303

304-
.. availability:: most flavors of Unix, Windows.
304+
.. availability:: Unix, Windows.
305305

306306

307307
.. function:: getenvb(key, default=None)
@@ -316,7 +316,7 @@ process and user.
316316
:func:`getenvb` is only available if :data:`supports_bytes_environ`
317317
is ``True``.
318318

319-
.. availability:: most flavors of Unix.
319+
.. availability:: Unix.
320320

321321
.. versionadded:: 3.2
322322

@@ -706,7 +706,7 @@ process and user.
706706
:func:`socket.gethostname` or even
707707
``socket.gethostbyaddr(socket.gethostname())``.
708708

709-
.. availability:: recent flavors of Unix.
709+
.. availability:: Unix.
710710

711711
.. versionchanged:: 3.3
712712
Return type changed from a tuple to a tuple-like object
@@ -810,7 +810,7 @@ as internal buffering of data.
810810
The return value is the amount of bytes copied. This could be less than the
811811
amount requested.
812812

813-
.. availability:: Linux kernel >= 4.5 or glibc >= 2.27.
813+
.. availability:: Linux >= 4.5 with glibc >= 2.27.
814814

815815
.. versionadded:: 3.8
816816

@@ -1150,7 +1150,7 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo
11501150
descriptors are :ref:`non-inheritable <fd_inheritance>`. For a (slightly) more
11511151
portable approach, use the :mod:`pty` module.
11521152

1153-
.. availability:: some flavors of Unix.
1153+
.. availability:: Unix.
11541154

11551155
.. versionchanged:: 3.4
11561156
The new file descriptors are now non-inheritable.
@@ -1176,7 +1176,7 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo
11761176
Return a pair of file descriptors ``(r, w)`` usable for reading and writing,
11771177
respectively.
11781178

1179-
.. availability:: some flavors of Unix.
1179+
.. availability:: Unix.
11801180

11811181
.. versionadded:: 3.3
11821182

@@ -1255,9 +1255,9 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo
12551255

12561256
Combine the functionality of :func:`os.readv` and :func:`os.pread`.
12571257

1258-
.. availability:: Linux 2.6.30 and newer, FreeBSD 6.0 and newer,
1259-
OpenBSD 2.7 and newer, AIX 7.1 and newer. Using flags requires
1260-
Linux 4.6 or newer.
1258+
.. availability:: Linux >= 2.6.30, FreeBSD >= 6.0, OpenBSD >= 2.7, AIX >= 7.1.
1259+
1260+
Using flags requires Linux >= 4.6.
12611261

12621262
.. versionadded:: 3.7
12631263

@@ -1272,7 +1272,7 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo
12721272
If no bytes were read, it will return ``-1`` and set errno to
12731273
:data:`errno.EAGAIN`.
12741274

1275-
.. availability:: Linux 4.14 and newer.
1275+
.. availability:: Linux >= 4.14.
12761276

12771277
.. versionadded:: 3.7
12781278

@@ -1286,7 +1286,7 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo
12861286
Currently, on Linux, this feature is usable only on a file descriptor opened
12871287
using the :data:`O_DIRECT` flag.
12881288

1289-
.. availability:: Linux 4.6 and newer.
1289+
.. availability:: Linux >= 4.6.
12901290

12911291
.. versionadded:: 3.7
12921292

@@ -1325,9 +1325,9 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo
13251325

13261326
Combine the functionality of :func:`os.writev` and :func:`os.pwrite`.
13271327

1328-
.. availability:: Linux 2.6.30 and newer, FreeBSD 6.0 and newer,
1329-
OpenBSD 2.7 and newer, AIX 7.1 and newer. Using flags requires
1330-
Linux 4.7 or newer.
1328+
.. availability:: Linux >= 2.6.30, FreeBSD >= 6.0, OpenBSD >= 2.7, AIX >= 7.1.
1329+
1330+
Using flags requires Linux >= 4.6.
13311331

13321332
.. versionadded:: 3.7
13331333

@@ -1337,7 +1337,7 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo
13371337
Provide a per-write equivalent of the :data:`O_DSYNC` :func:`os.open` flag.
13381338
This flag effect applies only to the data range written by the system call.
13391339

1340-
.. availability:: Linux 4.7 and newer.
1340+
.. availability:: Linux >= 4.7.
13411341

13421342
.. versionadded:: 3.7
13431343

@@ -1347,7 +1347,7 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo
13471347
Provide a per-write equivalent of the :data:`O_SYNC` :func:`os.open` flag.
13481348
This flag effect applies only to the data range written by the system call.
13491349

1350-
.. availability:: Linux 4.7 and newer.
1350+
.. availability:: Linux >= 4.7.
13511351

13521352
.. versionadded:: 3.7
13531353

@@ -1361,7 +1361,7 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo
13611361
appended to the end of the file. However, if the *offset* argument is
13621362
``-1``, the current file *offset* is updated.
13631363

1364-
.. availability:: Linux 4.16 and newer.
1364+
.. availability:: Linux >= 4.16.
13651365

13661366
.. versionadded:: 3.10
13671367

@@ -1481,7 +1481,7 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo
14811481
make sense to block because there are no writers connected to the write end
14821482
of the pipe.
14831483

1484-
.. availability:: Linux kernel >= 2.6.17 and glibc >= 2.5
1484+
.. availability:: Linux >= 2.6.17 with glibc >= 2.5
14851485

14861486
.. versionadded:: 3.10
14871487

@@ -3320,7 +3320,7 @@ features:
33203320
the file descriptor, and as such multiple files can have the same name
33213321
without any side effects.
33223322

3323-
.. availability:: Linux 3.17 or newer with glibc 2.27 or newer.
3323+
.. availability:: Linux >= 3.17 with glibc >= 2.27.
33243324

33253325
.. versionadded:: 3.8
33263326

@@ -3345,8 +3345,9 @@ features:
33453345

33463346
These flags can be passed to :func:`memfd_create`.
33473347

3348-
.. availability:: Linux 3.17 or newer with glibc 2.27 or newer. The
3349-
``MFD_HUGE*`` flags are only available since Linux 4.14.
3348+
.. availability:: Linux >= 3.17 with glibc >= 2.27
3349+
3350+
The ``MFD_HUGE*`` flags are only available since Linux 4.14.
33503351

33513352
.. versionadded:: 3.8
33523353

@@ -3398,7 +3399,7 @@ features:
33983399
finally:
33993400
os.close(fd)
34003401

3401-
.. availability:: Linux 2.6.27 or newer with glibc 2.8 or newer.
3402+
.. availability:: Linux >= 2.6.27 with glibc >= 2.8
34023403

34033404
.. versionadded:: 3.10
34043405

@@ -3407,7 +3408,7 @@ features:
34073408
Read value from an :func:`eventfd` file descriptor and return a 64 bit
34083409
unsigned int. The function does not verify that *fd* is an :func:`eventfd`.
34093410

3410-
.. availability:: See :func:`eventfd`
3411+
.. availability:: Linux >= 2.6.27
34113412

34123413
.. versionadded:: 3.10
34133414

@@ -3416,15 +3417,15 @@ features:
34163417
Add value to an :func:`eventfd` file descriptor. *value* must be a 64 bit
34173418
unsigned int. The function does not verify that *fd* is an :func:`eventfd`.
34183419

3419-
.. availability:: See :func:`eventfd`
3420+
.. availability:: Linux >= 2.6.27
34203421

34213422
.. versionadded:: 3.10
34223423

34233424
.. data:: EFD_CLOEXEC
34243425

34253426
Set close-on-exec flag for new :func:`eventfd` file descriptor.
34263427

3427-
.. availability:: See :func:`eventfd`
3428+
.. availability:: Linux >= 2.6.27
34283429

34293430
.. versionadded:: 3.10
34303431

@@ -3433,7 +3434,7 @@ features:
34333434
Set :const:`O_NONBLOCK` status flag for new :func:`eventfd` file
34343435
descriptor.
34353436

3436-
.. availability:: See :func:`eventfd`
3437+
.. availability:: Linux >= 2.6.27
34373438

34383439
.. versionadded:: 3.10
34393440

@@ -3442,7 +3443,7 @@ features:
34423443
Provide semaphore-like semantics for reads from a :func:`eventfd` file
34433444
descriptor. On read the internal counter is decremented by one.
34443445

3445-
.. availability:: Linux 2.6.30 or newer with glibc 2.8 or newer.
3446+
.. availability:: Linux >= 2.6.30
34463447

34473448
.. versionadded:: 3.10
34483449

@@ -3847,7 +3848,7 @@ written in Python, such as a mail server's external command delivery program.
38473848
Calling ``forkpty()`` in a subinterpreter is no longer supported
38483849
(:exc:`RuntimeError` is raised).
38493850

3850-
.. availability:: some flavors of Unix.
3851+
.. availability:: Unix.
38513852

38523853

38533854
.. function:: kill(pid, sig)
@@ -3904,7 +3905,7 @@ written in Python, such as a mail server's external command delivery program.
39043905

39053906
See the :manpage:`pidfd_open(2)` man page for more details.
39063907

3907-
.. availability:: Linux 5.3+
3908+
.. availability:: Linux >= 5.3
39083909
.. versionadded:: 3.9
39093910

39103911

@@ -4054,7 +4055,9 @@ written in Python, such as a mail server's external command delivery program.
40544055

40554056
.. versionadded:: 3.8
40564057

4057-
.. availability:: See :func:`posix_spawn` documentation.
4058+
.. availability:: POSIX
4059+
4060+
See :func:`posix_spawn` documentation.
40584061

40594062

40604063
.. function:: register_at_fork(*, before=None, after_in_parent=None, \
@@ -4154,7 +4157,9 @@ written in Python, such as a mail server's external command delivery program.
41544157

41554158
.. audit-event:: os.spawn mode,path,args,env os.spawnl
41564159

4157-
.. availability:: Unix, Windows. :func:`spawnlp`, :func:`spawnlpe`, :func:`spawnvp`
4160+
.. availability:: Unix, Windows.
4161+
4162+
:func:`spawnlp`, :func:`spawnlpe`, :func:`spawnvp`
41584163
and :func:`spawnvpe` are not available on Windows. :func:`spawnle` and
41594164
:func:`spawnve` are not thread-safe on Windows; we advise you to use the
41604165
:mod:`subprocess` module instead.
@@ -4358,7 +4363,7 @@ written in Python, such as a mail server's external command delivery program.
43584363
This is a Linux-specific *idtype* that indicates that *id* is a file
43594364
descriptor that refers to a process.
43604365

4361-
.. availability:: Linux 5.4+
4366+
.. availability:: Linux >= 5.4
43624367

43634368
.. versionadded:: 3.9
43644369

@@ -4500,7 +4505,9 @@ written in Python, such as a mail server's external command delivery program.
45004505
This option causes child processes to be reported if they have been continued
45014506
from a job control stop since their status was last reported.
45024507

4503-
.. availability:: some Unix systems.
4508+
.. availability:: Unix.
4509+
4510+
Some Unix systems.
45044511

45054512

45064513
.. data:: WUNTRACED
@@ -4906,7 +4913,7 @@ Random numbers
49064913
See also the `Linux getrandom() manual page
49074914
<http://man7.org/linux/man-pages/man2/getrandom.2.html>`_.
49084915

4909-
.. availability:: Linux 3.17 and newer.
4916+
.. availability:: Linux >= 3.17.
49104917

49114918
.. versionadded:: 3.6
49124919

Doc/library/pipes.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The :mod:`pipes` module defines a class to abstract the concept of a *pipeline*
2323
Because the module uses :program:`/bin/sh` command lines, a POSIX or compatible
2424
shell for :func:`os.system` and :func:`os.popen` is required.
2525

26-
.. availability:: Unix. Not available on VxWorks.
26+
.. availability:: Unix, not VxWorks.
2727

2828
The :mod:`pipes` module defines the following class:
2929

0 commit comments

Comments
 (0)