Repository navigation
Description
Problem Description
Currently, Python 3.12 isn't fully supported in statsmodels yet, including testing in Continuous Integration (CI) and publishing wheels to PyPI. This can prevent dependent packages from starting work on their Python 3.12 support.
Feature Description
The feature request is for full support of Python 3.12, including testing in CI and publishing wheels to PyPI. This includes addressing and fixing any potential errors and bugs that may arise due to new Python 3.12 features and deprecations.
Alternative Solutions
An alternative could be to wait until NumPy, SciPy, Cython, and Pandas have wheels available for Python 3.12. However, as statsmodels is a lower-level dependency for many projects, it would be beneficial for these projects if Python 3.12 support could be started as soon as possible.
Additional Context
Python 3.12 is expected to be released as stable on Monday, October 2, 2023, with many new features and changes including:
- PEP 701: Syntactic formalization of f-strings
- PEP 688: Making the buffer protocol accessible in Python
- PEP 692: Using TypedDict for more precise **kwargs typing
- PEP 695: Type Parameter Syntax
- PEP 698: Override Decorator for Static Typing
- PEP 623: Remove wstr from Unicode (Deprecation)
- PEP 632: Remove the distutils package (Deprecation)
The release schedule for Python 3.12 is as follows:
- 3.12.0 beta 2: Tuesday, 2023-06-06
- 3.12.0 beta 3: Monday, 2023-06-19
- 3.12.0 beta 4: Monday, 2023-07-10
- 3.12.0 candidate 1: Monday, 2023-07-31
- 3.12.0 candidate 2: Monday, 2023-09-04
- 3.12.0 final: Monday, 2023-10-02
By testing Python 3.12 in CI, we can catch errors and bugs before Python 3.12 becomes stable. This will not only help speed up Python 3.12 adoption for statsmodels but also for packages that depend on statsmodels.
Activity
bashtage commentedon Jun 14, 2023
I think we need at a minimum SciPy wheels (pre release are OK) sincere it is difficult to build.
EwoutH commentedon Jun 20, 2023
Incoming! scipy/scipy#18689
bashtage commentedon Jun 20, 2023
That is a start, but need them to start doing 3.12 nightly wheels before we can test.
Joseisg commentedon Jun 28, 2023
quick question my friend. Do you know which version should I install to not have any problems with statsmodels? I just installed the 3.11.4 version but I can't use the .api at all. Any idea what should I use?
(sorry to ask here but I'm kinda new and I'm literally lost)
EwoutH commentedon Sep 26, 2023
NumPy, SciPy and Pandas now all have stable Python 3.12 wheels on PyPI!
bashtage commentedon Sep 26, 2023
So does statsmodels.
EwoutH commentedon Sep 26, 2023
Awesome, thanks a lot!
The Windows wheel still seems missing however.
bashtage commentedon Sep 26, 2023
Thanks. Added it.
karrmagadgeteer2 commentedon Nov 27, 2023
May I ask for advice on how to get statsmodels to work with 3.12 given the above?
bashtage commentedon Nov 27, 2023
All wheels for 3.12 are there, so should be able to pip install.