aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/asyncio/tasks.py
diff options
context:
space:
mode:
authorMariatta Wijaya <mariatta.wijaya@gmail.com>2017-02-06 22:03:00 -0800
committerMariatta Wijaya <mariatta.wijaya@gmail.com>2017-02-06 22:03:00 -0800
commit4e7ff8b1a31ae9c11164940d4171df13b9c1e277 (patch)
treeaeee95367c229d8046851da9b1de6ead3561f11c /Lib/asyncio/tasks.py
parent81b8977349be685c7175601f2c80e33596c2114d (diff)
downloadcpython-4e7ff8b1a31ae9c11164940d4171df13b9c1e277.tar.gz
cpython-4e7ff8b1a31ae9c11164940d4171df13b9c1e277.zip
Issue #29314: Set the stacklevel to two in asyncio.async() Deprecation Warning
Diffstat (limited to 'Lib/asyncio/tasks.py')
-rw-r--r--Lib/asyncio/tasks.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
index 8852aa5ad2a..7b3bdb21865 100644
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -535,7 +535,8 @@ def async_(coro_or_future, *, loop=None):
"""
warnings.warn("asyncio.async() function is deprecated, use ensure_future()",
- DeprecationWarning)
+ DeprecationWarning,
+ stacklevel=2)
return ensure_future(coro_or_future, loop=loop)