8000 bpo-42392: Remove deprecated loop parameter from docs (GH-23552) · python/cpython@86150d3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 86150d3

Browse files
authored
bpo-42392: Remove deprecated loop parameter from docs (GH-23552)
1 parent c642374 commit 86150d3

File tree

5 files changed

+22
-80
lines changed

5 files changed

+22
-80
lines changed

Doc/library/asyncio-queue.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ See also the `Examples`_ section below.
2323
Queue
2424
=====
2525

26-
.. class:: Queue(maxsize=0, \*, loop=None)
26+
.. class:: Queue(maxsize=0)
2727

2828
A first in, first out (FIFO) queue.
2929

@@ -36,9 +36,6 @@ Queue
3636
the queue is always known and can be returned by calling the
3737
:meth:`qsize` method.
3838

39-
.. deprecated-removed:: 3.8 3.10
40-
The *loop* parameter.
41-
4239

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

Doc/library/asyncio-stream.rst

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ and work with streams:
4949

5050

5151
.. coroutinefunction:: open_connection(host=None, port=None, \*, \
52-
loop=None, limit=None, ssl=None, family=0, \
53-
proto=0, flags=0, sock=None, local_addr=None, \
52+
limit=None, ssl=None, family=0, proto=0, \
53+
flags=0, sock=None, local_addr=None, \
5454
server_hostname=None, ssl_handshake_timeout=None)
5555

5656
Establish a network connection and return a pair of
@@ -59,9 +59,6 @@ and work with streams:
5959
The returned *reader* and *writer* objects are instances of
6060
:class:`StreamReader` and :class:`StreamWriter` classes.
6161

62-
The *loop* argument is optional and can always be determined
63-
automatically when this function is awaited from a coroutine.
64-
6562
*limit* determines the buffer size limit used by the
6663
returned :class:`StreamReader` instance. By default the *limit*
6764
is set to 64 KiB.
@@ -74,7 +71,7 @@ and work with streams:
7471
The *ssl_handshake_timeout* parameter.
7572

7673
.. coroutinefunction:: start_server(client_connected_cb, host=None, \
77-
port=None, \*, loop=None, limit=None, \
74+
port=None, \*, limit=None, \
7875
family=socket.AF_UNSPEC, \
7976
flags=socket.AI_PASSIVE, sock=None, \
8077
backlog=100, ssl=None, reuse_address=None, \
@@ -92,9 +89,6 @@ and work with streams:
9289
:ref:`coroutine function <coroutine>`; if it is a coroutine function,
9390
it will be automatically scheduled as a :class:`Task`.
9491

95-
The *loop* argument is optional and can always be determined
96-
automatically when this method is awaited from a coroutine.
97-
9892
*limit* determines the buffer size limit used by the
9993
returned :class:`StreamReader` instance. By default the *limit*
10094
is set to 64 KiB.
@@ -109,9 +103,9 @@ and work with streams:
109103

110104
.. rubric:: Unix Sockets
111105

112-
.. coroutinefunction:: open_unix_connection(path=None, \*, loop=None, \
113-
limit=None, ssl=None, sock=None, \
114-
server_hostname=None, ssl_handshake_timeout=None)
106+
.. coroutinefunction:: open_unix_connection(path=None, \*, limit=None, \
107+
ssl=None, sock=None, server_hostname=None, \
108+
ssl_handshake_timeout=None)
115109

116110
Establish a Unix socket connection and return a pair of
117111
``(reader, writer)``.
@@ -132,9 +126,8 @@ and work with streams:
132126

133127

134128
.. coroutinefunction:: start_unix_server(client_connected_cb, path=None, \
135-
\*, loop=None, limit=None, sock=None, \
136-
backlog=100, ssl=None, ssl_handshake_timeout=None, \
137-
start_serving=True)
129+
\*, limit=None, sock=None, backlog=100, ssl=None, \
130+
ssl_handshake_timeout=None, start_serving=True)
138131

139132
Start a Unix socket server.
140133

Doc/library/asyncio-subprocess.rst

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ Creating Subprocesses
6262
=====================
6363

