Skip to content

Conversation

sookach
Copy link

@sookach sookach commented Sep 13, 2025

Python 3.14 removes the ast.Str node type. String literals now appear as ast.Constant(value=str).
Update the AST check to accept both ast.Str (for older Pythons) and ast.Constant with a string value (for Python 3.8+), allowing html5lib to build successfully on Python 3.14 while remaining compatible with older version. Tested at desk with pip install -e .

Fixes: #588

Python 3.14 removes the ast.Str node type. String literals now appear
as ast.Constant(value=str).
Update the AST check to accept both ast.Str (for older Pythons) and
ast.Constant with a string value (for Python 3.8+), allowing html5lib to
build successfully on Python 3.14 while remaining compatible with older
version.
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.

html5lib fails to build on Python 3.14 (uses removed ast.Str node)
1 participant