diff options
author | Mariatta Wijaya <mariatta.wijaya@gmail.com> | 2017-02-06 22:03:00 -0800 |
---|---|---|
committer | Mariatta Wijaya <mariatta.wijaya@gmail.com> | 2017-02-06 22:03:00 -0800 |
commit | 866142546ade2b40f911712f03308fd7f1a35e77 (patch) | |
tree | 0a287c83e6591ad1f090affdba782d7fc9a30908 /Lib | |
parent | e3c7e835bdfc97750eb9b7fc0ad2493108c2d438 (diff) | |
download | cpython-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.py | 3 |
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) |