bpo-36932: use proper deprecation-removed directive (GH-13349)



.. And update some deprecation warnings with version numbers.




https://bugs.python.org/issue36932
diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst
index bb064bd..d94fa58 100644
--- a/Doc/library/asyncio-task.rst
+++ b/Doc/library/asyncio-task.rst
@@ -279,8 +279,8 @@
    ``sleep()`` always suspends the current task, allowing other tasks
    to run.
 
-   The *loop* argument is deprecated and scheduled for removal
-   in Python 3.10.
+   .. deprecated-removed:: 3.8 3.10
+      The *loop* parameter.
 
    .. _asyncio_example_sleep:
 
@@ -437,8 +437,8 @@
 
    If the wait is cancelled, the future *aw* is also cancelled.
 
-   The *loop* argument is deprecated and scheduled for removal
-   in Python 3.10.
+   .. deprecated-removed:: 3.8 3.10
+      The *loop* parameter.
 
    .. _asyncio_example_waitfor:
 
@@ -478,10 +478,12 @@
    set concurrently and block until the condition specified
    by *return_when*.
 
-   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:: 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)``.
 
@@ -489,8 +491,8 @@
 
         done, pending = await asyncio.wait(aws)
 
-   The *loop* argument is deprecated and scheduled for removal
-   in Python 3.10.
+   .. 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.
@@ -550,6 +552,8 @@
           if task in done:
               # Everything will work as expected now.
 
+   .. deprecated:: 3.8
+
       Passing coroutine objects to ``wait()`` directly is
       deprecated.
 
@@ -868,8 +872,10 @@
       If *loop* is ``None``, the :func:`get_event_loop` function
       is used to get the current loop.
 
-      This method is **deprecated** and will be removed in
-      Python 3.9.  Use the :func:`asyncio.all_tasks` function instead.
+      .. deprecated-removed:: 3.7 3.9
+
+         Do not call this as a task method. Use the :func:`asyncio.all_tasks`
+         function instead.
 
    .. classmethod:: current_task(loop=None)
 
@@ -878,9 +884,10 @@
       If *loop* is ``None``, the :func:`get_event_loop` function
       is used to get the current loop.
 
-      This method is **deprecated** and will be removed in
-      Python 3.9.  Use the :func:`asyncio.current_task` function
-      instead.
+      .. deprecated-removed:: 3.7 3.9
+
+         Do not call this as a task method.  Use the
+         :func:`asyncio.current_task` function instead.
 
 
 .. _asyncio_generator_based_coro: