Support end line and end column?
ilevkivskyi opened this issue · 5 comments
Recently support for end line and end column of AST nodes was merged in Python 3.8. I think it would be great to support it in typed_ast
(to have it on older Python versions too). If we agree this makes sense, then I can make a PR.
Perhaps it makes more sense to first land python/cpython#11645 and then extract the result into typed_ast using a simplified version of https://github.com/python/typed_ast/blob/master/update_process.md.
Yes, this makes sense, this way we can get some latest bugfixes and this will probably require less manual work. Should we keep this issue open as a remainder to do the "sync" after python/cpython#11645 lands?
SGTM. The extraction will still be eventful because of Serhiy's AST refactoring where Str()
, Bytes()
and Num()
are replaced with Constant()
. And we still have to lobby separately for upstream acceptance of feature_version
and kind
.
My new plan is never to do another backport from CPython's ast to typed_ast. We can drop ast3 once Python 3.7 is end of lifed, and I expect that by then we can also stop worrying about Python 2.7 and ast27. Until then, I'd like to keep typed_ast as unchanging as possible. So I propose to close this.
OK, I don't feel like I will have energy to do the backport either. If someone wants to use the new features, they should just use Python 3.8.