Repository navigation
Python 3.11 #8304
Description
This is the meta/coordination issue for Python 3.11 support for Numba and llvmlite.
Note: The issue text will be updated continuously to reflect the current process and progress.
As Numba interfaces with cpython on the bytecode and C-level, Python minor version upgrades present a significant compatibility challenge and have -- in the past -- required multiple PRs over multiple months of work. For Python 3.11 this issue will serve as a central point of coordination of the efforts. As such it will list the current branches pertaining to Python 3.11 support in addition to using the tag Python 3.11.
In order to support testing against beta releases and release candidates, I created a small utility that allows easy setup of a Numba development environment against a Python pre-release docker container. https://github.com/numba/numba-hatchery this can be used with development branches/repositories of Numba and llvmlite.
-
llvmlite status
- Using the PR bump max Python version to 3.11 llvmlite#869 passes all unit tests when used with numba-hatchery
-
numba status
- Numba Python 3.11 support is now being worked on across multiple branches:
- https://github.com/esc/numba/tree/python3.11_partial/version_bump -- version bump
- https://github.com/esc/numba/tree/python3.11_partial/compile-hack -- compile hacks (WIP)
- https://github.com/esc/numba/tree/python3.11_partial/implement_resume -- RESUME implementation
- Numba would not compile initially. The https://github.com/esc/numba/tree/python3.11_partial/compile-hack branch was created to allow. Numba to compile
- The new
RESUMEopcode wasn't being handled. https://github.com/esc/numba/tree/python3.11_partial/implement_resume implements this. - The branch
esc/python3.11now contains a merge of all involved feature branches and can be used for testing all required patches in unison: Python3.11 #8381 - @sklam is making progress with the bytecode at: https://github.com/sklam/numba/tree/py3.11wip
- Numba Python 3.11 support is now being worked on across multiple branches:
-
TODO
- Cleanup the compile-hacks PR so that it is sane and not just something to allow compilation
- Port distutils to use setuptools as per https://peps.python.org/pep-0632/
Activity
sklam commentedon Sep 28, 2022
I'm making progress on the bytecode support at https://github.com/sklam/numba/tree/py3.11wip
sklam commentedon Oct 26, 2022
I'm making progress at #8545. The PR adapts Numba for the major bytecode changes in Py3.11.
fix: Don't depend on numba for Python 3.11
binary-husky commentedon Nov 18, 2022
Still no official support for python 3.11 ?
fix: Don't depend on numba for Python 3.11
alonme commentedon Dec 3, 2022
Any news?
extesy commentedon Dec 3, 2022
There is an active https://github.com/numba/numba/commits/py3.11 branch, a lot of progress is happening.
esc commentedon Dec 3, 2022
@extesy thank you for listing that link. @alonme to answer your question: Indeed all the work for Python 3.11 is currently being merged one PR at a time to the
py3.11branch and collected there for further testing. IIRC @sklam mentioned during the last developer meeting (https://github.com/numba/numba/wiki/Minutes_2022_11_29) that there are only a handful of failing tests that remain. From what I can tell it shouldn't be long now and with any luck there will be a Numba release candidate that supports 3.11 before the end of the year 🤞 (but making no guarantees, obviously).alonme commentedon Dec 3, 2022
@esc thanks for the detailed answer!
Waiting for it
stuartarchibald commentedon Dec 5, 2022
The changes needed to accommodate the majority of the new Python 3.11 op-code additions, along with changes to the op-code behaviour/sequences in the bytecode, have been addressed in #8545 and #8590 with thanks to @sklam. The majority of the remaining issues are addressed in #8639, a summary of the current state of the Numba test suite against this branch is here #8639 (comment) (less than 10 failures with varying degrees of difficulty to fix).
fix: Don't depend on numba for Python 3.11
sklam commentedon Dec 15, 2022
We are providing a docker image for early testing Numba on Python 3.11. Please see details at: https://numba.discourse.group/t/ann-docker-image-for-early-testing-numba-on-python-3-11/1698
27 remaining items
Scolymus commentedon Mar 10, 2023
hey @esc ,
so I understand this version won't be compatible with numpy>1.24, right? I know it may not be the place to ask but, can I know what's the problem with numpy >1.24 and when there will be a version for that? I never use numba, but just install a repo dependent on numba, and after having my project working in local and integrating in a bigger project I realized numba wasn't working with numpy 1.25, which is what we use in the other project... I installed 0.57.0dev0 to allow pip to install numba while having numpy > 1.24, but I got an error that I saw is related with numpy version in a different issue:
initialization of _internal failed without raising an exceptionesc commentedon Mar 10, 2023
@Scolymus -- from what I can tell support for 1.24 was merged here: #8691 --
esc commentedon Mar 10, 2023
@Scolymus and 1.25 support is no implemented yet and being tracked here: #8698
imichaelmoore commentedon Mar 14, 2023
This issue is quite convoluted at this point, could one of the maintainers chime in and let the community know specifically what they need help with in terms of testing? We are all watching this issue but at this point it's not clear what needs to be tested to enable a release. (And we want to help! 😄 )
esc commentedon Mar 14, 2023
Sure, allow me to chime in! @sklam is currently still merging development branches and we are hoping to publish a release candidate next week (maybe the week after...). As soon the projects have been tagged and the build artifacts produced, we will be very grateful for everyone to test those candidates with their respective libraries and applications (and of course... to report back any encountered issues). An announcement with instructions on how to install will be posted to our discourse (numba.discourse.group) and will post a link here too, pointing everyone in the right direction.
kaluzniacki commentedon Mar 17, 2023
The developers have my sympathies - I very much understand how using conda makes things easier - I hope to never have to install gdal without conda, and I can install independent versions of gcc with conda. Best of luck!
sklam commentedon Mar 21, 2023
Py3.11 branch have been merged to main by #8822
sklam commentedon Mar 22, 2023
We are planning to cut an RC next week. Closing
jakirkham commentedon Mar 22, 2023
Is there an issue to track updates on the RC and releases?
stuartarchibald commentedon Mar 23, 2023
A Release Candidate checklist for 0.57.0rc1 is now in #8841. Please do subscribe to that if you are interested in following progress. The official RC announcement will be made on the discourse forum as usual.
🐍 Update Supported Python Versions (add 3.11 ) (#500)
quanqigu commentedon Mar 18, 2025
Python3.11 is supported from numba 0.57.0.
hauntsaninja commentedon Mar 18, 2025
https://github.com/hauntsaninja/python_readiness