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
CI: test with Python 3.12-beta #18689
Conversation
[skip cirrus] [skip circle]
haha we can't yet: |
I'm afraid that there is no point doing this until there is a numpy nightly for 3.12. That may take a few more weeks (or, with luck, it lands after this weekend, dunno). |
NumPy wheels are incoming: numpy/numpy#23991 |
@tupui numpy nightlies are up now. If you change this to use |
We can still use I relaunched and now the error is on our side after successfully having compiled NumPy:
And indeed we have even wrote something about it (gh-16058): Lines 114 to 120 in f05674a
@FFY00 seems like you were involved in some discussions around that topic. Any guidance on the best course of action as of now? Thanks in advance 😃 Another question that was raised on other repos... Should we also try to ship wheels for 3.12? Seems like CirrusCI is ready: https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip |
Yes, we can start building nightlies for 3.12-beta I'd say, that will help other projects like scikit-learn & co. Probably best as a follow-up PR to this one. The GHA and Cirrus CI changes should be the same as in numpy/numpy#23991 I'd expect. |
Sorry for the delay! I wasn't able to look at this earlier, but I am finally catching up with my notifications. For Python 3.12 and forward, Debian seems to now be patching So, you'd change Lines 335 to 348 in f05674a
to def get_site_packages(self):
"""
Depending on whether we have debian python or not,
return dist_packages path or site_packages path.
"""
if sys.version_info < (3, 12) and 'deb_system' in INSTALL_SCHEMES:
# debian patched python in use
install_cmd = dist.Distribution().get_command_obj('install')
install_cmd.select_scheme('deb_system')
install_cmd.finalize_options()
plat_path = Path(install_cmd.install_platlib)
elif sysconfig.get_default_scheme() == 'posix_prefix':
# debian patched python in use, and we are on the global environment
# posix_prefix is the user-installable debian scheme
plat_path = Path(get_path('platlib', scheme='deb_system'))
else:
plat_path = Path(get_path('platlib'))
return self.installed / plat_path.relative_to(sys.exec_prefix) However, I'd actually respect Debian's patching and install to The adjusted code: def get_site_packages(self):
"""
Depending on whether we have debian python or not,
return dist_packages path or site_packages path.
"""
if sys.version_info < (3, 12) and 'deb_system' in INSTALL_SCHEMES:
# debian patched python in use
install_cmd = dist.Distribution().get_command_obj('install')
install_cmd.finalize_options()
plat_path = Path(install_cmd.install_platlib)
else:
plat_path = Path(get_path('platlib'))
return self.installed / plat_path.relative_to(sys.exec_prefix) No special handling is needed for Debian anymore because they now patch That is, unless you actually want to install to the Debian install directory ( |
It seems this code was introduced in 9e19577. @AnirudhDagar, do you remember if there was a specific reason behind installing to |
Thanks @FFY00 for sharing the update on Debian Python 3.12
This makes sense, we don't need to specifically install to Debian install directory, as long as we make sure the path behaviour is the same as |
@AnirudhDagar would you like to handle this? |
Thanks, happy to take this up. @tupui is it okay if I send a PR early next week? |
Sure thank you @AnirudhDagar 🙏 |
Reopened this PR. #18924 will enable this PR to go further in CI for cp312, it wasn't a replacement for this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned, this PR will require installing setuptools
in the 3.12 CI job since meson has not gotten rid of distutils
yet (open PR mesonbuild/meson#11133)
Co-authored-by: Anirudh Dagar <anirudhdagar6@gmail.com>
This is looking good. I think the test fail is unrelated? |
Yes seems unrelated, thanks both! Let's get this in |
Great timing, for scikit-learn I was interested to add Python 3.12 testing and I found this PR that just got merged! It would be great to have nightly wheels uploaded as mentioned in #18689 (comment). I am willing to take inspiration from numpy and have a go at a scipy PR, but if someone from Scipy plans to do it, it may be quicker, let me know! |
I'm trying to build nightlies at https://github.com/andyfaff/scipy/actions/runs/5619957108/job/15227994408, but running into issues building numpy within the cibuildwheel context. |
It seems like cibuildwheel has no dedicated option to use another wheelhouse, nor do I see an option to use a pre-release from PyPI. So even when numpy uploads a pre-release wheel in ~10 days when Python 3.12.0rc1 arrives, it needs a custom install I think. Using CIBW_BEFORE_BUILD is the way to go I think, for nightlies compatible with numpy nightlies we anyway need to use those numpy nightlies, and not rebuild numpy 1.25.x. So I think putting this in
|
Fix scipygh-18689 scipygh-18922 python3.12 removes distutils and scipy dev.py uses distutils for the meson based build in debian python. With python3.12 debian has patched sysconfig and no longer requires dependence on distutils.
Python 3.12 beta2 is out today. Probably a good time to add it in our CI.
Closes #18922