summaryrefslogtreecommitdiff
path: root/Lib/asyncio/tasks.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncio/tasks.py')
-rw-r--r--Lib/asyncio/tasks.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
index b274b9bd33..1dc595298c 100644
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -95,7 +95,7 @@ class Task(futures._PyFuture): # Inherit Python Task implementation
None is returned when called not in the context of a Task.
"""
- warnings.warn("Task.current_task() is deprecated, "
+ warnings.warn("Task.current_task() is deprecated since Python 3.7, "
"use asyncio.current_task() instead",
DeprecationWarning,
stacklevel=2)
@@ -109,7 +109,7 @@ class Task(futures._PyFuture): # Inherit Python Task implementation
By default all tasks for the current event loop are returned.
"""
- warnings.warn("Task.all_tasks() is deprecated, "
+ warnings.warn("Task.all_tasks() is deprecated since Python 3.7, "
"use asyncio.all_tasks() instead",
DeprecationWarning,
stacklevel=2)
@@ -388,8 +388,8 @@ async def wait(fs, *, loop=None, timeout=None, return_when=ALL_COMPLETED):
if loop is None:
loop = events.get_running_loop()
else:
- warnings.warn("The loop argument is deprecated and scheduled for "
- "removal in Python 3.10.",
+ warnings.warn("The loop argument is deprecated since Python 3.8, "
+ "and scheduled for removal in Python 3.10.",
DeprecationWarning, stacklevel=2)
fs = {ensure_future(f, loop=loop) for f in set(fs)}
@@ -418,8 +418,8 @@ async def wait_for(fut, timeout, *, loop=None):
if loop is None:
loop = events.get_running_loop()
else:
- warnings.warn("The loop argument is deprecated and scheduled for "
- "removal in Python 3.10.",
+ warnings.warn("The loop argument is deprecated since Python 3.8, "
+ "and scheduled for removal in Python 3.10.",
DeprecationWarning, stacklevel=2)
if timeout is None:
@@ -600,8 +600,8 @@ async def sleep(delay, result=None, *, loop=None):
if loop is None:
loop = events.get_running_loop()
else:
- warnings.warn("The loop argument is deprecated and scheduled for "
- "removal in Python 3.10.",
+ warnings.warn("The loop argument is deprecated since Python 3.8, "
+ "and scheduled for removal in Python 3.10.",
DeprecationWarning, stacklevel=2)
future = loop.create_future()