Skip to content

fix: constrain the 3.10 fork of onnxruntime to a release with cp310 wheels (#281) - #282

Merged
RN0311 merged 2 commits into
mainfrom
fix/281-onnxruntime-cp310-lock
Sep 16, 2026
Merged

RN0311 merged 2 commits into
mainfrom
fix/281-onnxruntime-cp310-lock

Conversation

@RN0311

@RN0311 RN0311 commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #281 — uv sync --frozen --extra ml exited 2 on CPython 3.10 because the lock's python_full_version < '3.11' fork selected onnxruntime==1.24.3, whose metadata still admits 3.10 but which publishes wheels only for cp311+ (and no sdist). uv resolves on metadata rather than wheel availability, so the lock was uninstallable on the lowest interpreter requires-python names. The PyPI/pip path was never affected — pip selects by wheel and lands on 1.23.2.

Changes

  • pyproject.toml: new [tool.uv] constraint-dependencies entry pinning the < '3.11' fork to onnxruntime<1.24, with a comment explaining why. The runtime requirement (>=1.10.0) is untouched.
  • uv.lock: re-locked — the < 3.11 branch moves to 1.23.2 (the last release with cp310 wheels), the ≥ 3.11 branch stays on 1.27.0. The three added packages (coloredlogs, humanfriendly, pyreadline3) are 1.23.2's own dependencies.

CI coverage gap (needs a maintainer push)

The issue's coverage note is right: --extra ml is only ever synced under a pinned 3.12, so nothing exercised the 3.10 resolution. The fix for that is one step in the ci.yml test matrix, but pushing workflow changes needs an OAuth token with the workflow scope, which this push lacked. The step to add after "Install frozen environment":

      # The [ml] install itself lives on the macOS job (the Linux lock pulls
      # the multi-GB CUDA torch stack), but the *resolution* must hold on
      # every supported interpreter: the lock once selected an onnxruntime
      # for the < 3.11 fork that publishes no cp310 wheel, so the documented
      # `uv sync --frozen --extra ml` failed on 3.10 and no job noticed
      # (issue #281). --dry-run validates wheel availability for the full
      # extra set without downloading it.
      - name: Check the locked extras resolve on this interpreter
        run: uv sync --frozen --all-extras --dry-run --python ${{ matrix.python-version }}

Verified locally: this command passes on 3.10/3.11/3.12 with the new lock and reproduces the issue's exact error against the old one.

Smoke tests

  • uv sync --frozen --extra ml --dry-run passes on 3.10, 3.11, and 3.12; the --extra dev control on 3.10 still passes; --all-extras --dry-run passes on all three.
  • The same dry-run against the old lock reproduces the issue's exact error (onnxruntime (v1.24.3) only has wheels with ... cp311, cp312).
  • Real install check: onnxruntime==1.23.2 installs and imports on an actual CPython 3.10 venv.
  • uv lock --check clean; unit test sanity subset passes (29 tests).

…heels (#281)

uv.lock forked onnxruntime by interpreter and selected 1.24.3 for
python_full_version < '3.11' — a release whose metadata still admits
3.10 but which publishes wheels only for cp311+ and no sdist. uv
resolves on metadata, not wheel availability, so the documented
contributor path (uv sync --frozen --extra ml) exited 2 on 3.10, the
lowest interpreter requires-python names, while 3.11 and 3.12 were
fine. pip on 3.10 was never affected: it selects by wheel and lands on
1.23.2.

- pyproject gains [tool.uv] constraint-dependencies pinning the
  < 3.11 fork to onnxruntime < 1.24; the re-lock selects 1.23.2 (the
  last release with cp310 wheels) for that branch and leaves the
  >= 3.11 branch on 1.27.0. The three added lock entries
  (coloredlogs, humanfriendly, pyreadline3) are 1.23.2's own
  dependencies.
- The CI test matrix gains a `uv sync --frozen --all-extras --dry-run`
  step per interpreter: the [ml] install itself stays on the macOS job
  (the Linux lock pulls the CUDA torch stack), but resolution and
  wheel availability are now checked on 3.10/3.11/3.12, the coverage
  gap the issue names.

Smoke-tested: the ml and all-extras dry-runs pass on 3.10/3.11/3.12
and the dev control still passes; the same dry-run against the old
lock reproduces the issue's exact error, so the new CI step catches
this class of drift; onnxruntime 1.23.2 installs and imports on a real
cp310 interpreter; uv lock --check is clean.

Fixes #281
@RN0311
RN0311 requested a review from AndyBoWu as a code owner September 16, 2026 03:15
@github-actions github-actions Bot added track: ci CI workflows, pre-commit, packaging manifests track: release Release, changelog, licensing, PyPI distribution labels Sep 16, 2026
@RN0311
RN0311 merged commit 0892524 into main Sep 16, 2026
17 checks passed
@RN0311
RN0311 deleted the fix/281-onnxruntime-cp310-lock branch September 16, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

track: ci CI workflows, pre-commit, packaging manifests track: release Release, changelog, licensing, PyPI distribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] uv sync --frozen --extra ml cannot resolve on CPython 3.10: the lock selects an onnxruntime release for that branch which publishes no cp310 wheel

1 participant