Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue40663

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Wrong generated annotation on subscripting
Type:behaviorStage:resolved
Components:Interpreter CoreVersions:Python 3.9, Python 3.8, Python 3.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: BTaskaya, miss-islington, pablogsal
Priority:normalKeywords:patch

Created on2020-05-17 17:36 byBTaskaya, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 20156mergedBTaskaya,2020-05-17 17:41
PR 20191mergedBTaskaya,2020-05-18 19:35
PR 20192mergedBTaskaya,2020-05-18 19:44
PR 20324closedmiss-islington,2020-05-22 22:32
Messages (5)
msg369140 -(view)Author: Batuhan Taskaya (BTaskaya)*(Python committer)Date: 2020-05-17 17:36
>>> from __future__ import annotations>>> a: Type[int, str]>>> b: Type[(int, str, *types)]>>> __annotations__{'a': 'Type[int, str]', 'b': 'Type[int, str, *types]'}>>> ast.parse(__annotations__["b"])Traceback (most recent call last):  File "<stdin>", line 1, in <module>  File "/home/isidentical/cpython/master/Lib/ast.py", line 50, in parse    return compile(source, filename, mode, flags,  File "<unknown>", line 1    Type[int, str, *types]                   ^SyntaxError: invalid syntax
msg369141 -(view)Author: Batuhan Taskaya (BTaskaya)*(Python committer)Date: 2020-05-17 17:41
$ python3.8Python 3.8.0+ (heads/3.8:b9e5547f58, Nov 28 2019, 19:18:03) [GCC 9.2.1 20191008] on linuxType "help", "copyright", "credits" or "license" for more information.>>> from __future__ import annotations>>> b: Type[(int, str, *types)]>>> __annotations__{'b': 'Type[int, str, *types]'} $ python3.7Python 3.7.5 (default, Apr 19 2020, 20:18:17) [GCC 9.2.1 20191008] on linuxType "help", "copyright", "credits" or "license" for more information.>>> from __future__ import annotations>>> b: Type[(int, str, *types)]>>> __annotations__{'b': 'Type[int, str, *types]'}>>>
msg369283 -(view)Author: Pablo Galindo Salgado (pablogsal)*(Python committer)Date: 2020-05-18 18:23
New changeset2135e10dc717c00d10d899d232bebfc59bb25032 by Batuhan Taskaya in branch 'master':bpo-40663: Correctly handle annotations with subscripts in ast_unparse.c (GH-20156)https://github.com/python/cpython/commit/2135e10dc717c00d10d899d232bebfc59bb25032
msg369664 -(view)Author: Pablo Galindo Salgado (pablogsal)*(Python committer)Date: 2020-05-22 22:32
New changeset43300148c5f30317ebf767aa8853a957ee5c87fb by Batuhan Taskaya in branch '3.7':[3.7]bpo-40663: Correctly handle annotations with subscripts in ast_unparse.c (GH-20156). (GH-20192)https://github.com/python/cpython/commit/43300148c5f30317ebf767aa8853a957ee5c87fb
msg369665 -(view)Author: Pablo Galindo Salgado (pablogsal)*(Python committer)Date: 2020-05-22 22:32
New changeseta4d219b35e35f9efc406cd70f2812275bcd989fe by Batuhan Taskaya in branch '3.8':[3.8]bpo-40663: Correctly handle annotations with subscripts in ast_unparse.c (GH-20156). (GH-20191)https://github.com/python/cpython/commit/a4d219b35e35f9efc406cd70f2812275bcd989fe
History
DateUserActionArgs
2022-04-11 14:59:31adminsetgithub: 84840
2020-05-22 22:37:43pablogsalsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-05-22 22:32:44pablogsalsetmessages: +msg369665
2020-05-22 22:32:37pablogsalsetmessages: +msg369664
2020-05-22 22:32:03miss-islingtonsetnosy: +miss-islington
pull_requests: +pull_request19593
2020-05-18 19:44:00BTaskayasetpull_requests: +pull_request19493
2020-05-18 19:35:25BTaskayasetpull_requests: +pull_request19492
2020-05-18 18:23:53pablogsalsetnosy: +pablogsal
messages: +msg369283
2020-05-17 17:42:21BTaskayasettype: behavior
components: + Interpreter Core
versions: + Python 3.7, Python 3.8, Python 3.9
2020-05-17 17:41:52BTaskayasetmessages: +msg369141
2020-05-17 17:41:03BTaskayasetkeywords: +patch
stage: patch review
pull_requests: +pull_request19459
2020-05-17 17:36:39BTaskayacreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp