This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: There is no asyncio.ensure_future in Python 3.4.3
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.4
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, zach.ware, Олег Иванов
Priority: normal Keywords:

Created on 2015-06-11 16:32 by Олег Иванов, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg245176 - (view) Author: Олег Иванов (Олег Иванов) Date: 2015-06-11 16:32
Docs claims there there is asyncio.ensure_future

https://docs.python.org/3/library/asyncio-task.html?highlight=ensure_future#asyncio.ensure_future

but example from docs does'nt work:

import asyncio

loop = asyncio.get_event_loop()
tasks = [
    asyncio.ensure_future(print("asasda")),

]
loop.run_until_complete(asyncio.wait(tasks))
loop.close()

Fails with:

AttributeError: 'module' object has no attribute 'ensure_future'
msg245177 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2015-06-11 16:38
The docs also say "New in version 3.4.4" :)
History
Date User Action Args
2022-04-11 14:58:18adminsetgithub: 68621
2015-06-11 16:38:10zach.waresetstatus: open -> closed

nosy: + zach.ware
messages: + msg245177

resolution: not a bug
stage: resolved
2015-06-11 16:32:20Олег Ивановcreate