Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove use of deprecated ast classes and methods #4

Open
mschwager opened this issue Jan 10, 2020 · 1 comment
Open

Remove use of deprecated ast classes and methods #4

mschwager opened this issue Jan 10, 2020 · 1 comment

Comments

@mschwager
Copy link
Contributor

Per the Python 3.8 release notes:

ast classes Num, Str, Bytes, NameConstant and Ellipsis are considered deprecated and will be removed in future Python versions. Constant should be used instead. (Contributed by Serhiy Storchaka in bpo-32892.)

ast.NodeVisitor methods visit_Num(), visit_Str(), visit_Bytes(), visit_NameConstant() and visit_Ellipsis() are deprecated now and will not be called in future Python versions. Add the visit_Constant() method to handle all constant nodes. (Contributed by Serhiy Storchaka in bpo-36917.)

This isn't immediately necessary, but it's worth tracking. It's not clear when this change will happen, so we don't need a definite timeline. If we can wait until Python 2.7 support is dropped (#17) then this change will be a bit easier since many of these classes/methods are used in 2.7. For example, Dlint makes use of ast.Str and ast.NameConstant.

@clavedeluna
Copy link
Contributor

Can be done once all versions including py3.7 are deprecated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants