Skip to content

Switch cibuildwheel to the uv build frontend#1350

Merged
bdraco merged 1 commit into
aio-libs:masterfrom
bdraco:cibuildwheel-uv-frontend
May 17, 2026
Merged

Switch cibuildwheel to the uv build frontend#1350
bdraco merged 1 commit into
aio-libs:masterfrom
bdraco:cibuildwheel-uv-frontend

Conversation

@bdraco
Copy link
Copy Markdown
Member

@bdraco bdraco commented May 17, 2026

What do these changes do?

Set build-frontend = "build[uv]" in [tool.cibuildwheel]
so that uv provisions every virtual environment cibuildwheel
creates, both on the build side (passed to python -m build as
--installer=uv) and when materializing the per-ABI test
environment. The previous default build-frontend = "build"
left every test env doing a multi-second pip resolve of
requirements/pytest.txt per ABI; uv resolves and installs
the same set in roughly a second, which compounds across the
ABIs and host platforms in the wheel matrix.

Also adds extras: uv to the pypa/cibuildwheel action
invocation in reusable-cibuildwheel.yml so that Windows and
macOS runners get uv bundled alongside cibuildwheel (Linux
already has uv inside the manylinux/musllinux containers).

The corresponding change in aio-libs/propcache is
propcache#234.

Are there changes in behavior for the user?

No, contributor tooling only.

Is it a substantial burden for the maintainers to support this?

No; cibuildwheel maintains the build[uv] frontend.

Related issue number

N/A

Checklist

  • I think the code is well written
  • Unit tests for the changes exist: N/A (CI-only change; the wheel-matrix run on this PR is the verification path)
  • Documentation reflects the changes: N/A (no user-visible API change)
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt: N/A (no such file in this repo)
  • Add a new news fragment into the CHANGES/ folder (CHANGES/1350.contrib.rst)

Drafted with Claude Code (Opus 4.7); reviewed by @bdraco.

Agent run details (optional, for reviewers)

Local validation:

$ python3 -c "import tomllib; tomllib.load(open('pyproject.toml','rb'))"
$ make doc-spelling
5 pre-existing misspellings only in CHANGES.rst (parametrization, postfix, instantiation, init, parametrized); CHANGES/1350.contrib.rst is clean after adding "frontend" to the wordlist. Verified by temporarily removing "frontend" from the wordlist and re-running, which reported the fragment-sourced flag at ``[towncrier-fragments]:169``, then restored.
$ pre-commit run --files .github/workflows/reusable-cibuildwheel.yml docs/spelling_wordlist.txt pyproject.toml CHANGES/1350.contrib.rst
all hooks pass (ran via the commit hook).

Not verified locally: the actual cibuildwheel + uv interaction
inside the build container; that requires running cibuildwheel
which is impractical without pushing. The live CI run on this
branch is the verification.

This repo's [tool.cibuildwheel] did not have the before-test
PyYAML pre-cache block or the [tool.cibuildwheel.windows]
before-test = [] override that propcache#234 removed, so this
PR is strictly additive relative to propcache's version of the
change.

@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided There is a change note present in this PR label May 17, 2026
Copy link
Copy Markdown
Member

@Vizonex Vizonex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually have been using uv while contributing to this project this whole time so I think swapping to it actually might make sense.

@Vizonex Vizonex self-requested a review May 17, 2026 20:22
@Vizonex
Copy link
Copy Markdown
Member

Vizonex commented May 17, 2026

Sorry if I approved twice I was trying to add myself to the list of reviewers so that you could have one on hand.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 17, 2026

Merging this PR will not alter performance

✅ 244 untouched benchmarks


Comparing bdraco:cibuildwheel-uv-frontend (69e09d9) with master (d208851)

Open in CodSpeed

@Vizonex
Copy link
Copy Markdown
Member

Vizonex commented May 17, 2026

@bdraco I think were bound for another update with multidict soon. The last update was around 5 months ago and since then we have had a few bug fixes.

@bdraco
Copy link
Copy Markdown
Member Author

bdraco commented May 17, 2026

Yeah we need a yarl and a multidict update. I'm going to do one after the end of PyCon since I'm hoping we might pickup some contributor PRs tomorrow at the sprints.

@bdraco bdraco marked this pull request as ready for review May 17, 2026 20:27
@bdraco bdraco requested review from asvetlov and webknjaz as code owners May 17, 2026 20:27
@bdraco bdraco enabled auto-merge (squash) May 17, 2026 20:35
@bdraco bdraco merged commit 1ad8b48 into aio-libs:master May 17, 2026
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants