Skip to content

Commit 6eb3477

Browse files
bpo-46777: Fix incorrect use of directives in asyncio documentation (GH-31388)
(cherry picked from commit 2923d87) Co-authored-by: Serhiy Storchaka <[email protected]>
1 parent feb4455 commit 6eb3477

File tree

7 files changed

+82
-181
lines changed

7 files changed

+82
-181
lines changed

Doc/library/asyncio-eventloop.rst

Lines changed: 26 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ Creating Futures and Tasks
343343
the name of the task using :meth:`Task.set_name`.
344344

345345
.. versionchanged:: 3.8
346-
Added the ``name`` parameter.
346+
Added the *name* parameter.
347347

348348
.. method:: loop.set_task_factory(factory)
349349

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

459-
.. versionadded:: 3.8
459+
.. versionchanged:: 3.5
460+
461+
Added support for SSL/TLS in :class:`ProactorEventLoop`.
462+
463+
.. versionchanged:: 3.6
464+
465+
The socket option :py:data:`~socket.TCP_NODELAY` is set by default
466+
for all TCP connections.
467+
468+
.. versionchanged:: 3.7
469+
470+
Added the *ssl_handshake_timeout* parameter.
471+
472+
.. versionchanged:: 3.8
460473

461474
Added the *happy_eyeballs_delay* and *interleave* parameters.
462475

@@ -471,19 +484,6 @@ Opening network connections
471484

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

474-
.. versionadded:: 3.7
475-
476-
The *ssl_handshake_timeout* parameter.
477-
478-
.. versionchanged:: 3.6
479-
480-
The socket option :py:data:`~socket.TCP_NODELAY` is set by default
481-
for all TCP connections.
482-
483-
.. versionchanged:: 3.5
484-
485-
Added support for SSL/TLS in :class:`ProactorEventLoop`.
486-
487487
.. seealso::
488488

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

589589
.. availability:: Unix.
590590

591-
.. versionadded:: 3.7
592-
593-
The *ssl_handshake_timeout* parameter.
594-
595591
.. versionchanged:: 3.7
596-
592+
Added the *ssl_handshake_timeout* parameter.
597593
The *path* parameter can now be a :term:`path-like object`.
598594

599595

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

675-
.. versionadded:: 3.7
676-
677-
Added *ssl_handshake_timeout* and *start_serving* parameters.
678-
679-
.. versionchanged:: 3.6
680-
681-
The socket option :py:data:`~socket.TCP_NODELAY` is set by default
682-
for all TCP connections.
683-
684671
.. versionchanged:: 3.5
685672

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

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

679+
.. versionchanged:: 3.6
680+
681+
Added *ssl_handshake_timeout* and *start_serving* parameters.
682+
The socket option :py:data:`~socket.TCP_NODELAY` is set by default
683+
for all TCP connections.
684+
692685
.. seealso::
693686

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

714707
.. availability:: Unix.
715708

716-
.. versionadded:: 3.7
717-
718-
The *ssl_handshake_timeout* and *start_serving* parameters.
719-
720709
.. versionchanged:: 3.7
721710

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