6464
.. coroutinefunction:: create_subprocess_exec(program, \*args, stdin=None, \
65-
stdout=None, stderr=None, loop=None, \
66-
limit=None, \*\*kwds)
65+
stdout=None, stderr=None, limit=None, \*\*kwds)
6766

6867
Create a subprocess.
6968

@@ -76,13 +75,9 @@ Creating Subprocesses
7675
See the documentation of :meth:`loop.subprocess_exec` for other
7776
parameters.
7877

79-
.. deprecated-removed:: 3.8 3.10
80-
81-
The *loop* parameter.
8278

8379
.. coroutinefunction:: create_subprocess_shell(cmd, stdin=None, \
84-
stdout=None, stderr=None, loop=None, \
85-
limit=None, \*\*kwds)
80+
stdout=None, stderr=None, limit=None, \*\*kwds)
8681

8782
Run the *cmd* shell command.
8883

@@ -104,10 +99,6 @@ Creating Subprocesses
10499
escape whitespace and special shell characters in strings that are going
105100
to be used to construct shell commands.
106101

107-
.. deprecated-removed:: 3.8 3.10
108-
109-
The *loop* parameter.
110-
111102
.. note::
112103

113104
Subprocesses are available for Windows if a :class:`ProactorEventLoop` is

Doc/library/asyncio-sync.rst

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ asyncio has the following basic synchronization primitives:
3636
Lock
3737
====
3838

39-
.. class:: Lock(\*, loop=None)
39+
.. class:: Lock()
4040

4141
Implements a mutex lock for asyncio tasks. Not thread-safe.
4242

@@ -63,9 +63,6 @@ Lock
6363
finally:
6464
lock.release()
6565

66-
.. deprecated-removed:: 3.8 3.10
67-
The *loop* parameter.
68-
6966
.. coroutinemethod:: acquire()
7067

7168
Acquire the lock.
@@ -96,7 +93,7 @@ Lock
9693
Event
9794
=====
9895

99-
.. class:: Event(\*, loop=None)
96+
.. class:: Event()
10097

10198
An event object. Not thread-safe.
10299

@@ -108,10 +105,6 @@ Event
108105
:meth:`clear` method. The :meth:`wait` method blocks until the
109106
flag is set to *true*. The flag is set to *false* initially.
110107

111-
112-
.. deprecated-removed:: 3.8 3.10
113-
The *loop* parameter.
114-
115108
.. _asyncio_example_sync_event:
116109

117110
Example::
@@ -166,7 +159,7 @@ Event
166159
Condition
167160
=========
168161

169-
.. class:: Condition(lock=None, \*, loop=None)
162+
.. class:: Condition(lock=None)
170163

171164
A Condition object. Not thread-safe.
172165

@@ -184,10 +177,6 @@ Condition
184177
``None``. In the latter case a new Lock object is created
185178
automatically.
186179

187-
188-
.. deprecated-removed:: 3.8 3.10
189-
The *loop* parameter.
190-
191180
The preferred way to use a Condition is an :keyword:`async with`
192181
statement::
193182

@@ -270,7 +259,7 @@ Condition
270259
Semaphore
271260
=========
272261

273-
.. class:: Semaphore(value=1, \*, loop=None)
262+
.. class:: Semaphore(value=1)
274263

275264
A Semaphore object. Not thread-safe.
276265

@@ -284,10 +273,6 @@ Semaphore
284273
internal counter (``1`` by default). If the given value is
285274
less than ``0`` a :exc:`ValueError` is raised.
286275

287-
288-
.. deprecated-removed:: 3.8 3.10
289-
The *loop* parameter.
290-
291276
The preferred way to use a Semaphore is an :keyword:`async with`
292277
statement::
293278

@@ -332,18 +317,14 @@ Semaphore
332317
BoundedSemaphore
333318
================
334319

335-
.. class:: BoundedSemaphore(value=1, \*, loop=None)
320+
.. class:: BoundedSemaphore(value=1)
336321

337322
A bounded semaphore object. Not thread-safe.
338323

339324
Bounded Semaphore is a version of :class:`Semaphore` that raises
340325
a :exc:`ValueError` in :meth:`~Semaphore.release` if it
341326
increases the internal counter above the initial *value*.
342327

343-
344-
.. deprecated-removed:: 3.8 3.10
345-
The *loop* parameter.
346-
347328
---------
348329

