-
-
Notifications
You must be signed in to change notification settings - Fork 54
Conversation
Does typed-ast have backwards compatibility guarantees? You're dropping the |
@JelleZijlstra FWIW I added it some time ago by request from @gvanrossum but it was never used since then. It stayed deprecated for few last releases: https://github.com/python/typed_ast/blob/master/typed_ast/ast27.py#L23 |
Moreover, the new |
Thanks! Using my new powers as a typed_ast committer to merge this. |
👍 All differences from the standard Python AST are documented in the module documentation. @ilevkivskyi, would you mind updating the docs here and here? |
Yes, sure, I will make a PR with the docs. But probably not this week. |
This pull request bumps the minimum allowed version of typed-ast to version 1.1.1. This is mostly so that we can have python/typed_ast#49, which we need to correctly handle Literals containing unicode strings when analyzing Python 2 source code.
This pull request bumps the minimum allowed version of typed-ast to version 1.1.1. This is mostly so that we can have python/typed_ast#49, which we need to correctly handle Literals containing unicode strings when analyzing Python 2 source code.
We recently cut a new-ish release of typed-ast that [adds a new field][0] named `kind` to the `ast27.Str` and `ast3.Str` classes. This field stores whatever string modifiers (like `b` or `u`) were present on the original string. As a note, I've confirmed that this field is indeed a str (and not bytes) for ast27's Str class. [0]: python/typed_ast#49
We recently cut a new-ish release of typed-ast that [adds a new field][0] named `kind` to the `ast27.Str` and `ast3.Str` classes. This field stores whatever string modifiers (like `b` or `u`) were present on the original string. As a note, I've confirmed that this field is indeed a str (and not bytes) for ast27's Str class. [0]: python/typed_ast#49
We recently cut a new-ish release of typed-ast that [adds a new field][0] named `kind` to the `ast27.Str` and `ast3.Str` classes. This field stores whatever string modifiers (like `b` or `u`) were present on the original string. As a note, I've confirmed that this field is indeed a str (and not bytes) for ast27's Str class. [0]: python/typed_ast#49
This will help experimenting with python/mypy#3648
Currently we preserve only
b
string modifier on Python 2, this is a bit arbitrary and for the above mentioned PR we need to keepu
. Instead of adding another special-casing I just always preserve all string modifiers in a short stringkind
onStr
node, for example: