Fix Windows wheel build quoting, and stop it from blocking other platforms' releases - #792
Merged
Merged
Conversation
…re-build cibuildwheel runs before-build through the native shell, which on windows-2022 is cmd.exe. cmd.exe does not treat single quotes as a quoting character, so `pip install 'Cython>=3.1'` left the `>` exposed as cmd's output-redirection operator: the command ran as `pip install 'Cython` with stdout redirected to a file named `3.1'`, installing nothing and failing the whole build matrix (no fail-fast), which blocked every PyPI release. Double quotes are honored by both cmd.exe and bash/zsh, so quote the spec with those instead. Fixes #790 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TzUaDNbLSKGwTF8iWTMkPF
publish needs build_wheels, and a matrix job only succeeds if every leg does -- so a single broken Windows build blocks the release for every platform, not just Windows (this is what happened in #790). Remove windows-2022 from build_wheels' os list so releases can go out on the other platforms independent of Windows wheel status.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #792 +/- ##
=======================================
Coverage 96.20% 96.20%
=======================================
Files 110 110
Lines 11789 11789
Branches 1281 1281
=======================================
Hits 11342 11342
Misses 350 350
Partials 97 97 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: Before submitting this pull request, please review our contributing
guidelines.
Description
e9f102f(#762) changed[tool.cibuildwheel] before-buildinpyproject.tomlfrom
pip install Cythontopip install 'Cython>=3.1'. cibuildwheel runsthat command through the platform's native shell, and on
windows-2022that'scmd.exe, which does not treat single quotes as a quoting character. The>was therefore parsed as cmd's output-redirection operator: the command ran as
pip install 'Cythonwith stdout redirected to a file literally named3.1', so Cython was never installed and the Windows wheel build failed —confirmed against the actual failed run log (
cibuildwheel: Command pip install 'Cython>=3.1' failed with code 1.).Because
publishneedsbuild_wheels, and a matrix job only succeeds ifevery leg does, that one Windows failure blocked the release for every
platform, so PyPI releases went missing entirely.
Two changes:
double quotes are honored by both
cmd.exeand bash/zsh, so the commandis quoted correctly on every platform cibuildwheel builds on here.
windows-2022from thebuild_wheelsmatrix, so a futureWindows-specific failure can no longer block releases for the other
platforms. It can be re-added once Windows wheel builds have proven
stable again.
Fixes #790
Test plan
python3 -c "import tomllib; tomllib.load(open('pyproject.toml','rb'))"—pyproject.tomlparsespython3 -c "import yaml; yaml.safe_load(open('.github/workflows/python-package.yml'))"— workflow YAML parsesGenerated by Claude Code