349330

Doc/library/asyncio-task.rst

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ Creating Tasks
283283
Sleeping
284284
========
285285

286-
.. coroutinefunction:: sleep(delay, result=None, \*, loop=None)
286+
.. coroutinefunction:: sleep(delay, result=None)
287287

288288
Block for *delay* seconds.
289289

@@ -293,9 +293,6 @@ Sleeping
293293
``sleep()`` always suspends the current task, allowing other tasks
294294
to run.
295295

296-
.. deprecated-removed:: 3.8 3.10
297-
The *loop* parameter.
298-
299296
.. _asyncio_example_sleep:
300297

301298
Example of coroutine displaying the current date every second
@@ -319,7 +316,7 @@ Sleeping
319316
Running Tasks Concurrently
320317
==========================
321318

322-
.. awaitablefunction:: gather(\*aws, loop=None, return_exceptions=False)
319+
.. awaitablefunction:: gather(\*aws, return_exceptions=False)
323320

324321
Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws*
325322
sequence *concurrently*.
@@ -348,9 +345,6 @@ Running Tasks Concurrently
348345
cancellation of one submitted Task/Future to cause other
349346
Tasks/Futures to be cancelled.
350347

351-
.. deprecated-removed:: 3.8 3.10
352-
The *loop* parameter.
353-
354348
.. _asyncio_example_gather:
355349

356350
Example::
@@ -403,7 +397,7 @@ Running Tasks Concurrently
403397
Shielding From Cancellation
404398
===========================
405399

406-
.. awaitablefunction:: shield(aw, \*, loop=None)
400+
.. awaitablefunction:: shield(aw)
407401

408402
Protect an :ref:`awaitable object <asyncio-awaitables>`
409403
from being :meth:`cancelled <Task.cancel>`.
@@ -436,14 +430,11 @@ Shielding From Cancellation
436430
except CancelledError:
437431
res = None
438432

439-
.. deprecated-removed:: 3.8 3.10
440-
The *loop* parameter.
441-
442433

443434
Timeouts
444435
========
445436

446-
.. coroutinefunction:: wait_for(aw, timeout, \*, loop=None)
437+
.. coroutinefunction:: wait_for(aw, timeout)
447438

448439
Wait for the *aw* :ref:`awaitable <asyncio-awaitables>`
449440
to complete with a timeout.
@@ -466,9 +457,6 @@ Timeouts
466457

467458
If the wait is cancelled, the future *aw* is also cancelled.
468459

469-
.. deprecated-removed:: 3.8 3.10
470-
The *loop* parameter.
471-
472460
.. _asyncio_example_waitfor:
473461

474462
Example::
@@ -500,8 +488,7 @@ Timeouts
500488
Waiting Primitives
501489
==================
502490

503-
.. coroutinefunction:: wait(aws, \*, loop=None, timeout=None,\
504-
return_when=ALL_COMPLETED)
491+
.. coroutinefunction:: wait(aws, \*, timeout=None, return_when=ALL_COMPLETED)
505492

506493
Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws*
507494
iterable concurrently and block until the condition specified
@@ -553,10 +540,6 @@ Waiting Primitives
553540
``wait()`` directly is deprecated as it leads to
554541
:ref:`confusing behavior <asyncio_example_wait_coroutine>`.
555542

556-
.. deprecated-removed:: 3.8 3.10
557-
558-
The *loop* parameter.
559-
560543
.. _asyncio_example_wait_coroutine:
561544
.. note::
562545

@@ -590,7 +573,7 @@ Waiting Primitives
590573
deprecated.
591574

592575

593-
.. function:: as_completed(aws, \*, loop=None, timeout=None)
576+
.. function:: as_completed(aws, \*, timeout=None)
594577

595578
Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws*
596579
iterable concurrently. Return an iterator of coroutines.
@@ -600,9 +583,6 @@ Waiting Primitives
600583
Raises :exc:`asyncio.TimeoutError` if the timeout occurs before
601584
all Futures are done.
602585

603-
.. deprecated-removed:: 3.8 3.10
604-
The *loop* parameter.
605-
606586
Example::
607587

608588
for coro in as_completed(aws):

0 commit comments

Comments
 (0)
0