Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork10.9k
CI: update cibuildwheel to 3.0.0b1 and enable cp314 and cp314t nightlies#29007
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ngoldbaum commentedMay 20, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I tried to address the unrelated CI failures in#29008. It looks like there's a test failure on windows arm64 under free-threading that doesn't occur elsewhere:
Other than that things seem to be building and testing correctly. |
henryiii commentedMay 20, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The way tests run changed significantly in 3.0, to facilitate iOS (and Android). It's more like conda-build now. By default, it runs in the root. If you use There's also a new |
tools/wheels/cibw_test_command.sh Outdated
@@ -4,6 +4,8 @@ set -xe | |||
PROJECT_DIR="$1" | |||
cd tools |
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.
cd tools | |
export PYTHONSAFEPATH=1 |
.github/workflows/wheels.yml Outdated
env: | ||
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} | ||
CIBW_ENABLE: cpython-prerelease cpython-freethreading pypy |
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.
I'd setcpython-freethreading pypy
in your pyproject.toml (or whatever toml file it's in). You can leaveCIBW_ENABLE: cpython-prerelease
here.
tools/wheels/cibw_test_command.sh Outdated
if [ -d tools ]; then | ||
cd tools | ||
fi |
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.
if [-d tools ];then | |
cd tools | |
fi | |
export PYTHONSAFEPATH=1 |
joerick commentedMay 20, 2025
I'm curious what the error was that you got without this line? |
see e.g.this CI run on my fork of NumPy. Although that said it also looks like it's happening here now - so I guess |
The pypy3.11 failure is addressed by#29014. |
I tried setting I'd like to understand exactly why these things are happening, so will look into it more later. The best solution is probably to use |
I wonder how annoying it would be to bite the bullet and do a mass-rename to an Probably pretty annoying given the number of open PRs, unfortunately... |
henryiii commentedMay 20, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
It would be nice, though. It would make local running easier. :) The rename might not be that bad as long as no content changes in renamed files, it might be able to track though it. This looks like a bug in cibuildwheel (or my understanding of how to specify test-sources): test-sources = ["tools","numpy/conftest.py","pyproject.toml","pytest.ini"]
|
IIRC, that possibility was discussed when we began the transition to pytest back in 2017. It was the pytest suggested layout, but would have required a lot of work and been less convenient than keeping the test files together with the source files. The idea of having a separate download required for the tests also did not appeal at that time. Which is a bit ironic given our current desire to reduce wheel size. I am not opposed to such a massive reorganization, but I don't think this is the time to do it. |
This is not the only package with this layout, so we (cibuildwheel) need to figure out what is happening and how best to provide help, a backward compatibility mode, and/or a path forward. I have a backward compatibility idea that I’m gonna propose in a little bit, but first I need to understand exactly how the structure is currently working. (And I’m only working on this for a few minutes every so often currently) My personal recommendation is a small unittest based suite inside the package that just validates the build works on that system, and the full pytest suite outside the package. But that doesn’t have anything to do with upgrading to cibuildwheel 3. :) |
For now are we ok to upload the wheels generated here with the |
joerick commentedMay 20, 2025
I think so, yes. The |
I don't have a problem with nightlies, but I don't want them to show up in the released wheels until the first 3.14 rc. Maybe wait until 2.3 is branched, which should be in a day or two. I am also a bit wary of having the cibuildwheel 3.0 beta in the maintenance branch. It looks like an easy backport to make when the time comes. |
Happy to wait until after 2.3 is branched. |
henryiii commentedMay 20, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
If the CI can have a different environment for the nightlies, you can only set the enable for the nightly CI. cibuildwheel 3 (beta or not) makes a few platform changes, like a manylinux and musllinux bump. You can select older ones and get identical output (not musllinux please, 1.1 is pretty dead at this point), but I'd make sure you are happy with what's being produced before committing to 3.
|
Will there not be a |
.github/workflows/wheels.yml Outdated
env: | ||
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} | ||
# delete when we switch 3.14(t)-dev to 3.14(t) | ||
CIBW_ENABLE: cpython-prerelease |
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.
This is unnecessary, as is the change inpyproject.toml
. It was already set up correctly.
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.
Probably my fault, I thought this was being added in this PR when I gave a suggestion, didn’t realize it was already there.
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.
No worries. Our setup here is a bit unusual, we're explicitly iterating over all platforms and Python versions, socpython-prerelease
doesn't do anything (and hence can always be left in) unless"cp31x"
is added withx
for an unreleased version.
No. You can get exactly the same builds out of 3.0, just manylinux/musllinux defaults have changed based on announced dates (6+ months). It’s honestly a perfect time for bumping with a new Python version. We should be able to fix the testing changes, working on understanding numpy’s setup and fixing. |
Okay, thanks@henryiii. It was simply the "beta" tag that triggered the question. Normally the new thing is released before the stable series stops working. So I assume the 3.0 release is coming before CPython 3.14.0rc1 and all the dust has settled on the changes in 3.0/main? |
We should probably also move to |
I thought we did that in#28436. |
Thanks@charris, you're right - I completely missed that. Since [tool.cibuildwheel.linux]manylinux-x86_64-image ="manylinux_2_28"manylinux-aarch64-image ="manylinux_2_28"musllinux-x86_64-image ="musllinux_1_2"musllinux-aarch64-image ="musllinux_1_2" we should be good here. |
The stable series has not stopped working. We'll fix it if it does.
It should be done before 3.14.0b2 in a couple of weeks, much less than rc1 which is something like 3 months away, yes. I think we are about ~1 week away, assuming no blockers (test-sources not working is already a blocker, to be fair). If it werereally delayed, yes, we'd try to backport this to 2.x. But I don't think we'll need to.
Perfect, moving to 3.0 shouldn't change anything then, only defaults are changing (to the values above, except on 32-bit linux). (Except for the test changes, which we are looking into) |
Great, given that timing we should move to 3.0-beta now indeed. |
Actually no need to backport this yet - easier to do the 2.3.0 release without it, and backport it once we're releasing for CPython 3.14 (probably will be numpy 2.3.2 or 2.3.3). |
ping@joerick@henryiii - thanks so much for putting out a cibuildwheel 3.0 beta release!
Do either of you happen to know why I had to add
cd tools
to thecibw_test_command.sh
file? I want to double-check that's not a cibuildwheel bug. For whatever reason in older versions of cibuildwheel the test command didn't run in the NumPy source checkout fromactions/checkout
, but now it does.