mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
bpo-11233: Create availability directive for documentation (GH-9692)
Replace "Availability: xxx" with ".. availability:: xxx" in the doc. Original patch by Georg Brandl. Co-Authored-By: Georg Brandl <georg@python.org>
This commit is contained in:
committed by
Victor Stinner
parent
da2bf9f66d
commit
2d6097d027
@@ -186,34 +186,42 @@ NULL pointer for use in a ``return`` statement.
|
||||
then it constructs a tuple object whose first item is the *ierr* value and whose
|
||||
second item is the corresponding error message (gotten from
|
||||
:c:func:`FormatMessage`), and then calls ``PyErr_SetObject(PyExc_WindowsError,
|
||||
object)``. This function always returns *NULL*. Availability: Windows.
|
||||
object)``. This function always returns *NULL*.
|
||||
|
||||
.. availability:: Windows.
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyErr_SetExcFromWindowsErr(PyObject *type, int ierr)
|
||||
|
||||
Similar to :c:func:`PyErr_SetFromWindowsErr`, with an additional parameter
|
||||
specifying the exception type to be raised. Availability: Windows.
|
||||
specifying the exception type to be raised.
|
||||
|
||||
.. availability:: Windows.
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyErr_SetFromWindowsErrWithFilename(int ierr, const char *filename)
|
||||
|
||||
Similar to :c:func:`PyErr_SetFromWindowsErrWithFilenameObject`, but the
|
||||
filename is given as a C string. *filename* is decoded from the filesystem
|
||||
encoding (:func:`os.fsdecode`). Availability: Windows.
|
||||
encoding (:func:`os.fsdecode`).
|
||||
|
||||
.. availability:: Windows.
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyErr_SetExcFromWindowsErrWithFilenameObject(PyObject *type, int ierr, PyObject *filename)
|
||||
|
||||
Similar to :c:func:`PyErr_SetFromWindowsErrWithFilenameObject`, with an
|
||||
additional parameter specifying the exception type to be raised.
|
||||
Availability: Windows.
|
||||
|
||||
.. availability:: Windows.
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyErr_SetExcFromWindowsErrWithFilenameObjects(PyObject *type, int ierr, PyObject *filename, PyObject *filename2)
|
||||
|
||||
Similar to :c:func:`PyErr_SetExcFromWindowsErrWithFilenameObject`,
|
||||
but accepts a second filename object.
|
||||
Availability: Windows.
|
||||
|
||||
.. availability:: Windows.
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
@@ -221,7 +229,9 @@ NULL pointer for use in a ``return`` statement.
|
||||
.. c:function:: PyObject* PyErr_SetExcFromWindowsErrWithFilename(PyObject *type, int ierr, const char *filename)
|
||||
|
||||
Similar to :c:func:`PyErr_SetFromWindowsErrWithFilename`, with an additional
|
||||
parameter specifying the exception type to be raised. Availability: Windows.
|
||||
parameter specifying the exception type to be raised.
|
||||
|
||||
.. availability:: Windows.
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyErr_SetImportError(PyObject *msg, PyObject *name, PyObject *path)
|
||||
|
||||
@@ -156,7 +156,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
|
||||
|
||||
See :pep:`529` for more details.
|
||||
|
||||
Availability: Windows.
|
||||
.. availability:: Windows.
|
||||
|
||||
.. c:var:: Py_LegacyWindowsStdioFlag
|
||||
|
||||
@@ -168,7 +168,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
|
||||
|
||||
See :pep:`528` for more details.
|
||||
|
||||
Availability: Windows.
|
||||
.. availability:: Windows.
|
||||
|
||||
.. c:var:: Py_NoSiteFlag
|
||||
|
||||
|
||||
@@ -101,7 +101,8 @@ This module defines the following constants and functions:
|
||||
memory page size - platform documentation should be referred to for more
|
||||
information (4 KiB pages are common; using multiples of 4096 for the stack size is
|
||||
the suggested approach in the absence of more specific information).
|
||||
Availability: Windows, systems with POSIX threads.
|
||||
|
||||
.. availability:: Windows, systems with POSIX threads.
|
||||
|
||||
|
||||
.. data:: TIMEOUT_MAX
|
||||
|
||||
@@ -510,7 +510,7 @@ Opening network connections
|
||||
See the documentation of the :meth:`loop.create_connection` method
|
||||
for information about arguments to this method.
|
||||
|
||||
Availability: Unix.
|
||||
.. availability:: Unix.
|
||||
|
||||
.. versionadded:: 3.7
|
||||
|
||||
@@ -630,7 +630,7 @@ Creating network servers
|
||||
See the documentation of the :meth:`loop.create_server` method
|
||||
for information about arguments to this method.
|
||||
|
||||
Availability: Unix.
|
||||
.. availability:: Unix.
|
||||
|
||||
.. versionadded:: 3.7
|
||||
|
||||
@@ -979,7 +979,7 @@ Unix signals
|
||||
Return ``True`` if the signal handler was removed, or ``False`` if
|
||||
no handler was set for the given signal.
|
||||
|
||||
Availability: Unix.
|
||||
.. availability:: Unix.
|
||||
|
||||
.. seealso::
|
||||
|
||||
@@ -1423,14 +1423,14 @@ on all platforms.
|
||||
asyncio.set_event_loop(loop)
|
||||
|
||||
|
||||
Availability: Unix, Windows.
|
||||
.. availability:: Unix, Windows.
|
||||
|
||||
|
||||
.. class:: ProactorEventLoop
|
||||
|
||||
An event loop for Windows that uses "I/O Completion Ports" (IOCP).
|
||||
|
||||
Availability: Windows.
|
||||
.. availability:: Windows.
|
||||
|
||||
.. seealso::
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ asyncio ships with the following built-in policies:
|
||||
An alternative event loop policy that uses the
|
||||
:class:`SelectorEventLoop` event loop implementation.
|
||||
|
||||
Availability: Windows.
|
||||
.. availability:: Windows.
|
||||
|
||||
|
||||
.. class:: WindowsProactorEventLoopPolicy
|
||||
@@ -115,7 +115,7 @@ asyncio ships with the following built-in policies:
|
||||
An alternative event loop policy that uses the
|
||||
:class:`ProactorEventLoop` event loop implementation.
|
||||
|
||||
Availability: Windows.
|
||||
.. availability:: Windows.
|
||||
|
||||
|
||||
Process Watchers
|
||||
|
||||
@@ -114,7 +114,7 @@ and work with streams:
|
||||
|
||||
See also the documentation of :meth:`loop.create_unix_connection`.
|
||||
|
||||
Availability: Unix.
|
||||
.. availability:: Unix.
|
||||
|
||||
.. versionadded:: 3.7
|
||||
|
||||
@@ -136,7 +136,7 @@ and work with streams:
|
||||
|
||||
See also the documentation of :meth:`loop.create_unix_server`.
|
||||
|
||||
Availability: Unix.
|
||||
.. availability:: Unix.
|
||||
|
||||
.. versionadded:: 3.7
|
||||
|
||||
|
||||
@@ -273,14 +273,18 @@ any that have been added to the map during asynchronous service) is closed.
|
||||
with an optional map argument and wraps it for use with the :c:func:`poll`
|
||||
or :c:func:`loop` functions. If provided a file object or anything with a
|
||||
:c:func:`fileno` method, that method will be called and passed to the
|
||||
:class:`file_wrapper` constructor. Availability: UNIX.
|
||||
:class:`file_wrapper` constructor.
|
||||
|
||||
.. availability:: Unix.
|
||||
|
||||
.. class:: file_wrapper()
|
||||
|
||||
A file_wrapper takes an integer file descriptor and calls :func:`os.dup` to
|
||||
duplicate the handle so that the original handle may be closed independently
|
||||
of the file_wrapper. This class implements sufficient methods to emulate a
|
||||
socket for use by the :class:`file_dispatcher` class. Availability: UNIX.
|
||||
socket for use by the :class:`file_dispatcher` class.
|
||||
|
||||
.. availability:: Unix.
|
||||
|
||||
|
||||
.. _asyncore-example-1:
|
||||
|
||||
@@ -1471,7 +1471,7 @@ functions can be used directly if desired.
|
||||
|
||||
Encode operand according to the ANSI codepage (CP_ACP).
|
||||
|
||||
Availability: Windows only.
|
||||
.. availability:: Windows only.
|
||||
|
||||
.. versionchanged:: 3.3
|
||||
Support any error handler.
|
||||
|
||||
@@ -271,7 +271,7 @@ include a `salt <https://en.wikipedia.org/wiki/Salt_%28cryptography%29>`_.
|
||||
factor and *maxmem* limits memory (OpenSSL 1.1.0 defaults to 32 MiB).
|
||||
*dklen* is the length of the derived key.
|
||||
|
||||
Availability: OpenSSL 1.1+
|
||||
.. availability:: OpenSSL 1.1+.
|
||||
|
||||
.. versionadded:: 3.6
|
||||
|
||||
|
||||
@@ -47,3 +47,16 @@ this material.
|
||||
|
||||
Let the show begin!
|
||||
|
||||
|
||||
.. _availability:
|
||||
|
||||
Notes on availability
|
||||
=====================
|
||||
|
||||
* An "Availability: Unix" note means that this function is commonly found on
|
||||
Unix systems. It does not make any claims about its existence on a specific
|
||||
operating system.
|
||||
|
||||
* If not separately noted, all functions that claim "Availability: Unix" are
|
||||
supported on Mac OS X, which builds on a Unix core.
|
||||
|
||||
|
||||
@@ -260,7 +260,9 @@ than one MIME-type database; it provides an interface similar to the one of the
|
||||
|
||||
.. method:: MimeTypes.read_windows_registry(strict=True)
|
||||
|
||||
Load MIME type information from the Windows registry. Availability: Windows.
|
||||
Load MIME type information from the Windows registry.
|
||||
|
||||
.. availability:: Windows.
|
||||
|
||||
If *strict* is ``True``, information will be added to the list of standard
|
||||
types, else to the list of non-standard types.
|
||||
|
||||
@@ -93,7 +93,7 @@ the :mod:`glob` module.)
|
||||
pathnames, or if *paths* is empty. Unlike :func:`commonprefix`, this
|
||||
returns a valid path.
|
||||
|
||||
Availability: Unix, Windows
|
||||
.. availability:: Unix, Windows.
|
||||
|
||||
.. versionadded:: 3.5
|
||||
|
||||
@@ -357,7 +357,7 @@ the :mod:`glob` module.)
|
||||
|
||||
*start* defaults to :attr:`os.curdir`.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
.. availability:: Unix, Windows.
|
||||
|
||||
.. versionchanged:: 3.6
|
||||
Accepts a :term:`path-like object`.
|
||||
@@ -369,7 +369,7 @@ the :mod:`glob` module.)
|
||||
This is determined by the device number and i-node number and raises an
|
||||
exception if an :func:`os.stat` call on either pathname fails.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
.. availability:: Unix, Windows.
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
Added Windows support.
|
||||
@@ -385,7 +385,7 @@ the :mod:`glob` module.)
|
||||
|
||||
Return ``True`` if the file descriptors *fp1* and *fp2* refer to the same file.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
.. availability:: Unix, Windows.
|
||||
|
||||
.. versionchanged:: 3.2
|
||||
Added Windows support.
|
||||
@@ -401,7 +401,7 @@ the :mod:`glob` module.)
|
||||
:func:`os.lstat`, or :func:`os.stat`. This function implements the
|
||||
underlying comparison used by :func:`samefile` and :func:`sameopenfile`.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
.. availability:: Unix, Windows.
|
||||
|
||||
.. versionchanged:: 3.4
|
||||
Added Windows support.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -92,7 +92,7 @@ this module for those platforms.
|
||||
:exc:`PermissionError` when the user doesn't have ``CAP_SYS_RESOURCE`` for
|
||||
the process.
|
||||
|
||||
Availability: Linux 2.6.36 or later with glibc 2.13 or later
|
||||
.. availability:: Linux 2.6.36 or later with glibc 2.13 or later.
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
@@ -178,7 +178,7 @@ platform.
|
||||
|
||||
The number of bytes that can be allocated for POSIX message queues.
|
||||
|
||||
Availability: Linux 2.6.8 or later.
|
||||
.. availability:: Linux 2.6.8 or later.
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
@@ -187,7 +187,7 @@ platform.
|
||||
|
||||
The ceiling for the process's nice level (calculated as 20 - rlim_cur).
|
||||
|
||||
Availability: Linux 2.6.12 or later.
|
||||
.. availability:: Linux 2.6.12 or later.
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
@@ -196,7 +196,7 @@ platform.
|
||||
|
||||
The ceiling of the real-time priority.
|
||||
|
||||
Availability: Linux 2.6.12 or later.
|
||||
.. availability:: Linux 2.6.12 or later.
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
@@ -206,7 +206,7 @@ platform.
|
||||
The time limit (in microseconds) on CPU time that a process can spend
|
||||
under real-time scheduling without making a blocking syscall.
|
||||
|
||||
Availability: Linux 2.6.25 or later.
|
||||
.. availability:: Linux 2.6.25 or later.
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
@@ -215,7 +215,7 @@ platform.
|
||||
|
||||
The number of signals which the process may queue.
|
||||
|
||||
Availability: Linux 2.6.8 or later.
|
||||
.. availability:: Linux 2.6.8 or later.
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
@@ -225,7 +225,7 @@ platform.
|
||||
This limits the amount of network memory, and hence the amount of mbufs,
|
||||
that this user may hold at any time.
|
||||
|
||||
Availability: FreeBSD 9 or later.
|
||||
.. availability:: FreeBSD 9 or later.
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
@@ -236,7 +236,7 @@ platform.
|
||||
This limit is enforced only if bit 1 of the vm.overcommit sysctl is set.
|
||||
Please see :manpage:`tuning(7)` for a complete description of this sysctl.
|
||||
|
||||
Availability: FreeBSD 9 or later.
|
||||
.. availability:: FreeBSD 9 or later.
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
@@ -244,7 +244,7 @@ platform.
|
||||
|
||||
The maximum number of pseudo-terminals created by this user id.
|
||||
|
||||
Availability: FreeBSD 9 or later.
|
||||
.. availability:: FreeBSD 9 or later.
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
|
||||
@@ -171,7 +171,9 @@ The module defines the following:
|
||||
:func:`poll` or another interface in this module. This doesn't apply
|
||||
to other kind of file-like objects such as sockets.
|
||||
|
||||
This value is guaranteed by POSIX to be at least 512. Availability: Unix.
|
||||
This value is guaranteed by POSIX to be at least 512.
|
||||
|
||||
.. availability:: Unix
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
|
||||
@@ -351,7 +351,7 @@ Directory and files operations
|
||||
.. versionchanged:: 3.8
|
||||
On Windows, *path* can now be a file or directory.
|
||||
|
||||
Availability: Unix, Windows.
|
||||
.. availability:: Unix, Windows.
|
||||
|
||||
.. function:: chown(path, user=None, group=None)
|
||||
|
||||
@@ -362,7 +362,7 @@ Directory and files operations
|
||||
|
||||
See also :func:`os.chown`, the underlying function.
|
||||
|
||||
Availability: Unix.
|
||||
.. availability:: Unix.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ The variables defined in the :mod:`signal` module are:
|
||||
The signal corresponding to the :kbd:`Ctrl+C` keystroke event. This signal can
|
||||
only be used with :func:`os.kill`.
|
||||
|
||||
Availability: Windows.
|
||||
.. availability:: Windows.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
@@ -116,7 +116,7 @@ The variables defined in the :mod:`signal` module are:
|
||||
The signal corresponding to the :kbd:`Ctrl+Break` keystroke event. This signal can
|
||||
only be used with :func:`os.kill`.
|
||||
|
||||
Availability: Windows.
|
||||
.. availability:: Windows.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
@@ -193,7 +193,9 @@ The :mod:`signal` module defines the following functions:
|
||||
then the number of seconds before any previously set alarm was to have been
|
||||
delivered. If *time* is zero, no alarm is scheduled, and any scheduled alarm is
|
||||
canceled. If the return value is zero, no alarm is currently scheduled. (See
|
||||
the Unix man page :manpage:`alarm(2)`.) Availability: Unix.
|
||||
the Unix man page :manpage:`alarm(2)`.)
|
||||
|
||||
.. availability:: Unix.
|
||||
|
||||
|
||||
.. function:: getsignal(signalnum)
|
||||
@@ -252,8 +254,8 @@ The :mod:`signal` module defines the following functions:
|
||||
If *signalnum* is 0, then no signal is sent, but error checking is still
|
||||
performed; this can be used to check if the target thread is still running.
|
||||
|
||||
Availability: Unix (see the man page :manpage:`pthread_kill(3)` for further
|
||||
information).
|
||||
.. availability:: Unix (see the man page :manpage:`pthread_kill(3)` for further
|
||||
information).
|
||||
|
||||
See also :func:`os.kill`.
|
||||
|
||||
@@ -283,8 +285,8 @@ The :mod:`signal` module defines the following functions:
|
||||
For example, ``signal.pthread_sigmask(signal.SIG_BLOCK, [])`` reads the
|
||||
signal mask of the calling thread.
|
||||
|
||||
Availability: Unix. See the man page :manpage:`sigprocmask(3)` and
|
||||
:manpage:`pthread_sigmask(3)` for further information.
|
||||
.. availability:: Unix. See the man page :manpage:`sigprocmask(3)` and
|
||||
:manpage:`pthread_sigmask(3)` for further information.
|
||||
|
||||
See also :func:`pause`, :func:`sigpending` and :func:`sigwait`.
|
||||
|
||||
@@ -309,13 +311,16 @@ The :mod:`signal` module defines the following functions:
|
||||
The old values are returned as a tuple: (delay, interval).
|
||||
|
||||
Attempting to pass an invalid interval timer will cause an
|
||||
:exc:`ItimerError`. Availability: Unix.
|
||||
:exc:`ItimerError`.
|
||||
|
||||
.. availability:: Unix.
|
||||
|
||||
|
||||
.. function:: getitimer(which)
|
||||
|
||||
Returns current value of a given interval timer specified by *which*.
|
||||
Availability: Unix.
|
||||
|
||||
.. availability:: Unix.
|
||||
|
||||
|
||||
.. function:: set_wakeup_fd(fd, *, warn_on_full_buffer=True)
|
||||
@@ -365,8 +370,10 @@ The :mod:`signal` module defines the following functions:
|
||||
|
||||
Change system call restart behaviour: if *flag* is :const:`False`, system
|
||||
calls will be restarted when interrupted by signal *signalnum*, otherwise
|
||||
system calls will be interrupted. Returns nothing. Availability: Unix (see
|
||||
the man page :manpage:`siginterrupt(3)` for further information).
|
||||
system calls will be interrupted. Returns nothing.
|
||||
|
||||
.. availability:: Unix (see the man page :manpage:`siginterrupt(3)`
|
||||
for further information).
|
||||
|
||||
Note that installing a signal handler with :func:`signal` will reset the
|
||||
restart behaviour to interruptible by implicitly calling
|
||||
@@ -405,8 +412,8 @@ The :mod:`signal` module defines the following functions:
|
||||
thread (i.e., the signals which have been raised while blocked). Return the
|
||||
set of the pending signals.
|
||||
|
||||
Availability: Unix (see the man page :manpage:`sigpending(2)` for further
|
||||
information).
|
||||
.. availability:: Unix (see the man page :manpage:`sigpending(2)` for further
|
||||
information).
|
||||
|
||||
See also :func:`pause`, :func:`pthread_sigmask` and :func:`sigwait`.
|
||||
|
||||
@@ -419,8 +426,8 @@ The :mod:`signal` module defines the following functions:
|
||||
signals specified in the signal set *sigset*. The function accepts the signal
|
||||
(removes it from the pending list of signals), and returns the signal number.
|
||||
|
||||
Availability: Unix (see the man page :manpage:`sigwait(3)` for further
|
||||
information).
|
||||
.. availability:: Unix (see the man page :manpage:`sigwait(3)` for further
|
||||
information).
|
||||
|
||||
See also :func:`pause`, :func:`pthread_sigmask`, :func:`sigpending`,
|
||||
:func:`sigwaitinfo` and :func:`sigtimedwait`.
|
||||
@@ -444,8 +451,8 @@ The :mod:`signal` module defines the following functions:
|
||||
:attr:`si_errno`, :attr:`si_pid`, :attr:`si_uid`, :attr:`si_status`,
|
||||
:attr:`si_band`.
|
||||
|
||||
Availability: Unix (see the man page :manpage:`sigwaitinfo(2)` for further
|
||||
information).
|
||||
.. availability:: Unix (see the man page :manpage:`sigwaitinfo(2)` for further
|
||||
information).
|
||||
|
||||
See also :func:`pause`, :func:`sigwait` and :func:`sigtimedwait`.
|
||||
|
||||
@@ -463,8 +470,8 @@ The :mod:`signal` module defines the following functions:
|
||||
specifying a timeout. If *timeout* is specified as :const:`0`, a poll is
|
||||
performed. Returns :const:`None` if a timeout occurs.
|
||||
|
||||
Availability: Unix (see the man page :manpage:`sigtimedwait(2)` for further
|
||||
information).
|
||||
.. availability:: Unix (see the man page :manpage:`sigtimedwait(2)` for further
|
||||
information).
|
||||
|
||||
See also :func:`pause`, :func:`sigwait` and :func:`sigwaitinfo`.
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ created. Socket addresses are represented as follows:
|
||||
|
||||
- *feat* and *mask* are unsigned 32bit integers.
|
||||
|
||||
Availability Linux 2.6.38, some algorithm types require more recent Kernels.
|
||||
.. availability:: Linux 2.6.38, some algorithm types require more recent Kernels.
|
||||
|
||||
.. versionadded:: 3.6
|
||||
|
||||
@@ -169,7 +169,7 @@ created. Socket addresses are represented as follows:
|
||||
their hosts. The sockets are represented as a ``(CID, port)`` tuple
|
||||
where the context ID or CID and port are integers.
|
||||
|
||||
Availability: Linux >= 4.8 QEMU >= 2.8 ESX >= 4.0 ESX Workstation >= 6.5
|
||||
.. availability:: Linux >= 4.8 QEMU >= 2.8 ESX >= 4.0 ESX Workstation >= 6.5.
|
||||
|
||||
.. versionadded:: 3.7
|
||||
|
||||
@@ -313,7 +313,7 @@ Constants
|
||||
`Secure File Descriptor Handling <http://udrepper.livejournal.com/20407.html>`_
|
||||
for a more thorough explanation.
|
||||
|
||||
Availability: Linux >= 2.6.27.
|
||||
.. availability:: Linux >= 2.6.27.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
@@ -361,7 +361,7 @@ Constants
|
||||
Many constants of these forms, documented in the Linux documentation, are
|
||||
also defined in the socket module.
|
||||
|
||||
Availability: Linux >= 2.6.25.
|
||||
.. availability:: Linux >= 2.6.25.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
@@ -372,7 +372,7 @@ Constants
|
||||
Broadcast manager constants, documented in the Linux documentation, are also
|
||||
defined in the socket module.
|
||||
|
||||
Availability: Linux >= 2.6.25.
|
||||
.. availability:: Linux >= 2.6.25.
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
@@ -384,7 +384,7 @@ Constants
|
||||
|
||||
This constant is documented in the Linux documentation.
|
||||
|
||||
Availability: Linux >= 3.6.
|
||||
.. availability:: Linux >= 3.6.
|
||||
|
||||
.. versionadded:: 3.5
|
||||
|
||||
@@ -393,7 +393,7 @@ Constants
|
||||
CAN_ISOTP, in the CAN protocol family, is the ISO-TP (ISO 15765-2) protocol.
|
||||
ISO-TP constants, documented in the Linux documentation.
|
||||
|
||||
Availability: Linux >= 2.6.25
|
||||
.. availability:: Linux >= 2.6.25.
|
||||
|
||||
.. versionadded:: 3.7
|
||||
|
||||
@@ -405,7 +405,7 @@ Constants
|
||||
Many constants of these forms, documented in the Linux documentation, are
|
||||
also defined in the socket module.
|
||||
|
||||
Availability: Linux >= 2.2.
|
||||
.. availability:: Linux >= 2.2.
|
||||
|
||||
|
||||
.. data:: AF_RDS
|
||||
@@ -416,7 +416,7 @@ Constants
|
||||
Many constants of these forms, documented in the Linux documentation, are
|
||||
also defined in the socket module.
|
||||
|
||||
Availability: Linux >= 2.6.30.
|
||||
.. availability:: Linux >= 2.6.30.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
@@ -444,7 +444,7 @@ Constants
|
||||
|
||||
Constants for Linux Kernel cryptography.
|
||||
|
||||
Availability: Linux >= 2.6.38.
|
||||
.. availability:: Linux >= 2.6.38.
|
||||
|
||||
.. versionadded:: 3.6
|
||||
|
||||
@@ -456,13 +456,13 @@ Constants
|
||||
|
||||
Constants for Linux host/guest communication.
|
||||
|
||||
Availability: Linux >= 4.8.
|
||||
.. availability:: Linux >= 4.8.
|
||||
|
||||
.. versionadded:: 3.7
|
||||
|
||||
.. data:: AF_LINK
|
||||
|
||||
Availability: BSD, OSX.
|
||||
.. availability:: BSD, OSX.
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
@@ -493,7 +493,7 @@ Constants
|
||||
Constant for Qualcomm's IPC router protocol, used to communicate with
|
||||
service providing remote processors.
|
||||
|
||||
Availability: Linux >= 4.7.
|
||||
.. availability:: Linux >= 4.7.
|
||||
|
||||
Functions
|
||||
^^^^^^^^^
|
||||
@@ -618,7 +618,7 @@ The following functions all create :ref:`socket objects <socket-objects>`.
|
||||
Instantiate a socket from data obtained from the :meth:`socket.share`
|
||||
method. The socket is assumed to be in blocking mode.
|
||||
|
||||
Availability: Windows.
|
||||
.. availability:: Windows.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
@@ -865,7 +865,7 @@ The :mod:`socket` module also offers various network-related services:
|
||||
both the value of *address_family* and the underlying implementation of
|
||||
:c:func:`inet_pton`.
|
||||
|
||||
Availability: Unix (maybe not all platforms), Windows.
|
||||
.. availability:: Unix (maybe not all platforms), Windows.
|
||||
|
||||
.. versionchanged:: 3.4
|
||||
Windows support added
|
||||
@@ -885,7 +885,7 @@ The :mod:`socket` module also offers various network-related services:
|
||||
length for the specified address family, :exc:`ValueError` will be raised.
|
||||
:exc:`OSError` is raised for errors from the call to :func:`inet_ntop`.
|
||||
|
||||
Availability: Unix (maybe not all platforms), Windows.
|
||||
.. availability:: Unix (maybe not all platforms), Windows.
|
||||
|
||||
.. versionchanged:: 3.4
|
||||
Windows support added
|
||||
@@ -911,7 +911,7 @@ The :mod:`socket` module also offers various network-related services:
|
||||
buffer. Raises :exc:`OverflowError` if *length* is outside the
|
||||
permissible range of values.
|
||||
|
||||
Availability: most Unix platforms, possibly others.
|
||||
.. availability:: most Unix platforms, possibly others.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
@@ -932,7 +932,7 @@ The :mod:`socket` module also offers various network-related services:
|
||||
amount of ancillary data that can be received, since additional
|
||||
data may be able to fit into the padding area.
|
||||
|
||||
Availability: most Unix platforms, possibly others.
|
||||
.. availability:: most Unix platforms, possibly others.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
@@ -957,7 +957,7 @@ The :mod:`socket` module also offers various network-related services:
|
||||
Set the machine's hostname to *name*. This will raise an
|
||||
:exc:`OSError` if you don't have enough rights.
|
||||
|
||||
Availability: Unix.
|
||||
.. availability:: Unix.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
@@ -968,7 +968,7 @@ The :mod:`socket` module also offers various network-related services:
|
||||
(index int, name string) tuples.
|
||||
:exc:`OSError` if the system call fails.
|
||||
|
||||
Availability: Unix.
|
||||
.. availability:: Unix.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
@@ -979,7 +979,7 @@ The :mod:`socket` module also offers various network-related services:
|
||||
interface name.
|
||||
:exc:`OSError` if no interface with the given name exists.
|
||||
|
||||
Availability: Unix.
|
||||
.. availability:: Unix.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
@@ -990,7 +990,7 @@ The :mod:`socket` module also offers various network-related services:
|
||||
interface index number.
|
||||
:exc:`OSError` if no interface with the given index exists.
|
||||
|
||||
Availability: Unix.
|
||||
.. availability:: Unix.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
@@ -1317,7 +1317,7 @@ to sockets.
|
||||
fds.fromstring(cmsg_data[:len(cmsg_data) - (len(cmsg_data) % fds.itemsize)])
|
||||
return msg, list(fds)
|
||||
|
||||
Availability: most Unix platforms, possibly others.
|
||||
.. availability:: most Unix platforms, possibly others.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
@@ -1359,7 +1359,7 @@ to sockets.
|
||||
>>> [b1, b2, b3]
|
||||
[bytearray(b'Mary'), bytearray(b'01 had a 9'), bytearray(b'little lamb---')]
|
||||
|
||||
Availability: most Unix platforms, possibly others.
|
||||
.. availability:: most Unix platforms, possibly others.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
@@ -1463,7 +1463,7 @@ to sockets.
|
||||
def send_fds(sock, msg, fds):
|
||||
return sock.sendmsg([msg], [(socket.SOL_SOCKET, socket.SCM_RIGHTS, array.array("i", fds))])
|
||||
|
||||
Availability: most Unix platforms, possibly others.
|
||||
.. availability:: most Unix platforms, possibly others.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
@@ -1477,7 +1477,7 @@ to sockets.
|
||||
Specialized version of :meth:`~socket.sendmsg` for :const:`AF_ALG` socket.
|
||||
Set mode, IV, AEAD associated data length and flags for :const:`AF_ALG` socket.
|
||||
|
||||
Availability: Linux >= 2.6.38
|
||||
.. availability:: Linux >= 2.6.38.
|
||||
|
||||
.. versionadded:: 3.6
|
||||
|
||||
@@ -1578,7 +1578,7 @@ to sockets.
|
||||
Once this method has been called, it is safe to close the socket since
|
||||
the operating system has already duplicated it for the target process.
|
||||
|
||||
Availability: Windows.
|
||||
.. availability:: Windows.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
|
||||
@@ -328,7 +328,7 @@ Random generation
|
||||
See http://egd.sourceforge.net/ or http://prngd.sourceforge.net/ for sources
|
||||
of entropy-gathering daemons.
|
||||
|
||||
Availability: not available with LibreSSL and OpenSSL > 1.1.0
|
||||
.. availability:: not available with LibreSSL and OpenSSL > 1.1.0.
|
||||
|
||||
.. function:: RAND_add(bytes, entropy)
|
||||
|
||||
@@ -460,8 +460,8 @@ Certificate handling
|
||||
* :attr:`openssl_capath_env` - OpenSSL's environment key that points to a capath,
|
||||
* :attr:`openssl_capath` - hard coded path to a capath directory
|
||||
|
||||
Availability: LibreSSL ignores the environment vars
|
||||
:attr:`openssl_cafile_env` and :attr:`openssl_capath_env`
|
||||
.. availability:: LibreSSL ignores the environment vars
|
||||
:attr:`openssl_cafile_env` and :attr:`openssl_capath_env`.
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
@@ -484,7 +484,7 @@ Certificate handling
|
||||
[(b'data...', 'x509_asn', {'1.3.6.1.5.5.7.3.1', '1.3.6.1.5.5.7.3.2'}),
|
||||
(b'data...', 'x509_asn', True)]
|
||||
|
||||
Availability: Windows.
|
||||
.. availability:: Windows.
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
@@ -499,7 +499,7 @@ Certificate handling
|
||||
:const:`x509_asn` for X.509 ASN.1 data or :const:`pkcs_7_asn` for
|
||||
PKCS#7 ASN.1 data.
|
||||
|
||||
Availability: Windows.
|
||||
.. availability:: Windows.
|
||||
|
||||
.. versionadded:: 3.4
|
||||
|
||||
@@ -1610,7 +1610,7 @@ to speed up repeated connections from the same clients.
|
||||
'strength_bits': 128,
|
||||
'symmetric': 'aes-128-gcm'}]
|
||||
|
||||
Availability: OpenSSL 1.0.2+
|
||||
.. availability:: OpenSSL 1.0.2+.
|
||||
|
||||
.. versionadded:: 3.6
|
||||
|
||||
|
||||
@@ -1330,7 +1330,7 @@ handling consistency are valid for these functions.
|
||||
>>> subprocess.getstatusoutput('/bin/kill $$')
|
||||
(-15, '')
|
||||
|
||||
Availability: POSIX & Windows
|
||||
.. availability:: POSIX & Windows.
|
||||
|
||||
.. versionchanged:: 3.3.4
|
||||
Windows support was added.
|
||||
@@ -1350,7 +1350,7 @@ handling consistency are valid for these functions.
|
||||
>>> subprocess.getoutput('ls /bin/ls')
|
||||
'/bin/ls'
|
||||
|
||||
Availability: POSIX & Windows
|
||||
.. availability:: POSIX & Windows.
|
||||
|
||||
.. versionchanged:: 3.3.4
|
||||
Windows support added
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user