This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: PEP 614: Relaxing Grammar Restrictions On Decorators
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 3.9
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: brandtbucher Nosy List: brandtbucher, gousaiyang, gvanrossum, miss-islington, shankarj67
Priority: normal Keywords: patch

Created on 2020-02-20 16:12 by brandtbucher, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 18570 merged brandtbucher, 2020-02-20 16:14
PR 18802 merged brandtbucher, 2020-03-06 07:07
PR 18851 merged shankarj67, 2020-03-08 13:28
PR 25234 merged gousaiyang, 2021-04-06 22:32
PR 25290 merged miss-islington, 2021-04-08 22:40
Messages (8)
msg362328 - (view) Author: Brandt Bucher (brandtbucher) * (Python committer) Date: 2020-02-20 16:12
The attached PR implements PEP 614's revised grammar for decorators, with tests. In short:

decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE


decorator: '@' namedexpr_test NEWLINE

I'm marking it as DO-NOT-MERGE until the PEP is accepted, but code review is still appreciated. Discussion of the PEP itself should go to the Python-Dev thread:
msg363311 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2020-03-03 22:25
New changeset be501ca2419a91546dea85ef4f36945545458589 by Brandt Bucher in branch 'master':
bpo-39702: Relax grammar restrictions on decorators (PEP 614) (GH-18570)
msg363312 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2020-03-03 22:26
I'm guessing there's some doc update that needs to happen now the code has landed.
msg363319 - (view) Author: Brandt Bucher (brandtbucher) * (Python committer) Date: 2020-03-04 01:47
Agreed. I'll have something up later, hopefully.

I'll add a tiny blurb to whatsnew, as well as adding the PEP to the "See also:" note in and updating the mini-grammar there. I don't think it needs much else.

Hmmm. It looks like the page of the docs that I've linked above wasn't ever updated for the walrus. We should probably add updating this part of the docs to
msg363324 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2020-03-04 04:17
Sounds good. If you feel like it you can submit a PR to the devguide, I'm sure Brett will merge it quickly...
msg363612 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2020-03-07 18:23
New changeset 8f130536926a30237b5297780d61ef4232e88577 by Brandt Bucher in branch 'master':
bpo-39702: Update the Language Reference (PEP 614) (GH-18802)
msg390568 - (view) Author: Brandt Bucher (brandtbucher) * (Python committer) Date: 2021-04-08 22:34
New changeset 1e051a21b7106a93c30b74aad7e1f40d6c0c477b by Saiyang Gou in branch 'master':
bpo-39702: Remove dotted_name from decorator documentation (GH-25234)
msg390570 - (view) Author: miss-islington (miss-islington) Date: 2021-04-08 23:04
New changeset a9228d02d16fe90f2f13e7e9ec478f7b4f8607a2 by Miss Islington (bot) in branch '3.9':
[3.9] bpo-39702: Remove dotted_name from decorator documentation (GH-25234) (GH-25290)
Date User Action Args
2022-04-11 14:59:26adminsetgithub: 83883
2021-04-08 23:04:03miss-islingtonsetmessages: + msg390570
2021-04-08 22:40:51miss-islingtonsetnosy: + miss-islington

pull_requests: + pull_request24025
2021-04-08 22:34:29brandtbuchersetmessages: + msg390568
2021-04-06 22:32:48gousaiyangsetnosy: + gousaiyang

pull_requests: + pull_request23971
2020-03-08 13:28:29shankarj67setnosy: + shankarj67

pull_requests: + pull_request18208
2020-03-07 19:13:10brandtbuchersetstatus: open -> closed
stage: patch review -> resolved
2020-03-07 18:23:52gvanrossumsetmessages: + msg363612
2020-03-06 07:07:23brandtbuchersetpull_requests: + pull_request18158
2020-03-04 04:17:54gvanrossumsetmessages: + msg363324
2020-03-04 01:47:04brandtbuchersetmessages: + msg363319
2020-03-03 22:26:50gvanrossumsetmessages: + msg363312
2020-03-03 22:25:51gvanrossumsetmessages: + msg363311
2020-02-20 16:20:55brandtbucherlinkissue19660 superseder
2020-02-20 16:20:23brandtbucherlinkissue37196 superseder
2020-02-20 16:14:09brandtbuchersetkeywords: + patch
stage: patch review
pull_requests: + pull_request17949
2020-02-20 16:12:25brandtbuchercreate