Skip to content

Commit

Permalink
bpo-46777: Fix incorrect use of directives in asyncio documentation (G…
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiy-storchaka authored Feb 18, 2022
1 parent d851216 commit 2923d87
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 181 deletions.
62 changes: 26 additions & 36 deletions Doc/library/asyncio-eventloop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ Creating Futures and Tasks
the name of the task using :meth:`Task.set_name`.

.. versionchanged:: 3.8
Added the ``name`` parameter.
Added the *name* parameter.

.. method:: loop.set_task_factory(factory)

Expand Down Expand Up @@ -456,7 +456,20 @@ Opening network connections
to wait for the TLS handshake to complete before aborting the connection.
``60.0`` seconds if ``None`` (default).

.. versionadded:: 3.8
.. versionchanged:: 3.5

Added support for SSL/TLS in :class:`ProactorEventLoop`.

.. versionchanged:: 3.6

The socket option :py:data:`~socket.TCP_NODELAY` is set by default
for all TCP connections.

.. versionchanged:: 3.7

Added the *ssl_handshake_timeout* parameter.

.. versionchanged:: 3.8

Added the *happy_eyeballs_delay* and *interleave* parameters.

Expand All @@ -471,19 +484,6 @@ Opening network connections

For more information: https://tools.ietf.org/html/rfc6555

.. versionadded:: 3.7

The *ssl_handshake_timeout* parameter.

.. versionchanged:: 3.6

The socket option :py:data:`~socket.TCP_NODELAY` is set by default
for all TCP connections.

.. versionchanged:: 3.5

Added support for SSL/TLS in :class:`ProactorEventLoop`.

.. seealso::

The :func:`open_connection` function is a high-level alternative
Expand Down Expand Up @@ -588,12 +588,8 @@ Opening network connections

.. availability:: Unix.

.. versionadded:: 3.7

The *ssl_handshake_timeout* parameter.

.. versionchanged:: 3.7

Added the *ssl_handshake_timeout* parameter.
The *path* parameter can now be a :term:`path-like object`.


Expand Down Expand Up @@ -672,15 +668,6 @@ Creating network servers
:meth:`Server.serve_forever` to make the server to start accepting
connections.

.. versionadded:: 3.7

Added *ssl_handshake_timeout* and *start_serving* parameters.

.. versionchanged:: 3.6

The socket option :py:data:`~socket.TCP_NODELAY` is set by default
for all TCP connections.

.. versionchanged:: 3.5

Added support for SSL/TLS in :class:`ProactorEventLoop`.
Expand All @@ -689,6 +676,12 @@ Creating network servers

The *host* parameter can be a sequence of strings.

.. versionchanged:: 3.6

Added *ssl_handshake_timeout* and *start_serving* parameters.
The socket option :py:data:`~socket.TCP_NODELAY` is set by default
for all TCP connections.

.. seealso::

The :func:`start_server` function is a higher-level alternative API
Expand All @@ -713,12 +706,9 @@ Creating network servers

.. availability:: Unix.

.. versionadded:: 3.7

The *ssl_handshake_timeout* and *start_serving* parameters.

.. versionchanged:: 3.7

Added the *ssl_handshake_timeout* and *start_serving* parameters.
The *path* parameter can now be a :class:`~pathlib.Path` object.

.. coroutinemethod:: loop.connect_accepted_socket(protocol_factory, \
Expand Down Expand Up @@ -746,11 +736,11 @@ Creating network servers

Returns a ``(transport, protocol)`` pair.

.. versionadded:: 3.7
.. versionadded:: 3.5.3

The *ssl_handshake_timeout* parameter.
.. versionchanged:: 3.7

.. versionadded:: 3.5.3
Added the *ssl_handshake_timeout* parameter.


Transferring files
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/asyncio-future.rst
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ Future Object
schedule the callbacks, and return ``True``.

.. versionchanged:: 3.9
Added the ``msg`` parameter.
Added the *msg* parameter.

.. method:: exception()

Expand Down
10 changes: 3 additions & 7 deletions Doc/library/asyncio-queue.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ Queue
the queue is always known and can be returned by calling the
:meth:`qsize` method.

.. versionchanged:: 3.10
Removed the *loop* parameter.


This class is :ref:`not thread safe <asyncio-multithreading>`.

Expand Down Expand Up @@ -105,13 +108,6 @@ Queue
Raises :exc:`ValueError` if called more times than there were
items placed in the queue.

.. deprecated-removed:: 3.8 3.10

The ``loop`` parameter. This function has been implicitly getting the
current running loop since 3.7. See
:ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
for more information.


Priority Queue
==============
Expand Down
54 changes: 14 additions & 40 deletions Doc/library/asyncio-stream.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,11 @@ and work with streams:
The rest of the arguments are passed directly to
:meth:`loop.create_connection`.

.. versionadded:: 3.7

The *ssl_handshake_timeout* parameter.

.. deprecated-removed:: 3.8 3.10
.. versionchanged:: 3.7
Added the *ssl_handshake_timeout* parameter.

The ``loop`` parameter. This function has been implicitly getting the
current running loop since 3.7. See
:ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
for more information.
.. versionchanged:: 3.10
Removed the *loop* parameter.


.. coroutinefunction:: start_server(client_connected_cb, host=None, \
Expand Down Expand Up @@ -104,16 +99,11 @@ and work with streams:
The rest of the arguments are passed directly to
:meth:`loop.create_server`.

.. versionadded:: 3.7

The *ssl_handshake_timeout* and *start_serving* parameters.

.. deprecated-removed:: 3.8 3.10
.. versionchanged:: 3.7
Added the *ssl_handshake_timeout* and *start_serving* parameters.

The ``loop`` parameter. This function has been implicitly getting the
current running loop since 3.7. See
:ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
for more information.
.. versionchanged:: 3.10
Removed the *loop* parameter.


.. rubric:: Unix Sockets
Expand All @@ -131,20 +121,12 @@ and work with streams:

.. availability:: Unix.

.. versionadded:: 3.7

The *ssl_handshake_timeout* parameter.

.. versionchanged:: 3.7

Added the *ssl_handshake_timeout* parameter.
The *path* parameter can now be a :term:`path-like object`

.. deprecated-removed:: 3.8 3.10

The ``loop`` parameter. This function has been implicitly getting the
current running loop since 3.7. See
:ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
for more information.
.. versionchanged:: 3.10
Removed the *loop* parameter.


.. coroutinefunction:: start_unix_server(client_connected_cb, path=None, \
Expand All @@ -159,20 +141,12 @@ and work with streams:

.. availability:: Unix.

.. versionadded:: 3.7

The *ssl_handshake_timeout* and *start_serving* parameters.

.. versionchanged:: 3.7

Added the *ssl_handshake_timeout* and *start_serving* parameters.
The *path* parameter can now be a :term:`path-like object`.

.. deprecated-removed:: 3.8 3.10

The ``loop`` parameter. This function has been implicitly getting the
current running loop since 3.7. See
:ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
for more information.
.. versionchanged:: 3.10
Removed the *loop* parameter.


StreamReader
Expand Down
16 changes: 4 additions & 12 deletions Doc/library/asyncio-subprocess.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,8 @@ Creating Subprocesses
See the documentation of :meth:`loop.subprocess_exec` for other
parameters.

.. deprecated-removed:: 3.8 3.10

The ``loop`` parameter. This function has been implicitly getting the
current running loop since 3.7. See
:ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
for more information.
.. versionchanged:: 3.10
Removed the *loop* parameter.


.. coroutinefunction:: create_subprocess_shell(cmd, stdin=None, \
Expand All @@ -106,12 +102,8 @@ Creating Subprocesses
escape whitespace and special shell characters in strings that are going
to be used to construct shell commands.

.. deprecated-removed:: 3.8 3.10

The ``loop`` parameter. This function has been implicitly getting the
current running loop since 3.7. See
:ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
for more information.
.. versionchanged:: 3.10
Removed the *loop* parameter.

.. note::

Expand Down
36 changes: 10 additions & 26 deletions Doc/library/asyncio-sync.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,8 @@ Lock
finally:
lock.release()

.. deprecated-removed:: 3.8 3.10
The ``loop`` parameter. This class has been implicitly getting the
current running loop since 3.7. See
:ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
for more information.
.. versionchanged:: 3.10
Removed the *loop* parameter.

.. coroutinemethod:: acquire()

Expand Down Expand Up @@ -111,11 +108,8 @@ Event
:meth:`clear` method. The :meth:`~Event.wait` method blocks until the
flag is set to *true*. The flag is set to *false* initially.

.. deprecated-removed:: 3.8 3.10
The ``loop`` parameter. This class has been implicitly getting the
current running loop since 3.7. See
:ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
for more information.
.. versionchanged:: 3.10
Removed the *loop* parameter.

.. _asyncio_example_sync_event:

Expand Down Expand Up @@ -189,11 +183,8 @@ Condition
``None``. In the latter case a new Lock object is created
automatically.

.. deprecated-removed:: 3.8 3.10
The ``loop`` parameter. This class has been implicitly getting the
current running loop since 3.7. See
:ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
for more information.
.. versionchanged:: 3.10
Removed the *loop* parameter.

The preferred way to use a Condition is an :keyword:`async with`
statement::
Expand Down Expand Up @@ -291,11 +282,8 @@ Semaphore
internal counter (``1`` by default). If the given value is
less than ``0`` a :exc:`ValueError` is raised.

.. deprecated-removed:: 3.8 3.10
The ``loop`` parameter. This class has been implicitly getting the
current running loop since 3.7. See
:ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
for more information.
.. versionchanged:: 3.10
Removed the *loop* parameter.

The preferred way to use a Semaphore is an :keyword:`async with`
statement::
Expand Down Expand Up @@ -349,12 +337,8 @@ BoundedSemaphore
a :exc:`ValueError` in :meth:`~Semaphore.release` if it
increases the internal counter above the initial *value*.

.. deprecated-removed:: 3.8 3.10

The ``loop`` parameter. This class has been implicitly getting the
current running loop since 3.7. See
:ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
for more information.
.. versionchanged:: 3.10
Removed the *loop* parameter.

---------

Expand Down
Loading

0 comments on commit 2923d87

Please sign in to comment.