grass
grass copied to clipboard
[Feat] Start supporting Python 3.12
Is your feature request related to a problem? Please describe. Python 3.12 is out since October 2, 2023. Some changes include new depreciation, like "A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning." https://docs.python.org/3/whatsnew/3.12.html#other-language-changes These were deprecated since Python 3.6, in 2016.
These were "errors" that were found and fixed automatically by the same process of #3251. In fact, I manually reverted any other changes in #3251 to keep the PR focused. Fixing these was for my second part, once it could be merged. In my background work on trying to find how to speed up the CI, especially the longest job that has 1h30 of tests, I tried many many different approaches, and the multiple syntax warnings were kind of noisy when testing.
Describe the solution you'd like
- [x] Start by adding Python 3.12 (and maybe 3.11 too) in the pytest workflow. These don't take as much time, and will help a little bit by seing some of the warnings when importing the code. (#3314)
- [ ] Fix the warnings, upgrade some python language constructs that are a little bit more modern, and that is supported by all our older Python versions, (as of now, it would be Python 3.8 and later)
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.