]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-101100: Fix sphinx warnings in `library/asyncio-eventloop.rst` (GH-111222)
authorNikita Sobolev <mail@sobolevn.me>
Sun, 29 Oct 2023 19:31:01 +0000 (22:31 +0300)
committerGitHub <noreply@github.com>
Sun, 29 Oct 2023 19:31:01 +0000 (12:31 -0700)
* gh-101100: Fix sphinx warnings in `library/asyncio-eventloop.rst`

* Update Doc/library/socket.rst

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Update asyncio-eventloop.rst

* Update socket.rst

---------

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

index 5627f0d54d32fde7798b356518f6e6ed1318edca..3911d2caf5c3fb50852febb83c7209d6a53255dc 100644 (file)
@@ -509,7 +509,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
@@ -581,7 +581,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
@@ -607,7 +607,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
@@ -616,7 +617,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.
 
@@ -758,7 +760,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
@@ -1896,7 +1898,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 14f11b40cb9b004925aed15699c03f7902627557..9ff1aa3984e828bf6e427ef2f8652026f0e53fdf 100644 (file)
@@ -352,6 +352,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
@@ -380,6 +385,8 @@ Constants
 
    .. versionadded:: 3.2
 
+.. _socket-unix-constants:
+
 .. data:: SO_*
           SOMAXCONN
           MSG_*
index 4433b4ddfbbf726766441d9218fe00ee017a1cb5..105e00db8e368abe12e0cae675ecb4f661cc32a4 100644 (file)
@@ -30,7 +30,6 @@ Doc/howto/logging.rst
 Doc/howto/urllib2.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