Replace ast.Str usages with ast.Constant for compatibility with Python 3.14 #157
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.