Navigation Menu

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

async and await should be keywords in 3.7 #74591

Closed
JelleZijlstra opened this issue May 19, 2017 · 11 comments
Closed

async and await should be keywords in 3.7 #74591

JelleZijlstra opened this issue May 19, 2017 · 11 comments
Assignees
Labels
3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@JelleZijlstra
Copy link
Member

BPO 30406
Nosy @gvanrossum, @rhettinger, @vstinner, @giampaolo, @ambv, @PierreQuentel, @1st1, @JelleZijlstra, @miss-islington
PRs
  • bpo-30406: Make async and await proper keywords #1669
  • bpo-30406: allow async/await in lib2to3 #6143
  • [3.7] Revert "bpo-30406: Make async and await proper keywords" (GH-6143) #6145
  • 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 = 'https://github.com/gvanrossum'
    closed_at = <Date 2017-10-06.03:28:00.513>
    created_at = <Date 2017-05-19.21:27:41.864>
    labels = ['interpreter-core', 'type-bug', '3.7']
    title = 'async and await should be keywords in 3.7'
    updated_at = <Date 2019-02-27.23:41:58.653>
    user = 'https://github.com/JelleZijlstra'

    bugs.python.org fields:

    activity = <Date 2019-02-27.23:41:58.653>
    actor = 'gvanrossum'
    assignee = 'gvanrossum'
    closed = True
    closed_date = <Date 2017-10-06.03:28:00.513>
    closer = 'yselivanov'
    components = ['Interpreter Core']
    creation = <Date 2017-05-19.21:27:41.864>
    creator = 'JelleZijlstra'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 30406
    keywords = []
    message_count = 11.0
    messages = ['293976', '293994', '293997', '294003', '303793', '303794', '305549', '305634', '314046', '314051', '336783']
    nosy_count = 9.0
    nosy_names = ['gvanrossum', 'rhettinger', 'vstinner', 'giampaolo.rodola', 'lukasz.langa', 'quentel', 'yselivanov', 'JelleZijlstra', 'miss-islington']
    pr_nums = ['1669', '6143', '6145']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue30406'
    versions = ['Python 3.7']

    @JelleZijlstra
    Copy link
    Member Author

    According to PEP-492, async and await should be full keywords in Python 3.7, but this hasn't been implemented yet. I have a patch ready that I'll submit as a PR soon.

    @JelleZijlstra JelleZijlstra added 3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) labels May 19, 2017
    @rhettinger
    Copy link
    Contributor

    +1 These words are here to stay.

    That said, Guido needs to explicitly sign-off on any new language keywords.

    @gvanrossum
    Copy link
    Member

    Yes, I signed off on this when I approved that PEP.

    On May 19, 2017 20:10, "Raymond Hettinger" <report@bugs.python.org> wrote:

    Raymond Hettinger added the comment:

    +1 These words are here to stay.

    That said, Guido needs to explicitly sign-off on any new language keywords.

    ----------
    assignee: -> gvanrossum
    nosy: +gvanrossum, rhettinger


    Python tracker <report@bugs.python.org>
    <http://bugs.python.org/issue30406\>


    @vstinner
    Copy link
    Member

    It's time to remove Yury's hacks from the parser and get a sane syntax ;-) I agree to make async and await real keywords!

    @1st1
    Copy link
    Member

    1st1 commented Oct 6, 2017

    New changeset ac31770 by Yury Selivanov (Jelle Zijlstra) in branch 'master':
    bpo-30406: Make async and await proper keywords (bpo-1669)
    ac31770

    @1st1
    Copy link
    Member

    1st1 commented Oct 6, 2017

    Thanks a lot, Jelle!

    @1st1 1st1 closed this as completed Oct 6, 2017
    @1st1 1st1 added the type-bug An unexpected behavior, bug, or error label Oct 6, 2017
    @PierreQuentel
    Copy link
    Mannequin

    PierreQuentel mannequin commented Nov 4, 2017

    According to PEP-492, async and await should have been deprecated in 3.5 and 3.6, but I don't think they have been :

    await = 1
    def f(async=True):
        ...

    don't raise any deprecation warning in 3.6.

    Since version 3.7 will break existing code with a SyntaxError, could it be possible to have something explicit in the SyntaxError message for these new keywords, for instance

    SyntaxError : 'async' is a keyword

    I don't speack C so I can't provide a patch, sorry.

    @vstinner
    Copy link
    Member

    vstinner commented Nov 6, 2017

    (...) don't raise any deprecation warning in 3.6.

    python3 requires -Wd to display DeprecationWarning:

    https://mail.python.org/pipermail/python-dev/2017-November/150149.html

    Yury Selivanov: "We had PendingDeprecationWarning for async/await names in 3.5, and DeprecationWarning in 3.6."

    @ambv
    Copy link
    Contributor

    ambv commented Mar 18, 2018

    New changeset f64aae4 by Łukasz Langa (Jelle Zijlstra) in branch 'master':
    Revert "bpo-30406: Make async and await proper keywords (bpo-1669)" (GH-6143)
    f64aae4

    @miss-islington
    Copy link
    Contributor

    New changeset a90df50 by Miss Islington (bot) in branch '3.7':
    Revert "bpo-30406: Make async and await proper keywords (GH-1669)" (GH-6143)
    a90df50

    @gvanrossum
    Copy link
    Member

    Sadly if I get my way this will all be reverted -- see https://bugs.python.org/issue35975. I'm working on a PR.

    @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.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    7 participants