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.

Title: Change asyncio.async() → ensure_future()
Type: Stage: resolved
Components: asyncio, Documentation Versions: Python 3.6, Python 3.4, Python 3.5
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, gvanrossum, martin.panter, python-dev, vstinner, yselivanov
Priority: normal Keywords: patch

Created on 2015-06-22 14:24 by martin.panter, last changed 2022-04-11 14:58 by admin. This issue is now closed.

File name Uploaded Description Edit
ensure_future.patch martin.panter, 2015-06-22 14:24 review
Messages (6)
msg245631 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-06-22 14:24
The async() function is marked as deprecated in 3.4.4. This patch replaces most references to it with references to ensure_future(). The exception is <>, which suggests using it in Python < 3.4.2.
msg245633 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2015-06-22 14:56
Martin, I believe this was done as part of issue24180, see this commit
msg245661 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-06-23 02:58
There are a few references left in that revision. For instance <> still suggests scheduling a coroutine by calling async(). But depending on the context this may cause a syntax error in 3.5, so I think it should suggest calling ensure_future() instead.
msg246017 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-07-01 02:03
Reopening. The patch still applies to the current code (e.g. revision df310e5ac015, 30 June). It changes eight references of “async()” that still exist in this revision.
msg246020 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-07-01 02:14
New changeset 1b3be273e327 by Yury Selivanov in branch '3.5':
Issue #24487: Rename async() -> ensure_future() in asyncio docs.

New changeset 3dc2a113e8a7 by Yury Selivanov in branch 'default':
Merge 3.5 (Issue #24487)
msg246021 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2015-07-01 02:14
Thanks, Martin!
Date User Action Args
2022-04-11 14:58:18adminsetgithub: 68675
2015-07-01 02:38:24yselivanovsetstatus: open -> closed
2015-07-01 02:14:53yselivanovsetresolution: out of date -> fixed
messages: + msg246021
2015-07-01 02:14:15python-devsetnosy: + python-dev
messages: + msg246020
2015-07-01 02:03:53martin.pantersetstatus: closed -> open

messages: + msg246017
2015-06-23 02:58:20martin.pantersetmessages: + msg245661
2015-06-22 15:01:27zach.waresetresolution: not a bug -> out of date
stage: patch review -> resolved
2015-06-22 14:56:22yselivanovsetstatus: open -> closed
resolution: not a bug
messages: + msg245633
2015-06-22 14:24:29martin.pantercreate