-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 3.12 and 3.7 #1117
Python 3.12 and 3.7 #1117
Conversation
ptheywood
commented
Oct 2, 2023
•
edited
Loading
edited
- Replaces python 3.11 with 3.12 in "regular" CI
- Adds python 3.12 to the wheel build matrix
- Removes python 3.7 from the wheel build matrix
- EOL 2023-06-27
- python 3.7 specific code left-in place in case users are unable to upgrade
- Address python 3.12 deprecation warnings
- Test suite passes with python 3.7, 3.8 and 3.12 with no deprecation warnings
Does not remove workarounds in code for python <= 3.7, so it will still techniaclly be usable just not supported
I may have been a little keen for this (python 3.12 released today, 2023-10-02), might need to wait a few days and re-run the CI. (Edit: the actions/setup-python checks for new python at 3am and 3pm each day, opening a PR if one is avialable and worked. Todays failed due to download errors. I'd expect this won't take too long to resolve though) The latest the action can currently deal with is 3.12-rc3. The manylinux container(s) however are already compatible, so that should indicate if there are any game-breaking changes in 3.12 / swig incompatibility (I hope not) |
Having said that, on looking at the python3.12 release notes, there are deprecateionWArnings added for parts of |
As expected when running the generated wheels with python 3.12 Deprecation warnings related to ast components are emitted
These should probably be addressed prior to merge. Otherwise all tests passed.
Although they did take a very long time, however re-running is significalnlty faster, so ther seems to be some nvrtc perf regressions from newer CUDAs rather than python changes
|
I've now prevented python 3.12 (actually 3.8+) from calling the deprecated methods which are included in codegen.py for python 3.7 support, by comparing the version tuple ( Tested with python 3.7 and 3.12, demonstrating that both pass and 3.12 doesn't generated deprecation warnings. $ python3 -m pytest ../tests/python/codegen/test_codegen.py
================================= test session starts =================================
platform linux -- Python 3.12.0, pytest-7.4.2, pluggy-1.3.0
rootdir: /home/ptheywood/code/flamegpu/FLAMEGPU2
collected 51 items
../tests/python/codegen/test_codegen.py ....................................... [ 76%]
............ [100%]
================================= 51 passed in 0.15s ================================== $ python3 -m pytest ../tests/python/codegen/test_codegen.py
========================================= test session starts ==========================================
platform linux -- Python 3.7.0, pytest-7.4.2, pluggy-1.2.0
rootdir: /home/ptheywood/code/flamegpu/FLAMEGPU2
collected 51 items
../tests/python/codegen/test_codegen.py ................................................... [100%]
========================================== 51 passed in 0.14s ========================================== Edit: Full test suites passed with python 3.7 and 3.12 too (using CUDA 12.1 to avoid the 12.2 RTC perf issues) I've now also tested with python 3.8 as well which passed tests with no warnings. |
I'll let @mondus review this, I barely understand how it was setup. So I'm never sure what the safe way of handling stuff is (e.g. if that's deprecated, do we need to handle it a different way?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to suggested commit