Skip to content

Conversation

@1borgy
Copy link

@1borgy 1borgy commented Dec 5, 2025

For reviewers

  • I did not use AI
  • I used AI and thoroughly reviewed every code/docs change

Description of the change

Add expressions for ast.TemplateStr and ast.Interpolation, which were added in Python 3.14. Round-tripping (e.g. tests/test_expressions.py::test_expressions) does not work with the conversion or format_spec fields, though this is consistent with the current implementation of ExprJoinedStr and ExprFormatted.

Relevant resources

@1borgy
Copy link
Author

1borgy commented Dec 5, 2025

Looks like most of CI is passing, bar config/test_api.py::test_api_matches_inventory for python<3.14. The suggestion of make run mkdocs build did not generate any changes to site/objects.inv for me. For the sake of not overusing GHA runner resources, I'll wait for a maintainer's blessing before investigating further.

ast.YieldFrom: _build_yield_from,
}

if sys.version_info >= (3, 14):
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

combine all 3 version checks in this file into one block

"call(something=something)",
# Strings.
"f'a {round(key, 2)} {z}'",
*(["t'a {round(key, 2)} {z}'"] if sys.version_info >= (3, 14) else []),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could also try something like

Suggested change
*(["t'a {round(key, 2)} {z}'"] if sys.version_info >= (3, 14) else []),
pytest.param("t'a {round(key, 2)} {z}'", marks=pytest.mark.skipif(sys.version_info < (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