@@ -279,8 +279,8 @@ Sleeping
279
279
``sleep() `` always suspends the current task, allowing other tasks
280
280
to run.
281
281
282
- The * loop * argument is deprecated and scheduled for removal
283
- in Python 3.10 .
282
+ .. deprecated-removed :: 3.8 3.10
283
+ The * loop * parameter .
284
284
285
285
.. _asyncio_example_sleep :
286
286
@@ -437,8 +437,8 @@ Timeouts
437
437
438
438
If the wait is cancelled, the future *aw * is also cancelled.
439
439
440
- The * loop * argument is deprecated and scheduled for removal
441
- in Python 3.10 .
440
+ .. deprecated-removed :: 3.8 3.10
441
+ The * loop * parameter .
442
442
443
443
.. _asyncio_example_waitfor :
444
444
@@ -478,19 +478,21 @@ Waiting Primitives
478
478
set concurrently and block until the condition specified
479
479
by *return_when *.
480
480
481
- If any awaitable in *aws * is a coroutine, it is automatically
482
- scheduled as a Task. Passing coroutines objects to
483
- ``wait() `` directly is deprecated as it leads to
484
- :ref: `confusing behavior <asyncio_example_wait_coroutine >`.
481
+ .. deprecated :: 3.8
482
+
483
+ If any awaitable in *aws * is a coroutine, it is automatically
484
+ scheduled as a Task. Passing coroutines objects to
485
+ ``wait() `` directly is deprecated as it leads to
486
+ :ref: `confusing behavior <asyncio_example_wait_coroutine >`.
485
487
486
488
Returns two sets of Tasks/Futures: ``(done, pending) ``.
487
489
488
490
Usage::
489
491
490
492
done, pending = await asyncio.wait(aws)
491
493
492
- The * loop * argument is deprecated and scheduled for removal
493
- in Python 3.10 .
494
+ .. deprecated-removed :: 3.8 3.10
495
+ The * loop * parameter .
494
496
495
497
*timeout * (a float or int), if specified, can be used to control
496
498
the maximum number of seconds to wait before returning.
@@ -550,6 +552,8 @@ Waiting Primitives
550
552
if task in done:
551
553
# Everything will work as expected now.
552
554
555
+ .. deprecated :: 3.8
556
+
553
557
Passing coroutine objects to ``wait() `` directly is
554
558
deprecated.
555
559
@@ -868,8 +872,10 @@ Task Object
868
872
If *loop * is ``None ``, the :func: `get_event_loop ` function
869
873
is used to get the current loop.
870
874
871
- This method is **deprecated ** and will be removed in
872
- Python 3.9. Use the :func: `asyncio.all_tasks ` function instead.
875
+ .. deprecated-removed :: 3.7 3.9
876
+
877
+ Do not call this as a task method. Use the :func: `asyncio.all_tasks `
878
+ function instead.
873
879
874
880
.. classmethod :: current_task(loop=None)
875
881
@@ -878,9 +884,10 @@ Task Object
878
884
If *loop * is ``None ``, the :func: `get_event_loop ` function
879
885
is used to get the current loop.
880
886
881
- This method is **deprecated ** and will be removed in
882
- Python 3.9. Use the :func: `asyncio.current_task ` function
883
- instead.
887
+ .. deprecated-removed :: 3.7 3.9
888
+
889
+ Do not call this as a task method. Use the
890
+ :func: `asyncio.current_task ` function instead.
884
891
885
892
886
893
.. _asyncio_generator_based_coro :
0 commit comments