classification
Title: 2to3 fails to parse async generators in non-async functions
Type: behavior Stage: resolved
Components: 2to3 (2.x to 3.x conversion tool) Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, lukasz.langa, miss-islington, yselivanov, zsol
Priority: normal Keywords: patch

Created on 2018-04-24 13:02 by zsol, last changed 2021-08-10 14:55 by lukasz.langa. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 6588 merged zsol, 2018-04-24 14:55
PR 27702 merged miss-islington, 2021-08-10 09:32
PR 27703 merged miss-islington, 2021-08-10 09:33
Messages (2)
msg315700 - (view) Author: Zsolt Dollenstein (zsol) * Date: 2018-04-24 13:02
This is valid since python3.7:

```
def f():
    return (i * 2 async for i in arange(42))
```

but lib2to3 doesn't parse this properly, because `async` is tokenized as a `NAME` instead of `ASYNC`
msg399333 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-08-10 14:55
Thanks, Zsolt! ✨ 🍰 ✨
History
Date User Action Args
2021-08-10 14:55:29lukasz.langasetstatus: open -> closed
resolution: fixed
messages: + msg399333

stage: patch review -> resolved
2021-08-10 09:33:03miss-islingtonsetpull_requests: + pull_request26190
2021-08-10 09:32:58miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request26189
2021-08-10 08:19:41lukasz.langasetversions: + Python 3.9, Python 3.10, Python 3.11, - Python 3.7, Python 3.8
2018-04-24 14:55:18zsolsetkeywords: + patch
stage: patch review
pull_requests: + pull_request6288
2018-04-24 13:20:27serhiy.storchakasetnosy: + benjamin.peterson, lukasz.langa, yselivanov
2018-04-24 13:02:45zsolcreate