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

Replace ast.Str usages with ast.Constant for compatibility with Python 3.14 #157

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

befeleme
Copy link
Contributor

@befeleme befeleme commented Jan 7, 2025

Per What's new in Python 3.14:
ast.Str has been deprecated since Python 3.8, and have emitted deprecation warnings since Python 3.12.
https://docs.python.org/dev/whatsnew/3.14.html#id3

Spotted in Fedora Linux while early integrating 3.14 alphas into the distribution.
I only saw failures in test_util.py, test_asstokens.py; test_tokenless passed successfully in our environment (we've got asttokens 2.4.1). I'm not sure why is that - whether the particular code path is never executed, but I made the change everywhere nevertheless.

Per What's new in Python 3.14:
ast.Str has been deprecated since Python 3.8, and have emitted deprecation
warnings since Python 3.12.
https://docs.python.org/dev/whatsnew/3.14.html#id3
@alexmojaki
Copy link
Contributor

Thanks!

@alexmojaki alexmojaki merged commit bb1df14 into gristlabs:master Jan 7, 2025
18 checks passed
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 this pull request may close these issues.

2 participants