mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
asyncio: PendingDeprecationWarning -> DeprecationWarning (GH-12494)
`Task.current_task()` and `Task.all_tasks()` will be removed in 3.9.
This commit is contained in:
parent
b0df45e55d
commit
c5c6cdada3
3 changed files with 13 additions and 13 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue