classification
Title: Convert asyncio to async/await
Type: enhancement Stage: resolved
Components: asyncio, Library (Lib) Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: asvetlov Nosy List: asvetlov, gvanrossum, terry.reedy, yselivanov
Priority: normal Keywords: patch

Created on 2017-12-01 09:44 by asvetlov, last changed 2017-12-08 22:25 by asvetlov. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 4753 merged asvetlov, 2017-12-07 22:13
Messages (6)
msg307375 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2017-12-01 09:44
As discussed several times before we need to convert `@coroutine` / `yield from` to async/await.

All existing functionality should keep working (like yielding from new style coroutine and `with (yield from lock)`.

We could deprecate the later though.

The change should be huge but there is no alternative, keeping `yield from` in stdlib looks uglier and uglier every year.

Unittests should be changed as well (keeping several `yield from` for checking backward compatibility is Ok).


Opinions?
msg307392 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2017-12-01 16:38
Yeah, I am in favor of this. How will we guarantee that clients using the old `@coroutine`/`yield from` idiom still work? We need to have separate tests for that.
msg307393 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2017-12-01 16:48
> How will we guarantee that clients using the old `@coroutine`/`yield from` idiom still work?

They are fully supported now, but we can add a few tests to ensure we won't break it.
msg307394 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2017-12-01 16:50
Andrew, would it be OK if I make a PR?
msg307403 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2017-12-01 19:15
Yuri please do
msg307872 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2017-12-08 22:23
New changeset 5f841b553814969220b096a2b4f959b7f6fcbaf6 by Andrew Svetlov in branch 'master':
bpo-32193: Convert asyncio to async/await usage (#4753)
https://github.com/python/cpython/commit/5f841b553814969220b096a2b4f959b7f6fcbaf6
History
Date User Action Args
2017-12-08 22:25:13asvetlovsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2017-12-08 22:23:52asvetlovsetmessages: + msg307872
2017-12-07 23:07:24vstinnersetnosy: - vstinner
2017-12-07 22:13:20asvetlovsetkeywords: + patch
stage: patch review
pull_requests: + pull_request4656
2017-12-01 19:15:47asvetlovsetmessages: + msg307403
2017-12-01 17:54:59terry.reedysetnosy: + terry.reedy
2017-12-01 16:50:47yselivanovsetmessages: + msg307394
2017-12-01 16:48:57yselivanovsetmessages: + msg307393
2017-12-01 16:38:31gvanrossumsetmessages: + msg307392
2017-12-01 09:45:09asvetlovsettype: enhancement
2017-12-01 09:44:48asvetlovsetnosy: + gvanrossum, vstinner
2017-12-01 09:44:32asvetlovcreate