asyncio: async() function is deprecated in favour of ensure_future().

This commit is contained in:
Yury Selivanov 2015-05-11 14:48:38 -04:00
parent 740169cd24
commit 59eb9a4da5
7 changed files with 57 additions and 34 deletions

View file

@ -315,7 +315,7 @@ class BaseEventLoop(events.AbstractEventLoop):
self._check_closed()
new_task = not isinstance(future, futures.Future)
future = tasks.async(future, loop=self)
future = tasks.ensure_future(future, loop=self)
if new_task:
# An exception is raised if the future didn't complete, so there
# is no need to log the "destroy pending task" message