RFC: support python 3.12 (but drop 3.8) #82
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an experiment aimed at supporting python 3.12, which is already at its second point release.
Formally, python 3.8 is still going to be supported for 6 months (https://devguide.python.org/versions). However, some packages have already dropped it.
In particular, there is no scipy version supporting 3.8 and 3.12 at the same time, and this forces us to make a choice.
After bumping scipy to >= 1.11, poetry is able to resolve the dependencies.
At install time there were 2 more problems:
numpy
did not install because python 3.12 dropped support for distutils (https://peps.python.org/pep-0632/). There are workarounds for this (https://numpy.org/devdocs/reference/distutils_status_migration.html), but bumping to 1.26 seems to be an official solutionstatsmodels
0.13 did not compile under python 3.12, probably because it is compiled with-Werror
, and there are some deprecation warnings when compiling its wheel. Bumping to 0.14 solved the issue.This is just the easiest set of actions for allowing the project to run on python3.12. There might be ways to keep a more relaxed set of dependencies (for example, only install numpy 1.26 under python 3.12) if we want to be more permissive.
Local tests on my Fedora with python 3.12 completed fine. Opening the PR to see what the CI (and the fellow devs) think about it.