Skip to content

fix(deps): pin cp314-wheel versions for Python 3.14 to avoid source builds - #1107

Merged
bennyz merged 1 commit into
mainfrom
fix-3.14-dep-builds
Sep 22, 2026
Merged

bennyz merged 1 commit into
mainfrom
fix-3.14-dep-builds

Conversation

@mangelajo

Copy link
Copy Markdown
Member

Problem

On Python 3.14, the uv.lock file resolved several native packages to versions that only ship cp312/cp313 wheels, forcing slow source builds from sdist in CI. The CI job took 22+ minutes, with much of that time spent compiling packages like grpcio from source.

Root Cause

The existing constraint-dependencies in python/pyproject.toml only covered 5 packages (pydantic, pillow, scipy, numpy, pywavelets), but 8 more native packages were still being resolved to versions without cp314 wheels:

Package Locked version (no cp314) Min version with cp314 Build impact
grpcio 1.74.0 1.75.1 🔴 Very slow (10+ min)
aiohttp 3.12.13 3.13.0 🟡 Slow
cffi 1.17.1 2.0.0 🟡 Moderate
rpds-py 0.25.1 0.26.0 🟡 Moderate (Rust)
markupsafe 3.0.2 3.0.3 🟢 Fast
msgpack 1.1.1 1.1.2 🟢 Fast
pyyaml 6.0.2 6.0.3 🟢 Fast
gpiod 2.3.0 2.4.0 🟢 Fast

Changes

  1. python/pyproject.toml — Added 8 new constraint-dependencies with ; python_version >= '3.14' markers, forcing uv to resolve versions that ship cp314 wheels on Python 3.14. Versions for Python <3.14 are unchanged.

  2. python/uv.lock — Regenerated with split resolutions: older versions for Python <3.14 (backward-compatible) and newer versions with cp314 wheels for Python ≥3.14.

  3. .github/workflows/python-tests.yaml — Updated the UV_LOCK_TIMEOUT comment.

Expected Impact

CI on Python 3.14 should see a significant speedup — no native packages will need source compilation, bringing 3.14 job times closer to 3.12/3.13.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: a5e49bdf-fa74-4fe8-98b6-cd823e4ab306

📥 Commits

Reviewing files that changed from the base of the PR and between a25ead7 and a1ca8b4.

⛔ Files ignored due to path filters (1)
  • python/uv.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • .github/workflows/python-tests.yaml
  • python/pyproject.toml

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The Python workspace now constrains Python 3.14 dependency resolution to package releases with pre-built cp314 wheels. The workflow comment now documents these constraints and the unchanged 1,800-second lock timeout.

Changes

Python 3.14 wheel resolution

Layer / File(s) Summary
Resolver constraints and workflow documentation
python/pyproject.toml, .github/workflows/python-tests.yaml
The workspace adds Python 3.14-gated minimum versions for packages with cp314 wheels. Comments explain the constraints and source-build fallback. The workflow comment documents the same resolver behavior. The UV_LOCK_TIMEOUT value remains 1800 seconds.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the dependency constraint change, the Python 3.14 target, and the goal of avoiding source builds.
Description check ✅ Passed The description accurately explains the Python 3.14 source-build problem, the added dependency constraints, and the expected CI improvement.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.

Comment @coderabbitai help to get the list of available commands.

@mangelajo
mangelajo requested a review from raballew September 21, 2026 12:02
…uilds

On Python 3.14, uv resolved several native packages (grpcio, aiohttp,
cffi, rpds-py, markupsafe, msgpack, pyyaml, gpiod) to versions that
only ship cp312/cp313 wheels, forcing slow source builds in CI.

Add constraint-dependencies with python_version >= '3.14' markers to
steer the resolver to the first releases that ship pre-built cp314
wheels. Versions for Python <3.14 remain unchanged.

This should significantly reduce CI time for Python 3.14 jobs by
eliminating source compilation of native packages like grpcio.
@bennyz
bennyz added this pull request to the merge queue Sep 22, 2026
Merged via the queue into main with commit 0f8099d Sep 22, 2026
25 checks passed
@bennyz
bennyz deleted the fix-3.14-dep-builds branch September 22, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants