Skip to content

Commit be21fb6

Browse files
[3.11] gh-106861: Docs: Add availability directives to all Unix-only modules (GH-108975) (#111554)
Co-authored-by: xzmeng <[email protected]>
1 parent a4aa213 commit be21fb6

File tree

9 files changed

+14
-6
lines changed

9 files changed

+14
-6
lines changed

Doc/library/fcntl.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines. For a
1818
complete description of these calls, see :manpage:`fcntl(2)` and
1919
:manpage:`ioctl(2)` Unix manual pages.
2020

21-
.. include:: ../includes/wasm-notavail.rst
21+
.. availability:: Unix, not Emscripten, not WASI.
2222

2323
All functions in this module take a file descriptor *fd* as their first
2424
argument. This can be an integer file descriptor, such as returned by

Doc/library/grp.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
This module provides access to the Unix group database. It is available on all
1111
Unix versions.
1212

13-
.. include:: ../includes/wasm-notavail.rst
13+
.. availability:: Unix, not Emscripten, not WASI.
1414

1515
Group database entries are reported as a tuple-like object, whose attributes
1616
correspond to the members of the ``group`` structure (Attribute field below, see

Doc/library/posix.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ This module provides access to operating system functionality that is
1111
standardized by the C Standard and the POSIX standard (a thinly disguised Unix
1212
interface).
1313

14+
.. availability:: Unix.
15+
1416
.. index:: pair: module; os
1517

1618
**Do not import this module directly.** Instead, import the module :mod:`os`,

Doc/library/pty.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ The :mod:`pty` module defines operations for handling the pseudo-terminal
1616
concept: starting another process and being able to write to and read from its
1717
controlling terminal programmatically.
1818

19+
.. availability:: Unix.
20+
1921
Pseudo-terminal handling is highly platform dependent. This code is mainly
2022
tested on Linux, FreeBSD, and macOS (it is supposed to work on other POSIX
2123
platforms but it's not been thoroughly tested).

Doc/library/pwd.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
This module provides access to the Unix user account and password database. It
1111
is available on all Unix versions.
1212

13-
.. include:: ../includes/wasm-notavail.rst
13+
.. availability:: Unix, not Emscripten, not WASI.
1414

1515
Password database entries are reported as a tuple-like object, whose attributes
1616
correspond to the members of the ``passwd`` structure (Attribute field below,

Doc/library/resource.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
This module provides basic mechanisms for measuring and controlling system
1414
resources utilized by a program.
1515

16-
.. include:: ../includes/wasm-notavail.rst
16+
.. availability:: Unix, not Emscripten, not WASI.
1717

1818
Symbolic constants are used to specify particular system resources and to
1919
request usage information about either the current process or its children.

Doc/library/syslog.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ This module provides an interface to the Unix ``syslog`` library routines.
1111
Refer to the Unix manual pages for a detailed description of the ``syslog``
1212
facility.
1313

14+
.. availability:: Unix, not Emscripten, not WASI.
15+
1416
This module wraps the system ``syslog`` family of routines. A pure Python
1517
library that can speak to a syslog server is available in the
1618
:mod:`logging.handlers` module as :class:`SysLogHandler`.
1719

18-
.. include:: ../includes/wasm-notavail.rst
19-
2020
The module defines the following functions:
2121

2222

Doc/library/termios.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ complete description of these calls, see :manpage:`termios(3)` Unix manual
1616
page. It is only available for those Unix versions that support POSIX
1717
*termios* style tty I/O control configured during installation.
1818

19+
.. availability:: Unix.
20+
1921
All functions in this module take a file descriptor *fd* as their first
2022
argument. This can be an integer file descriptor, such as returned by
2123
``sys.stdin.fileno()``, or a :term:`file object`, such as ``sys.stdin`` itself.

Doc/library/tty.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
The :mod:`tty` module defines functions for putting the tty into cbreak and raw
1616
modes.
1717

18+
.. availability:: Unix.
19+
1820
Because it requires the :mod:`termios` module, it will work only on Unix.
1921

2022
The :mod:`tty` module defines the following functions:

0 commit comments

Comments
 (0)