Issue40663
Created on 2020-05-17 17:36 by BTaskaya, last changed 2020-05-22 22:37 by pablogsal. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 20156 | merged | BTaskaya, 2020-05-17 17:41 | |
| PR 20191 | merged | BTaskaya, 2020-05-18 19:35 | |
| PR 20192 | merged | BTaskaya, 2020-05-18 19:44 | |
| PR 20324 | closed | miss-islington, 2020-05-22 22:32 | |
| Messages (5) | |||
|---|---|---|---|
| msg369140 - (view) | Author: Batuhan Taskaya (BTaskaya) * | 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) * | Date: 2020-05-17 17:41 | |
$ python3.8
Python 3.8.0+ (heads/3.8:b9e5547f58, Nov 28 2019, 19:18:03)
[GCC 9.2.1 20191008] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import annotations
>>> b: Type[(int, str, *types)]
>>> __annotations__
{'b': 'Type[int, str, *types]'}
$ python3.7
Python 3.7.5 (default, Apr 19 2020, 20:18:17)
[GCC 9.2.1 20191008] on linux
Type "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) * | Date: 2020-05-18 18:23 | |
New changeset 2135e10dc717c00d10d899d232bebfc59bb25032 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) * | Date: 2020-05-22 22:32 | |
New changeset 43300148c5f30317ebf767aa8853a957ee5c87fb 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) * | Date: 2020-05-22 22:32 | |
New changeset a4d219b35e35f9efc406cd70f2812275bcd989fe 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 | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2020-05-22 22:37:43 | pablogsal | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2020-05-22 22:32:44 | pablogsal | set | messages: + msg369665 |
| 2020-05-22 22:32:37 | pablogsal | set | messages: + msg369664 |
| 2020-05-22 22:32:03 | miss-islington | set | nosy:
+ miss-islington pull_requests: + pull_request19593 |
| 2020-05-18 19:44:00 | BTaskaya | set | pull_requests: + pull_request19493 |
| 2020-05-18 19:35:25 | BTaskaya | set | pull_requests: + pull_request19492 |
| 2020-05-18 18:23:53 | pablogsal | set | nosy:
+ pablogsal messages: + msg369283 |
| 2020-05-17 17:42:21 | BTaskaya | set | type: behavior components: + Interpreter Core versions: + Python 3.7, Python 3.8, Python 3.9 |
| 2020-05-17 17:41:52 | BTaskaya | set | messages: + msg369141 |
| 2020-05-17 17:41:03 | BTaskaya | set | keywords:
+ patch stage: patch review pull_requests: + pull_request19459 |
| 2020-05-17 17:36:39 | BTaskaya | create | |