Skip to content

Commit 577c808

Browse files
miss-islingtonsobolevnhugovk
authored
[3.12] gh-101100: Fix sphinx warnings in library/asyncio-eventloop.rst (GH-111222) (#111469)
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 0681b4c commit 577c808

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

Doc/library/asyncio-eventloop.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ Opening network connections
509509

510510
.. versionchanged:: 3.6
511511

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

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

587587
* *allow_broadcast* tells the kernel to allow this endpoint to send
@@ -607,7 +607,8 @@ Opening network connections
607607

608608
.. versionchanged:: 3.8.1
609609
The *reuse_address* parameter is no longer supported, as using
610-
:py:const:`~sockets.SO_REUSEADDR` poses a significant security concern for
610+
:ref:`socket.SO_REUSEADDR <socket-unix-constants>`
611+
poses a significant security concern for
611612
UDP. Explicitly passing ``reuse_address=True`` will raise an exception.
612613

613614
When multiple processes with differing UIDs assign sockets to an
@@ -616,7 +617,8 @@ Opening network connections
616617

617618
For supported platforms, *reuse_port* can be used as a replacement for
618619
similar functionality. With *reuse_port*,
619-
:py:const:`~sockets.SO_REUSEPORT` is used instead, which specifically
620+
:ref:`socket.SO_REUSEPORT <socket-unix-constants>`
621+
is used instead, which specifically
620622
prevents processes with differing UIDs from assigning sockets to the same
621623
socket address.
622624

@@ -758,7 +760,7 @@ Creating network servers
758760
.. versionchanged:: 3.6
759761

760762
Added *ssl_handshake_timeout* and *start_serving* parameters.
761-
The socket option :py:const:`~socket.TCP_NODELAY` is set by default
763+
The socket option :ref:`socket.TCP_NODELAY <socket-unix-constants>` is set by default
762764
for all TCP connections.
763765

764766
.. versionchanged:: 3.11
@@ -1888,7 +1890,7 @@ Set signal handlers for SIGINT and SIGTERM
18881890

18891891
(This ``signals`` example only works on Unix.)
18901892

1891-
Register handlers for signals :py:data:`SIGINT` and :py:data:`SIGTERM`
1893+
Register handlers for signals :const:`~signal.SIGINT` and :const:`~signal.SIGTERM`
18921894
using the :meth:`loop.add_signal_handler` method::
18931895

18941896
import asyncio

Doc/library/socket.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,11 @@ Constants
352352
defined then this protocol is unsupported. More constants may be available
353353
depending on the system.
354354

355+
.. data:: AF_UNSPEC
356+
357+
:const:`AF_UNSPEC` means that
358+
:func:`getaddrinfo` should return socket addresses for any
359+
address family (either IPv4, IPv6, or any other) that can be used.
355360

356361
.. data:: SOCK_STREAM
357362
SOCK_DGRAM
@@ -380,6 +385,8 @@ Constants
380385

381386
.. versionadded:: 3.2
382387

388+
.. _socket-unix-constants:
389+
383390
.. data:: SO_*
384391
SOMAXCONN
385392
MSG_*

Doc/tools/.nitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ Doc/library/__future__.rst
3434
Doc/library/abc.rst
3535
Doc/library/aifc.rst
3636
Doc/library/ast.rst
37-
Doc/library/asyncio-eventloop.rst
3837
Doc/library/asyncio-extending.rst
3938
Doc/library/asyncio-policy.rst
4039
Doc/library/asyncio-stream.rst

0 commit comments

Comments
 (0)