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.

Author lukasz.langa
Recipients eric.smith, kayhayen, levkivskyi, lukasz.langa
Date 2018-11-14.12:46:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1542199594.89.0.788709270274.issue35143@psf.upfronthosting.co.za>
In-reply-to
Content
I think this is a bug, actually. It's going to be an incompatibility in `ast.parse` so we'll probably want to only enable it in Python 3.8.

This should have stringified annotations:

>>> p = ast.parse("""
... from __future__ import annotations
... a: 1
... """)
>>> p.body[1].annotation  # ACTUAL
<_ast.Num object at 0x1048cf470>

>>> p.body[1].annotation  # EXPECTED
<_ast.Str object at 0x1048cf6a0>
History
Date User Action Args
2018-11-14 12:46:34lukasz.langasetrecipients: + lukasz.langa, eric.smith, kayhayen, levkivskyi
2018-11-14 12:46:34lukasz.langasetmessageid: <1542199594.89.0.788709270274.issue35143@psf.upfronthosting.co.za>
2018-11-14 12:46:34lukasz.langalinkissue35143 messages
2018-11-14 12:46:34lukasz.langacreate