Skip to content

Commit

Permalink
MNT: fix compatibility with Python 3.14
Browse files Browse the repository at this point in the history
The ast.Str class was deprecated in 3.8 and will be removed in 3.14
  • Loading branch information
tacaswell committed May 28, 2024
1 parent e6b564b commit c52a28f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flit_core/flit_core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ def get_docstring_and_version_via_ast(target):
and target.id == "__version__"
for target in child.targets
)
and isinstance(child.value, ast.Str)
and isinstance(child.value, ast.Constant)
)
if is_version_str:
version = child.value.s
version = child.value.value
break
return ast.get_docstring(node), version

Expand Down

0 comments on commit c52a28f

Please sign in to comment.