summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMariatta Wijaya <mariatta.wijaya@gmail.com>2017-02-07 06:03:00 (GMT)
committerMariatta Wijaya <mariatta.wijaya@gmail.com>2017-02-07 06:03:00 (GMT)
commit4e7ff8b1a31ae9c11164940d4171df13b9c1e277 (patch)
treeaeee95367c229d8046851da9b1de6ead3561f11c /Lib
parent81b8977349be685c7175601f2c80e33596c2114d (diff)
downloadcpython-4e7ff8b1a31ae9c11164940d4171df13b9c1e277.zip
cpython-4e7ff8b1a31ae9c11164940d4171df13b9c1e277.tar.gz
cpython-4e7ff8b1a31ae9c11164940d4171df13b9c1e277.tar.bz2
Issue #29314: Set the stacklevel to two in asyncio.async() Deprecation Warning
Diffstat (limited to 'Lib')
-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 8852aa5..7b3bdb2 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)