Skip to content

Replace ast.Str with ast.Constant (ast.Str removed in Python 3.14) - #34

Open
vnzstc wants to merge 1 commit into
S2-group:masterfrom
vnzstc:master
Open

Replace ast.Str with ast.Constant (ast.Str removed in Python 3.14)#34
vnzstc wants to merge 1 commit into
S2-group:masterfrom
vnzstc:master

Conversation

@vnzstc

@vnzstc vnzstc commented Jul 9, 2026

Copy link
Copy Markdown

What

Replaces usage of ast.Str with ast.Constant in __main__.py.

Why

ast.Str, along with ast.Num, ast.Bytes, ast.NameConstant, and ast.Ellipsis,
was deprecated in Python 3.8 and has now been removed in Python 3.14. Any code still
referencing ast.Str will fail with an ImportError/AttributeError on 3.14+.

Compatibility

ast.Constant has been available since Python 3.8, so this change is fully
backward-compatible with all currently supported Python versions (3.8+) and
adds support for 3.14+.

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.

1 participant