Skip to content

ci: honor cython pin under build[uv] with UV_CONSTRAINT - #249

Merged
bdraco merged 1 commit into
masterfrom
ci-cibuildwheel-uv-constraint-env
May 22, 2026
Merged

bdraco merged 1 commit into
masterfrom
ci-cibuildwheel-uv-constraint-env

Conversation

@bdraco

@bdraco bdraco commented May 22, 2026 •

Copy link
Copy Markdown
Member

What do these changes do?

Add UV_CONSTRAINT and UV_BUILD_CONSTRAINT to the
[tool.cibuildwheel.environment] block, mirroring the existing
PIP_CONSTRAINT entry (and adding PIP_BUILD_CONSTRAINT for
parity). All four point at requirements/cython.txt.

Since the cibuildwheel build frontend was switched to build[uv],
the PIP_CONSTRAINT env var is silently ignored during the wheel
build; uv pip reads only UV_CONSTRAINT / UV_BUILD_CONSTRAINT.
Empirically, with python -m build --installer=uv and
PIP_CONSTRAINT set to pin an older Cython, uv still resolves the
latest release; setting UV_CONSTRAINT to the same file pins it
correctly. The PIP_ variants are kept because the odd-arch matrix
in ci-cd.yml overrides CIBW_BUILD_FRONTEND=build (pip frontend)
on containers that do not ship uv.

Are there changes in behavior for the user?

No user-facing change; the Cython version pin used at wheel build
time is now actually enforced under the build[uv] frontend,
matching the intent of the existing PIP_CONSTRAINT line.

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

No; a few extra env vars in pyproject.toml.

Related issue number

Port of aio-libs/yarl#1729.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist (N/A, CI/packaging env change)
  • Documentation reflects the changes (N/A)
  • Add a new news fragment into the CHANGES/ folder

@pyba-chronographer pyba-chronographer Bot added the bot:chronographer:provided There is a change note present in this PR label May 22, 2026
@codspeed

codspeed Bot commented May 22, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 4 untouched benchmarks


Comparing ci-cibuildwheel-uv-constraint-env (a35ec20) with master (ebe0e4d)

Open in CodSpeed

@bdraco
bdraco marked this pull request as ready for review May 22, 2026 13:55
@bdraco
bdraco enabled auto-merge (squash) May 22, 2026 13:55
@bdraco
bdraco merged commit 9d24e29 into master May 22, 2026
51 checks passed
@bdraco
bdraco deleted the ci-cibuildwheel-uv-constraint-env branch May 22, 2026 13:56
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.

1 participant