Python 3.14 compatibility
As reported by our future test, the following issues need to be resolved to ensure Python 3.14 compatibility:
-
astclass hierarchy changes – upgradeastor,flynt -
[x]
astor/op_util.py:92: DeprecationWarning:ast.Num is deprecated and will be removed in Python 3.14;use ast.Constant instead -
[x]
flynt/utils/utils.py:74: DeprecationWarning:ast.Str is deprecated and will be removed in Python 3.14;use ast.Constant instead -
[x]
flynt/candidates/ast_call_candidates.py:14: DeprecationWarning:ast.Str is deprecated and will be removed in Python 3.14;use ast.Constant instead -
[x]
flynt/transform/format_call_transforms.py:18: DeprecationWarning:ast.Str is deprecated and will be removed in Python 3.14;use ast.Constant instead -
[x]
flynt/transform/format_call_transforms.py:22:DeprecationWarning: Attribute s is deprecated and will be removed in Python 314; use value instead -
[x]
flynt/transform/format_call_transforms.py:29: DeprecationWarning:ast.Str is deprecated and will be removed in Python 3.14;use ast.Constant instead -
[x]
flynt/utils/utils.py:90: DeprecationWarning:ast.Str is deprecated and will be removed in Python 3.14;use ast.Constant instead -
[x]
flynt/transform/format_call_transforms.py:88: DeprecationWarning:ast.Str is deprecated and will be removed in Python 3.14;use ast.Constant instead -
[x]
astor/code_gen.py:599: DeprecationWarning:ast.Str is deprecated and will be removed in Python 3.14;use ast.Constant instead -
[x]
flynt/transform/format_call_transforms.py:89: DeprecationWarning:ast.Str is deprecated and will be removed in Python 3.14;use ast.Constant instead
Is Python 3.13 even supported? 😅
https://github.com/akaihola/darker/blob/master/pyproject.toml#L15-L16
"Programming Language :: Python :: 3.12",
]
Thanks @reneleonhardt, you're right – I added both 3.13 and 3.14 to the metadata in #851.
Also, Astor 0.8.1 no longer uses ast.Num in astor/op_util.py, so that warning didn't materialize.
astor/code_gen.py still does reference ast.Str, so that might be a problem.
I'll look into Flynt next.
Updating to Flynt 1.0.3+ will get rid of ast.Str usage in Flynt, as well as the s attribute.