[3.8] bpo-36373: Deprecate explicit loop in task and subprocess API (GH-16033) by miss-islington · Pull Request #16039 · python/cpython

Expand Up @@ -334,6 +334,9 @@ Running Tasks Concurrently cancellation of one submitted Task/Future to cause other Tasks/Futures to be cancelled.
.. deprecated-removed:: 3.8 3.10 The *loop* parameter.
.. _asyncio_example_gather:
Example:: Expand Down Expand Up @@ -411,6 +414,9 @@ Shielding From Cancellation except CancelledError: res = None
.. deprecated-removed:: 3.8 3.10 The *loop* parameter.

Timeouts ======== Expand Down Expand Up @@ -478,22 +484,12 @@ Waiting Primitives set concurrently and block until the condition specified by *return_when*.
.. deprecated:: 3.8
If any awaitable in *aws* is a coroutine, it is automatically scheduled as a Task. Passing coroutines objects to ``wait()`` directly is deprecated as it leads to :ref:`confusing behavior <asyncio_example_wait_coroutine>`.
Returns two sets of Tasks/Futures: ``(done, pending)``.
Usage::
done, pending = await asyncio.wait(aws)
.. deprecated-removed:: 3.8 3.10 The *loop* parameter.
*timeout* (a float or int), if specified, can be used to control the maximum number of seconds to wait before returning.
Expand Down Expand Up @@ -525,6 +521,17 @@ Waiting Primitives Unlike :func:`~asyncio.wait_for`, ``wait()`` does not cancel the futures when a timeout occurs.
.. deprecated:: 3.8
If any awaitable in *aws* is a coroutine, it is automatically scheduled as a Task. Passing coroutines objects to ``wait()`` directly is deprecated as it leads to :ref:`confusing behavior <asyncio_example_wait_coroutine>`.
.. deprecated-removed:: 3.8 3.10
The *loop* parameter.
.. _asyncio_example_wait_coroutine: .. note::
Expand Down Expand Up @@ -568,6 +575,9 @@ Waiting Primitives Raises :exc:`asyncio.TimeoutError` if the timeout occurs before all Futures are done.
.. deprecated-removed:: 3.8 3.10 The *loop* parameter.
Example::
for f in as_completed(aws): Expand Down Expand Up @@ -694,6 +704,9 @@ Task Object .. versionchanged:: 3.8 Added the ``name`` parameter.
.. deprecated-removed:: 3.8 3.10 The *loop* parameter.
.. method:: cancel()
Request the Task to be cancelled. Expand Down