Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2to3 fails to parse async generators in non-async functions #77530

Closed
zsol opened this issue Apr 24, 2018 · 2 comments
Closed

2to3 fails to parse async generators in non-async functions #77530

zsol opened this issue Apr 24, 2018 · 2 comments
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes topic-2to3 type-bug An unexpected behavior, bug, or error

Comments

@zsol
Copy link
Contributor

zsol commented Apr 24, 2018

BPO 33349
Nosy @benjaminp, @ambv, @1st1, @miss-islington, @zsol
PRs
  • bpo-33349: make lib2to3 parse async generators everywhere #6588
  • [3.10] bpo-33349: make lib2to3 parse async generators everywhere (GH-6588) #27702
  • [3.9] bpo-33349: make lib2to3 parse async generators everywhere (GH-6588) #27703
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2021-08-10.14:55:29.348>
    created_at = <Date 2018-04-24.13:02:45.935>
    labels = ['type-bug', 'expert-2to3', '3.9', '3.10', '3.11']
    title = '2to3 fails to parse async generators in non-async functions'
    updated_at = <Date 2021-08-10.14:55:29.347>
    user = 'https://github.com/zsol'

    bugs.python.org fields:

    activity = <Date 2021-08-10.14:55:29.347>
    actor = 'lukasz.langa'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-08-10.14:55:29.348>
    closer = 'lukasz.langa'
    components = ['2to3 (2.x to 3.x conversion tool)']
    creation = <Date 2018-04-24.13:02:45.935>
    creator = 'zsol'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 33349
    keywords = ['patch']
    message_count = 2.0
    messages = ['315700', '399333']
    nosy_count = 5.0
    nosy_names = ['benjamin.peterson', 'lukasz.langa', 'yselivanov', 'miss-islington', 'zsol']
    pr_nums = ['6588', '27702', '27703']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue33349'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @zsol
    Copy link
    Contributor Author

    zsol commented Apr 24, 2018

    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

    @zsol zsol added 3.7 (EOL) end of life 3.8 only security fixes topic-2to3 type-bug An unexpected behavior, bug, or error labels Apr 24, 2018
    @ambv ambv added 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes and removed 3.7 (EOL) end of life 3.8 only security fixes labels Aug 10, 2021
    @ambv
    Copy link
    Contributor

    ambv commented Aug 10, 2021

    Thanks, Zsolt! ✨ 🍰 ✨

    @ambv ambv closed this as completed Aug 10, 2021
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes 3.10 only security fixes 3.11 only security fixes topic-2to3 type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants