Skip to content

Commit 46389c3

Browse files
sobolevnhugovk
andauthored
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 Co-authored-by: Hugo van Kemenade <[email protected]> * Update asyncio-eventloop.rst * Update socket.rst --------- Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent fa35b9e commit 46389c3

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
@@ -1896,7 +1898,7 @@ Set signal handlers for SIGINT and SIGTERM
18961898

18971899
(This ``signals`` example only works on Unix.)
18981900

1899-
Register handlers for signals :py:data:`SIGINT` and :py:data:`SIGTERM`
1901+
Register handlers for signals :const:`~signal.SIGINT` and :const:`~signal.SIGTERM`
19001902
using the :meth:`loop.add_signal_handler` method::
19011903

19021904
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
@@ -30,7 +30,6 @@ Doc/howto/logging.rst
3030
Doc/howto/urllib2.rst
3131
Doc/library/abc.rst
3232
Doc/library/ast.rst
33-
Doc/library/asyncio-eventloop.rst
3433
Doc/library/asyncio-extending.rst
3534
Doc/library/asyncio-policy.rst
3635
Doc/library/asyncio-stream.rst

0 commit comments

Comments
 (0)