Skip to content

fix(deps): slim server installs from uv.lock on Python 3.14 (#5709) - #5770

Merged
nicoloboschi merged 1 commit into
mainfrom
triage/5709
Oct 19, 2026
Merged

nicoloboschi merged 1 commit into
mainfrom
triage/5709

Conversation

@nicoloboschi

Copy link
Copy Markdown
Collaborator

Fixes #5709.

Problem: uv sync --frozen --python 3.14 --package hindsight-api-slim fails. The lock pins onnxruntime 1.20.1 on every platform, and that version has no cp314 wheels. The cap comes from magika 0.6.x (pinned by every markitdown release), which limits onnxruntime to <=1.20.1 on win32 only. The universal lock applied it everywhere.

Fix:

  • Root pyproject.toml: constraint-dependencies = ["onnxruntime>=1.24.1; sys_platform != 'win32'"], so uv forks onnxruntime by platform. Windows keeps 1.20.1, every other platform gets 1.31.0.
  • asyncpg 0.30.0 → 0.31.0, the first release with cp314 wheels. Not 0.32.0, which changes pool min_size behaviour.
  • onnxruntime 1.31 ships type hints, so the embeddings code wraps the session output in np.asarray, as the cross-encoder already does.
  • CI: build-api-python-versions only installed with a fresh resolve, so it never read the lock. It now also installs from uv.lock on 3.11–3.14 and imports onnxruntime, magika, markitdown and asyncpg.

What else changes: Linux, macOS and Docker installs from the lock now run onnxruntime 1.31.0 (was 1.20.1) and asyncpg 0.31.0 (was 0.30.0).

Tested:

  • The frozen sync fails on the old lock and works on the new one, on 3.14 and on 3.12. The imports work on both.
  • ONNX embedding, reranker and runtime tests, markitdown tests, file retain tests and DB pool tests: 85 passed, 3 skipped, 0 failed.
  • lint.sh passes.
  • Not tested on Windows.

…tform, so the slim server installs on Python 3.14

magika 0.6.x (pinned by every markitdown release) caps onnxruntime<=1.20.1
on win32 only, but the universal uv.lock applied that version everywhere,
and 1.20.1 has no cp314 wheels. A platform-scoped constraint forks it:
win32 keeps 1.20.1, every other platform gets 1.31.0. asyncpg moves
0.30.0 -> 0.31.0, the first release with cp314 wheels (not 0.32.0, which
changes pool min_size behaviour).

onnxruntime 1.31 ships type hints, so the embeddings path now wraps the
session output in np.asarray, as the cross-encoder already does.

CI: build-api-python-versions only installed with a fresh resolve, so it
never saw the lock. It now also installs from uv.lock on 3.11-3.14.

Fixes #5709
@nicoloboschi
nicoloboschi merged commit 0686d3c into main Oct 19, 2026
116 of 117 checks passed
@nicoloboschi
nicoloboschi deleted the triage/5709 branch October 19, 2026 16:44
@nicoloboschi nicoloboschi mentioned this pull request Nov 3, 2026
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.

uv.lock pins onnxruntime 1.20.1 on every platform (magika win32 cap), so hindsight-api-slim can't install on Python 3.14

1 participant