Skip to content

Commit a10fc66

Browse files
miss-islingtonsobolevnhugovk
authored
[3.11] gh-101100: Fix sphinx warnings in library/asyncio-eventloop.rst (GH-111222) (#111470)
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 46389c3) Co-authored-by: Nikita Sobolev <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 68c03ce commit a10fc66

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

Doc/library/asyncio-eventloop.rst

+8-6
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ Opening network connections
495495

496496
.. versionchanged:: 3.6
497497

498-
The socket option :py:const:`~socket.TCP_NODELAY` is set by default
498+
The socket option :ref:`socket.TCP_NODELAY <socket-unix-constants>` is set by default
499499
for all TCP connections.
500500

501501
.. versionchanged:: 3.7
@@ -564,7 +564,7 @@ Opening network connections
564564
* *reuse_port* tells the kernel to allow this endpoint to be bound to the
565565
same port as other existing endpoints are bound to, so long as they all
566566
set this flag when being created. This option is not supported on Windows
567-
and some Unixes. If the :py:const:`~socket.SO_REUSEPORT` constant is not
567+
and some Unixes. If the :ref:`socket.SO_REUSEPORT <socket-unix-constants>` constant is not
568568
defined then this capability is unsupported.
569569

570570
* *allow_broadcast* tells the kernel to allow this endpoint to send
@@ -590,7 +590,8 @@ Opening network connections
590590

591591
.. versionchanged:: 3.8.1
592592
The *reuse_address* parameter is no longer supported, as using
593-
:py:const:`~sockets.SO_REUSEADDR` poses a significant security concern for
593+
:ref:`socket.SO_REUSEADDR <socket-unix-constants>`
594+
poses a significant security concern for
594595
UDP. Explicitly passing ``reuse_address=True`` will raise an exception.
595596

596597
When multiple processes with differing UIDs assign sockets to an
@@ -599,7 +600,8 @@ Opening network connections
599600

600601
For supported platforms, *reuse_port* can be used as a replacement for
601602
similar functionality. With *reuse_port*,
602-
:py:const:`~sockets.SO_REUSEPORT` is used instead, which specifically
603+
:ref:`socket.SO_REUSEPORT <socket-unix-constants>`
604+
is used instead, which specifically
603605
prevents processes with differing UIDs from assigning sockets to the same
604606
socket address.
605607

@@ -741,7 +743,7 @@ Creating network servers
741743
.. versionchanged:: 3.6
742744

743745
Added *ssl_handshake_timeout* and *start_serving* parameters.
744-
The socket option :py:const:`~socket.TCP_NODELAY` is set by default
746+
The socket option :ref:`socket.TCP_NODELAY <socket-unix-constants>` is set by default
745747
for all TCP connections.
746748

747749
.. versionchanged:: 3.11
@@ -1853,7 +1855,7 @@ Set signal handlers for SIGINT and SIGTERM
18531855

18541856
(This ``signals`` example only works on Unix.)
18551857

1856-
Register handlers for signals :py:data:`SIGINT` and :py:data:`SIGTERM`
1858+
Register handlers for signals :const:`~signal.SIGINT` and :const:`~signal.SIGTERM`
18571859
using the :meth:`loop.add_signal_handler` method::
18581860

18591861
import asyncio

Doc/library/socket.rst

+7
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,11 @@ Constants
326326
defined then this protocol is unsupported. More constants may be available
327327
depending on the system.
328328

329+
.. data:: AF_UNSPEC
330+
331+
:const:`AF_UNSPEC` means that
332+
:func:`getaddrinfo` should return socket addresses for any
333+
address family (either IPv4, IPv6, or any other) that can be used.
329334

330335
.. data:: SOCK_STREAM
331336
SOCK_DGRAM
@@ -354,6 +359,8 @@ Constants
354359

355360
.. versionadded:: 3.2
356361

362+
.. _socket-unix-constants:
363+
357364
.. data:: SO_*
358365
SOMAXCONN
359366
MSG_*

Doc/tools/.nitignore

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ Doc/howto/urllib2.rst
3131
Doc/library/__future__.rst
3232
Doc/library/abc.rst
3333
Doc/library/ast.rst
34-
Doc/library/asyncio-eventloop.rst
3534
Doc/library/asyncio-extending.rst
3635
Doc/library/asyncio-policy.rst
3736
Doc/library/asyncio-stream.rst

0 commit comments

Comments
 (0)