summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorxzmeng <aumo@foxmail.com>2023-10-31 16:14:27 (GMT)
committerGitHub <noreply@github.com>2023-10-31 16:14:27 (GMT)
commitcf3dbe4c3df40e2d4d572c62623207ce29a9365b (patch)
tree9009ac2cb916d35fd6da3b74582aa3fc6aa3c86e /Doc/library
parent52a5b5d276abb3f3101c0b75b67c1c3f8ee483fe (diff)
downloadcpython-cf3dbe4c3df40e2d4d572c62623207ce29a9365b.zip
cpython-cf3dbe4c3df40e2d4d572c62623207ce29a9365b.tar.gz
cpython-cf3dbe4c3df40e2d4d572c62623207ce29a9365b.tar.bz2
gh-106861: Docs: Add availability directives to all Unix-only modules (#108975)
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/fcntl.rst2
-rw-r--r--Doc/library/grp.rst2
-rw-r--r--Doc/library/posix.rst2
-rw-r--r--Doc/library/pty.rst2
-rw-r--r--Doc/library/pwd.rst2
-rw-r--r--Doc/library/resource.rst2
-rw-r--r--Doc/library/syslog.rst4
-rw-r--r--Doc/library/termios.rst2
-rw-r--r--Doc/library/tty.rst2
9 files changed, 14 insertions, 6 deletions
diff --git a/Doc/library/fcntl.rst b/Doc/library/fcntl.rst
index 969a79f..309ad65 100644
--- a/Doc/library/fcntl.rst
+++ b/Doc/library/fcntl.rst
@@ -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
diff --git a/Doc/library/grp.rst b/Doc/library/grp.rst
index 8f88f82..274a353 100644
--- a/Doc/library/grp.rst
+++ b/Doc/library/grp.rst
@@ -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
diff --git a/Doc/library/posix.rst b/Doc/library/posix.rst
index 0413f9d..5871574 100644
--- a/Doc/library/posix.rst
+++ b/Doc/library/posix.rst
@@ -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`,
diff --git a/Doc/library/pty.rst b/Doc/library/pty.rst
index ad4981c..af93784 100644
--- a/Doc/library/pty.rst
+++ b/Doc/library/pty.rst
@@ -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).
diff --git a/Doc/library/pwd.rst b/Doc/library/pwd.rst
index 3004193..dbe68cd 100644
--- a/Doc/library/pwd.rst
+++ b/Doc/library/pwd.rst
@@ -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,
diff --git a/Doc/library/resource.rst b/Doc/library/resource.rst
index a5324c8..ef65674 100644
--- a/Doc/library/resource.rst
+++ b/Doc/library/resource.rst
@@ -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.
diff --git a/Doc/library/syslog.rst b/Doc/library/syslog.rst
index f29ef03..b5ab446 100644
--- a/Doc/library/syslog.rst
+++ b/Doc/library/syslog.rst
@@ -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:
diff --git a/Doc/library/termios.rst b/Doc/library/termios.rst
index 0380617..57705dd 100644
--- a/Doc/library/termios.rst
+++ b/Doc/library/termios.rst
@@ -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.
diff --git a/Doc/library/tty.rst b/Doc/library/tty.rst
index a477777..20ba7d7 100644
--- a/Doc/library/tty.rst
+++ b/Doc/library/tty.rst
@@ -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: