summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/tasks.py
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2019-03-22 11:07:32 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-03-22 11:07:32 (GMT)
commitc5c6cdada3d41148bdeeacfe7528327b481c5d18 (patch)
tree19cd43afc4a6cf2351fe85a8beca0f2e111fdfd4 /Lib/asyncio/tasks.py
parentb0df45e55dc8304bac0e3cad0225472b84190964 (diff)
downloadcpython-c5c6cdada3d41148bdeeacfe7528327b481c5d18.zip
cpython-c5c6cdada3d41148bdeeacfe7528327b481c5d18.tar.gz
cpython-c5c6cdada3d41148bdeeacfe7528327b481c5d18.tar.bz2
asyncio: PendingDeprecationWarning -> DeprecationWarning (GH-12494)
`Task.current_task()` and `Task.all_tasks()` will be removed in 3.9.
Diffstat (limited to 'Lib/asyncio/tasks.py')
-rw-r--r--Lib/asyncio/tasks.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
index 15422da..d850837 100644
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -97,7 +97,7 @@ class Task(futures._PyFuture): # Inherit Python Task implementation
"""
warnings.warn("Task.current_task() is deprecated, "
"use asyncio.current_task() instead",
- PendingDeprecationWarning,
+ DeprecationWarning,
stacklevel=2)
if loop is None:
loop = events.get_event_loop()
@@ -111,7 +111,7 @@ class Task(futures._PyFuture): # Inherit Python Task implementation
"""
warnings.warn("Task.all_tasks() is deprecated, "
"use asyncio.all_tasks() instead",
- PendingDeprecationWarning,
+ DeprecationWarning,
stacklevel=2)
return _all_tasks_compat(loop)