]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-106861: Docs: Add availability directives to all Unix-only modules (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 31 Oct 2023 16:24:17 +0000 (17:24 +0100)
committerGitHub <noreply@github.com>
Tue, 31 Oct 2023 16:24:17 +0000 (16:24 +0000)
Co-authored-by: xzmeng <aumo@foxmail.com>
Doc/library/fcntl.rst
Doc/library/grp.rst
Doc/library/posix.rst
Doc/library/pty.rst
Doc/library/pwd.rst
Doc/library/resource.rst
Doc/library/syslog.rst
Doc/library/termios.rst
Doc/library/tty.rst

index 1951f80f91e66317aace8712acf4e91c2eb03942..c417a84e048f8aab67e2fb4d0269335e1d27dfd6 100644 (file)
@@ -18,7 +18,7 @@ interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines.  For a
 complete description of these calls, see :manpage:`fcntl(2)` and
 :manpage:`ioctl(2)` Unix manual pages.
 
-.. include:: ../includes/wasm-notavail.rst
+.. availability:: Unix, not Emscripten, not WASI.
 
 All functions in this module take a file descriptor *fd* as their first
 argument.  This can be an integer file descriptor, such as returned by
index 14af744e3ae8f4effb8bbe58f120671af6ea89c4..ee55b12ea8643a161ef6f86b4f95b1234161b2df 100644 (file)
@@ -10,7 +10,7 @@
 This module provides access to the Unix group database. It is available on all
 Unix versions.
 
-.. include:: ../includes/wasm-notavail.rst
+.. availability:: Unix, not Emscripten, not WASI.
 
 Group database entries are reported as a tuple-like object, whose attributes
 correspond to the members of the ``group`` structure (Attribute field below, see
index 0413f9d02a8d57bb39233def592d8c91de910e33..5871574b442667e52bf57210141a419afc27b10c 100644 (file)
@@ -11,6 +11,8 @@ This module provides access to operating system functionality that is
 standardized by the C Standard and the POSIX standard (a thinly disguised Unix
 interface).
 
+.. availability:: Unix.
+
 .. index:: pair: module; os
 
 **Do not import this module directly.**  Instead, import the module :mod:`os`,
index ad4981c97119faf6a0e26f2c95f69b10594f7327..af9378464edb9f69166926f57a7febd405672bcf 100644 (file)
@@ -16,6 +16,8 @@ The :mod:`pty` module defines operations for handling the pseudo-terminal
 concept: starting another process and being able to write to and read from its
 controlling terminal programmatically.
 
+.. availability:: Unix.
+
 Pseudo-terminal handling is highly platform dependent. This code is mainly
 tested on Linux, FreeBSD, and macOS (it is supposed to work on other POSIX
 platforms but it's not been thoroughly tested).
index 7cafc66fd7e93ca6b3bba4ba77546c127a8ec59e..755f0d29ac734508263db121fba609c0e8ee7d72 100644 (file)
@@ -10,7 +10,7 @@
 This module provides access to the Unix user account and password database.  It
 is available on all Unix versions.
 
-.. include:: ../includes/wasm-notavail.rst
+.. availability:: Unix, not Emscripten, not WASI.
 
 Password database entries are reported as a tuple-like object, whose attributes
 correspond to the members of the ``passwd`` structure (Attribute field below,
index a5324c82c634841ee5642138ee0534cebdd4cb9b..ef65674d1b0a787382181abd32f9775a8cd93a96 100644 (file)
@@ -13,7 +13,7 @@
 This module provides basic mechanisms for measuring and controlling system
 resources utilized by a program.
 
-.. include:: ../includes/wasm-notavail.rst
+.. availability:: Unix, not Emscripten, not WASI.
 
 Symbolic constants are used to specify particular system resources and to
 request usage information about either the current process or its children.
index 766ff57cc66d69cc5a30336c4eaa5398f86b942b..889bbb39d582329e6c541a433e8afe4a645f5622 100644 (file)
@@ -11,12 +11,12 @@ This module provides an interface to the Unix ``syslog`` library routines.
 Refer to the Unix manual pages for a detailed description of the ``syslog``
 facility.
 
+.. availability:: Unix, not Emscripten, not WASI.
+
 This module wraps the system ``syslog`` family of routines.  A pure Python
 library that can speak to a syslog server is available in the
 :mod:`logging.handlers` module as :class:`SysLogHandler`.
 
-.. include:: ../includes/wasm-notavail.rst
-
 The module defines the following functions:
 
 
index 03806178e9d3fbd89b6600f1a5f5ab7be8529ad1..57705ddc4e64705f2a92fa109c682c7b42cf29a9 100644 (file)
@@ -16,6 +16,8 @@ complete description of these calls, see :manpage:`termios(3)` Unix manual
 page.  It is only available for those Unix versions that support POSIX
 *termios* style tty I/O control configured during installation.
 
+.. availability:: Unix.
+
 All functions in this module take a file descriptor *fd* as their first
 argument.  This can be an integer file descriptor, such as returned by
 ``sys.stdin.fileno()``, or a :term:`file object`, such as ``sys.stdin`` itself.
index b30bc3c7ac42e9d960925ef06dad3682a429124e..75ba6c4523e5e7e2ed7c8af34fdece2304cd7bfe 100644 (file)
@@ -15,6 +15,8 @@
 The :mod:`tty` module defines functions for putting the tty into cbreak and raw
 modes.
 
+.. availability:: Unix.
+
 Because it requires the :mod:`termios` module, it will work only on Unix.
 
 The :mod:`tty` module defines the following functions: