[3.7] bpo-11233: Create availability directive for documentation (GH-9692) (GH-9830)
Replace "Availability: xxx" with ".. availability:: xxx" in the doc.
Original patch by Georg Brandl.
Co-Authored-By: Georg Brandl <georg@python.org>
(cherry picked from commit 2d6097d027e0dd3debbabc702aa9c98d94ba32a3)
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 32e7c5e..37b1577 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -161,7 +161,7 @@
- *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 @@
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
@@ -306,7 +306,7 @@
`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
@@ -354,7 +354,7 @@
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
@@ -365,7 +365,7 @@
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
@@ -377,7 +377,7 @@
This constant is documented in the Linux documentation.
- Availability: Linux >= 3.6.
+ .. availability:: Linux >= 3.6.
.. versionadded:: 3.5
@@ -386,7 +386,7 @@
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
@@ -398,7 +398,7 @@
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
@@ -409,7 +409,7 @@
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
@@ -437,7 +437,7 @@
Constants for Linux Kernel cryptography.
- Availability: Linux >= 2.6.38.
+ .. availability:: Linux >= 2.6.38.
.. versionadded:: 3.6
@@ -449,13 +449,13 @@
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
@@ -604,7 +604,7 @@
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
@@ -851,7 +851,7 @@
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
@@ -871,7 +871,7 @@
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
@@ -897,7 +897,7 @@
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
@@ -918,7 +918,7 @@
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
@@ -943,7 +943,7 @@
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
@@ -954,7 +954,7 @@
(index int, name string) tuples.
:exc:`OSError` if the system call fails.
- Availability: Unix.
+ .. availability:: Unix.
.. versionadded:: 3.3
@@ -965,7 +965,7 @@
interface name.
:exc:`OSError` if no interface with the given name exists.
- Availability: Unix.
+ .. availability:: Unix.
.. versionadded:: 3.3
@@ -976,7 +976,7 @@
interface index number.
:exc:`OSError` if no interface with the given index exists.
- Availability: Unix.
+ .. availability:: Unix.
.. versionadded:: 3.3
@@ -1303,7 +1303,7 @@
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
@@ -1345,7 +1345,7 @@
>>> [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
@@ -1449,7 +1449,7 @@
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
@@ -1463,7 +1463,7 @@
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
@@ -1564,7 +1564,7 @@
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