Skip to content

adjust to removed APIs in ast module for python >=3.14#1519

Open
fkil wants to merge 1 commit intocea-sec:masterfrom
fkil:master
Open

adjust to removed APIs in ast module for python >=3.14#1519
fkil wants to merge 1 commit intocea-sec:masterfrom
fkil:master

Conversation

@fkil
Copy link

@fkil fkil commented Jan 30, 2026

ast.Num and ast.Str were deprecated with python 3.8 and are now removed with python3.14.

This commit replaces uses of these APIs using ast.Constant. Consequentely, the behavior for python versions <3.8 will break

Resolves #1518

ast.Num and ast.Str were deprecated with python 3.8 and are now
removed with python3.14.

This commit replaces uses of these APIs using ast.Constant.
Consequentely, the behavior for python versions <3.8 will break
@crimsonskylark
Copy link

crimsonskylark commented Feb 13, 2026

There are also problems due to the incompatibility of python-future with >=3.13 used here, amongst other places.

It would be good to have some feedback from the developers with regards to what types of changes, breaking or otherwise, are acceptable for PRs.

@serpilliere
Copy link
Contributor

Hi @fkil & @crimsonskylark

Yep, maybe it's time to drop some "old" versions of python.
Maybe we can consider the reverse of fun binaries is done on "full featured" distribution 😄

@mrexodia
Copy link
Contributor

https://endoflife.date/python:

image

I would drop everything below 3.10 honestly 🤷🏻‍♂️

@fkil
Copy link
Author

fkil commented Feb 18, 2026

I've looked into the failing regression test, and the cause seems to be an outdated z3 version. Updating to the most recent z3 version in optional_requirements.txt passes the test.

I've also locally ran the same tests for python3.14 and they pass as well, with a small limitation: llvmlite does not provide wheels for python3.14 and its setup.py is not compatible with the most recent setuptools version (which is used by default with pip). As a workaround I installed an older setuptools (>=v81.0 breaks, so I used v80.10.2) and then use the --no-build-isolation option of pip. I feel like it would be pretty unclean to add these to the tester though.

Should I bump the z3 version in this PR as well, or should that be a separate one?

@fkil
Copy link
Author

fkil commented Feb 18, 2026

@crimsonskylark Regarding python-future: While newer versions aren't officially supported, they do not break 3.13 or 3.14 yet. While the dependency should probably be removed, I believe it should be a separate issue and patch set.

@crimsonskylark
Copy link

Yes, of course - I didn't mean to hijack your PR. Sorry!

@serpilliere
Copy link
Contributor

I agree with you @mrexodia : dropping everything below 3.10 is fine.
I did some login to some machine here and there, and there are a lot of machines that still have python 3.11 (I didn't find 3.10 by the way)

Maybe we can bump the z3 in another PR.

Thank you for the tests @fkil

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.

Compatibility with python >= 3.14

4 participants