Mercurial > cpython
changeset 106460:0f5161f865d7 3.5
Issue #29314: Set the stacklevel to two in asyncio.async() Deprecation Warning [#29314]
author | Mariatta Wijaya <mariatta.wijaya@gmail.com> |
---|---|
date | Mon, 06 Feb 2017 22:03:00 -0800 |
parents | df62e833eeb1 |
children | 6dbe9051cdec 514571268743 |
files | Lib/asyncio/tasks.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)