summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/tasks.py
diff options
context:
space:
mode:
authorMatthias Bussonnier <bussonniermatthias@gmail.com>2019-05-21 06:20:10 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-05-21 06:20:10 (GMT)
commitd0ebf13e50dd736cdb355fa42c23837abbb88127 (patch)
tree9367648cca88c02d1500dea9f5b9cafb28de32da /Lib/asyncio/tasks.py
parent3099ae407541b63249657b971fb35ff217508d86 (diff)
downloadcpython-d0ebf13e50dd736cdb355fa42c23837abbb88127.zip
cpython-d0ebf13e50dd736cdb355fa42c23837abbb88127.tar.gz
cpython-d0ebf13e50dd736cdb355fa42c23837abbb88127.tar.bz2
bpo-36932: use proper deprecation-removed directive (GH-13349)
.. And update some deprecation warnings with version numbers. https://bugs.python.org/issue36932
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 b274b9b..1dc5952 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()