724714
.. coroutinemethod:: loop.connect_accepted_socket(protocol_factory, \
@@ -746,11 +736,11 @@ Creating network servers
746736

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

749-
.. versionadded:: 3.7
739+
.. versionadded:: 3.5.3
750740

751-
The *ssl_handshake_timeout* parameter.
741+
.. versionchanged:: 3.7
752742

753-
.. versionadded:: 3.5.3
743+
Added the *ssl_handshake_timeout* parameter.
754744

755745

756746
Transferring files

Doc/library/asyncio-future.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ Future Object
194194
schedule the callbacks, and return ``True``.
195195

196196
.. versionchanged:: 3.9
197-
Added the ``msg`` parameter.
197+
Added the *msg* parameter.
198198

199199
.. method:: exception()
200200

Doc/library/asyncio-queue.rst

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ Queue
3636
the queue is always known and can be returned by calling the
3737
:meth:`qsize` method.
3838

39+
.. versionchanged:: 3.10
40+
Removed the *loop* parameter.
41+
3942

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

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

108-
.. deprecated-removed:: 3.8 3.10
109-
110-
The ``loop`` parameter. This function has been implicitly getting the
111-
current running loop since 3.7. See
112-
:ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
113-
for more information.
114-
115111

116112
Priority Queue
117113
==============

Doc/library/asyncio-stream.rst

Lines changed: 14 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,11 @@ and work with streams:
6666
The rest of the arguments are passed directly to
6767
:meth:`loop.create_connection`.
6868

69-
.. versionadded:: 3.7
70-
71-
The *ssl_handshake_timeout* parameter.
72-
73-
.. deprecated-removed:: 3.8 3.10
69+
.. versionchanged:: 3.7
70+
Added the *ssl_handshake_timeout* parameter.
7471

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

8075

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

107-
.. versionadded:: 3.7
108-
109-
The *ssl_handshake_timeout* and *start_serving* parameters.
110-
111-
.. deprecated-removed:: 3.8 3.10
102+
.. versionchanged:: 3.7
103+
Added the *ssl_handshake_timeout* and *start_serving* parameters.
112104

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

118108

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

132122
.. availability:: Unix.
133123

134-
.. versionadded:: 3.7
135-
136-
The *ssl_handshake_timeout* parameter.
137-
138124
.. versionchanged:: 3.7
139-
125+
Added the *ssl_handshake_timeout* parameter.
140126
The *path* parameter can now be a :term:`path-like object`
141127

142-
.. deprecated-removed:: 3.8 3.10
143-
144-
The ``loop`` parameter. This function has been implicitly getting the
145-
current running loop since 3.7. See
146-
:ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
147-
for more information.
128+
.. versionchanged:: 3.10
129+
Removed the *loop* parameter.
148130

149131

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

160142
.. availability:: Unix.
161143

162-
.. versionadded:: 3.7
163-
164-
The *ssl_handshake_timeout* and *start_serving* parameters.
165-
166144
.. versionchanged:: 3.7
167-
145+
Added the *ssl_handshake_timeout* and *start_serving* parameters.
168146
The *path* parameter can now be a :term:`path-like object`.
169147

170-
.. deprecated-removed:: 3.8 3.10
171-
172-
The ``loop`` parameter. This function has been implicitly getting the
173-
current running loop since 3.7. See
174-
:ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
175-
for more information.
148+
.. versionchanged:: 3.10
149+
Removed the *loop* parameter.
176150

177151

178152
StreamReader

Doc/library/asyncio-subprocess.rst

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,8 @@ Creating Subprocesses
7575
See the documentation of :meth:`loop.subprocess_exec` for other
7676
parameters.
7777

78-
.. deprecated-removed:: 3.8 3.10
79-
80-
The ``loop`` parameter. This function has been implicitly getting the
81-
current running loop since 3.7. See
82-
:ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
83-
for more information.
78+
.. versionchanged:: 3.10
79+
Removed the *loop* parameter.
8480

8581

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

109-
.. deprecated-removed:: 3.8 3.10
110-
111-
The ``loop`` parameter. This function has been implicitly getting the
112-
current running loop since 3.7. See
113-
:ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
114-
for more information.
105+
.. versionchanged:: 3.10
106+
Removed the *loop* parameter.
115107

116108
.. note::
117109

Doc/library/asyncio-sync.rst

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,8 @@ Lock
6363
finally:
6464
lock.release()
6565

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

7269
.. coroutinemethod:: acquire()
7370

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

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

120114
.. _asyncio_example_sync_event:
121115

@@ -189,11 +183,8 @@ Condition
189183
``None``. In the latter case a new Lock object is created
190184
automatically.
191185

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

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

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

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

352-
.. deprecated-removed:: 3.8 3.10
353-
354-
The ``loop`` parameter. This class has been implicitly getting the
355-
current running loop since 3.7. See
356-
:ref:`What's New in 3.10's Removed section <whatsnew310-removed>`
357-
for more information.
340+
.. versionchanged:: 3.10
341+
Removed the *loop* parameter.
358342

359343
---------
360344

0 commit comments

Comments
 (0)