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.11 #369
Python 3.11 #369
Conversation
992ffa8
to
03eff32
Compare
96c5dfe
to
74a6d12
Compare
One last error after upgrading to Cython 0.29.28:
I believe this one is fixed by Cython 0.29.29 - but it's not available on my Ubuntu 22.04 machine as a DEB package. |
24eb724
to
349001f
Compare
Tried to install Cython 0.29.29, but pip complains this version is yanked:
Let's upgrade to Cython 0.29.30:
Re-generated |
349001f
to
252d466
Compare
Last CI issue occurs while building docs, looks like a zfpy problem:
It looks like no pre-built wheel is found, we attempt to build from source, but the build process is broken: LLNL/zfp#190. Python 3.11 wheels have been added yesterday, perhaps we need to wait for them to build: LLNL/zfpy-wheels@ae6ca88 |
I hope I am not misunderstanding: yes, it should be possible to re-generate C files on the fly instead of pre-generating vendored C files. However, do we need to do this in this specific PR? Perhaps when |
Sorry am just suggesting we delete the C files (generation on the fly should already happen without other changes) Yeah not suggesting we make the |
I see. Let me start by removing |
29cd779
to
4112359
Compare
This pull request introduces 1 alert when merging 4112359 into a3e05fd - view on LGTM.com new alerts:
|
91c681e
to
0ea3262
Compare
I had to add a With vendored C files out of the way, moving to Python 3.11 is pretty easy. No need to re-generate C files with a version of Cython compatible with Python 3.11, because they will re-generated on the fly. |
0ea3262
to
32263f5
Compare
Awesome thank you for digging in here Dimitri! 🙏 Recognize we have some code debt here in the build setup. Hoping we can chip away at it to simplify things both now and in the future 😉 |
FWIW here's the |
I hadn't noticed this |
32263f5
to
1a923a3
Compare
No worries. Looks like that fixed it. The Python 3.11 failure is happening because Also sorry for not commenting on the diff (it is below the fold) |
The
I think this line will be added with
|
We could indeed devendor |
Yep was reading about this as well. There's probably some things we need to move from |
1e681e6
to
0b61337
Compare
Is It is also found in |
It's a fair question. Yes it is optionally used here. If it is not present, that codec isn't enabled. Think RTD should be ok since we don't need to move that to Python 3.11 (it can stay on whatever Python version it is now). |
0b61337
to
ab9124c
Compare
It looks like docs are built for all versions of Python, using numcodecs/.github/workflows/ci-linux.yaml Lines 39 to 43 in a3e05fd
Hence the Python 3.11 failure. Perhaps we need a different job for docs, using a single version of Python. |
ab9124c
to
3a51621
Compare
Good point. Maybe that is a holdover from before we had RTD running on PRs? It might make sense to drop the doc step. Though that's probably a bigger change than we want to pursue in this PR. Perhaps another conditional in that requirement file would be sufficient? |
3a51621
to
79ea780
Compare
Might want to exclude them from FYI, at some point in the future when Cython 3.x is available, these things should "sort themselves out" due to these changes:
|
File pyproject.toml is required to install Cython before setup(): https://setuptools.pypa.io/en/latest/build_meta.html Vendored C files have been deleted. They will re-generated by Cython on the fly. For developers who want to generate C files using Cython locally, we enforce Cython>=0.29.30. That is the minimal version required to generate a _shuffle.c file compatible with Python 3.11.
Avoid zpfy when building with Python 3.11 for now, to avoid CI errors.
79ea780
to
25d37bb
Compare
Thanks Dimitri! 🙏 Will merge once CI passes |
Raised issue ( LLNL/zfp#192 ) about |
Python 3.11 raises a few errors in
numcodecs/_shuffle.c
that are documented in What’s New In Python 3.11:I guess a more recent version than Cython 0.29.21 is required for Python 3.11:
numcodecs/numcodecs/_shuffle.c
Line 1 in a3e05fd
Cython 0.29.25 fixes most bugs related to Python 3.11 and could be sufficient.
Cython 0.29.26 fixes an additional bug related to Python 3.11, but it might not be required.
tox -e py310
passes locallytox -e docs
passes locally