classification
Title: async and await should be keywords in 3.7
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: Jelle Zijlstra, giampaolo.rodola, gvanrossum, quentel, rhettinger, vstinner, yselivanov
Priority: normal Keywords:

Created on 2017-05-19 21:27 by Jelle Zijlstra, last changed 2017-11-06 11:20 by vstinner. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 1669 open Jelle Zijlstra, 2017-05-19 21:29
Messages (8)
msg293976 - (view) Author: Jelle Zijlstra (Jelle Zijlstra) * Date: 2017-05-19 21:27
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.
msg293994 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2017-05-20 03:10
+1 These words are here to stay.   

That said, Guido needs to explicitly sign-off on any new language keywords.
msg293997 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2017-05-20 04:18
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>
> _______________________________________
>
msg294003 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-20 05:40
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!
msg303793 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2017-10-06 03:24
New changeset ac317700ce7439e38a8b420218d9a5035bba92ed by Yury Selivanov (Jelle Zijlstra) in branch 'master':
bpo-30406: Make async and await proper keywords (#1669)
https://github.com/python/cpython/commit/ac317700ce7439e38a8b420218d9a5035bba92ed
msg303794 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2017-10-06 03:28
Thanks a lot, Jelle!
msg305549 - (view) Author: Pierre Quentel (quentel) * Date: 2017-11-04 09:19
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.
msg305634 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-11-06 11:20
> (...) 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."
History
Date User Action Args
2017-11-06 11:20:34vstinnersetmessages: + msg305634
2017-11-04 09:19:57quentelsetnosy: + quentel
messages: + msg305549
2017-10-06 03:28:00yselivanovsetstatus: open -> closed
type: behavior
messages: + msg303794

resolution: fixed
stage: resolved
2017-10-06 03:24:51yselivanovsetmessages: + msg303793
2017-05-20 05:40:31vstinnersetmessages: + msg294003
2017-05-20 04:18:11gvanrossumsetmessages: + msg293997
2017-05-20 03:10:48rhettingersetassignee: gvanrossum

messages: + msg293994
nosy: + rhettinger, gvanrossum
2017-05-19 21:29:23Jelle Zijlstrasetpull_requests: + pull_request1763
2017-05-19 21:27:41Jelle Zijlstracreate