summaryrefslogtreecommitdiff
path: root/Lib
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
commit866142546ade2b40f911712f03308fd7f1a35e77 (patch)
tree0a287c83e6591ad1f090affdba782d7fc9a30908 /Lib
parente3c7e835bdfc97750eb9b7fc0ad2493108c2d438 (diff)
downloadcpython-866142546ade2b40f911712f03308fd7f1a35e77.tar.gz
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 8852aa5ad2..7b3bdb2186 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)