]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-101100: Fix sphinx warnings in `library/asyncio-eventloop.rst` (GH-111222...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 29 Oct 2023 19:39:25 +0000 (20:39 +0100)
committerGitHub <noreply@github.com>
Sun, 29 Oct 2023 19:39:25 +0000 (19:39 +0000)
gh-101100: Fix sphinx warnings in `library/asyncio-eventloop.rst` (GH-111222)

* gh-101100: Fix sphinx warnings in `library/asyncio-eventloop.rst`

* Update Doc/library/socket.rst

* Update asyncio-eventloop.rst

* Update socket.rst

---------

(cherry picked from commit 46389c32750f79ab3f398a0132cd002e8a64f809)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Doc/library/asyncio-eventloop.rst
Doc/library/socket.rst
Doc/tools/.nitignore

index 5e40b50056d65a4f1c042d2bdac4d7bbb98958f9..32daaa7bca2123e7c8f2946f6a643d3aaa755d49 100644 (file)
@@ -495,7 +495,7 @@ Opening network connections
 
    .. versionchanged:: 3.6
 
-      The socket option :py:const:`~socket.TCP_NODELAY` is set by default
+      The socket option :ref:`socket.TCP_NODELAY <socket-unix-constants>` is set by default
       for all TCP connections.
 
    .. versionchanged:: 3.7
@@ -564,7 +564,7 @@ Opening network connections
    * *reuse_port* tells the kernel to allow this endpoint to be bound to the
      same port as other existing endpoints are bound to, so long as they all
      set this flag when being created. This option is not supported on Windows
-     and some Unixes. If the :py:const:`~socket.SO_REUSEPORT` constant is not
+     and some Unixes. If the :ref:`socket.SO_REUSEPORT <socket-unix-constants>` constant is not
      defined then this capability is unsupported.
 
    * *allow_broadcast* tells the kernel to allow this endpoint to send
@@ -590,7 +590,8 @@ Opening network connections
 
    .. versionchanged:: 3.8.1
       The *reuse_address* parameter is no longer supported, as using
-      :py:const:`~sockets.SO_REUSEADDR` poses a significant security concern for
+      :ref:`socket.SO_REUSEADDR <socket-unix-constants>`
+      poses a significant security concern for
       UDP. Explicitly passing ``reuse_address=True`` will raise an exception.
 
       When multiple processes with differing UIDs assign sockets to an
@@ -599,7 +600,8 @@ Opening network connections
 
       For supported platforms, *reuse_port* can be used as a replacement for
       similar functionality. With *reuse_port*,
-      :py:const:`~sockets.SO_REUSEPORT` is used instead, which specifically
+      :ref:`socket.SO_REUSEPORT <socket-unix-constants>`
+      is used instead, which specifically
       prevents processes with differing UIDs from assigning sockets to the same
       socket address.
 
@@ -741,7 +743,7 @@ Creating network servers
    .. versionchanged:: 3.6
 
       Added *ssl_handshake_timeout* and *start_serving* parameters.
-      The socket option :py:const:`~socket.TCP_NODELAY` is set by default
+      The socket option :ref:`socket.TCP_NODELAY <socket-unix-constants>` is set by default
       for all TCP connections.
 
    .. versionchanged:: 3.11
@@ -1853,7 +1855,7 @@ Set signal handlers for SIGINT and SIGTERM
 
 (This ``signals`` example only works on Unix.)
 
-Register handlers for signals :py:data:`SIGINT` and :py:data:`SIGTERM`
+Register handlers for signals :const:`~signal.SIGINT` and :const:`~signal.SIGTERM`
 using the :meth:`loop.add_signal_handler` method::
 
     import asyncio
index 7193713984f169949530c8ab9aced8c2a98ce32a..b5c1edaf5ad8e00db07710d7295f9ba6c53f208b 100644 (file)
@@ -326,6 +326,11 @@ Constants
    defined then this protocol is unsupported.  More constants may be available
    depending on the system.
 
+.. data:: AF_UNSPEC
+
+   :const:`AF_UNSPEC` means that
+   :func:`getaddrinfo` should return socket addresses for any
+   address family (either IPv4, IPv6, or any other) that can be used.
 
 .. data:: SOCK_STREAM
           SOCK_DGRAM
@@ -354,6 +359,8 @@ Constants
 
    .. versionadded:: 3.2
 
+.. _socket-unix-constants:
+
 .. data:: SO_*
           SOMAXCONN
           MSG_*
index 5dc8bdc61f6ce56298949fa27bae9d210bec4eaa..e59d6198032314cb437fbd75f10f427542a6a410 100644 (file)
@@ -31,7 +31,6 @@ Doc/howto/urllib2.rst
 Doc/library/__future__.rst
 Doc/library/abc.rst
 Doc/library/ast.rst
-Doc/library/asyncio-eventloop.rst
 Doc/library/asyncio-extending.rst
 Doc/library/asyncio-policy.rst
 Doc/library/asyncio-stream.rst