Skip to content

async and await should be keywords in 3.7 #74591

Closed

Description

@JelleZijlstra
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']

    Activity

    1. JelleZijlstra commented on May 19, 2017

      @JelleZijlstra
      MemberAuthor

      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.

    2. rhettinger commented on May 20, 2017

      @rhettinger
      Contributor

      +1 These words are here to stay.

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

    3. gvanrossum commented on May 20, 2017

      @gvanrossum
      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\>


    4. vstinner commented on May 20, 2017

      @vstinner
      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!

    5. 1st1 commented on Oct 6, 2017

      @1st1
      Member

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

    6. 1st1 commented on Oct 6, 2017

      @1st1
      Member

      Thanks a lot, Jelle!

    7. added
      type-bugAn unexpected behavior, bug, or error
      on Oct 6, 2017
    8. PierreQuentel commented on Nov 4, 2017

      PierreQuentelmannequin
      Mannequin

      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.

    9. vstinner commented on Nov 6, 2017

      @vstinner
      Member

      (...) 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."

    10. ambv commented on Mar 18, 2018

      @ambv
      Contributor

      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

    11. miss-islington commented on Mar 18, 2018

      @miss-islington
      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

    12. gvanrossum commented on Feb 27, 2019

      @gvanrossum
      Member

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

    13. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    3.7 (EOL)end of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions