published fresh until

uv 0.12→0.13: how do I migrate constraints and CI?

Summary As of November 2026, uv 0.13.9 is the current stable release; the 0.13 boundary changes unpinned Python downloads and nested constraints, while patches change workspace inventory and export handling. Pin Python, retain the lockfile and test locked sync; checked 2026-11-24.

Not for Poetry migration, see uv-or-poetry-for-a-python-project-ci-lockfile-and-poetry-migration; TLS or launcher errors, see uv-unknownissuer-trampoline-wheel-console-script-errors

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

Upgrading an existing uv CI job changes Python selection, requirements parsing or workspace/export output. Keep dependency migration separate from interpreter migration.

Versions and licences — checked 2026-11-24

ComponentVerified statusOfficial source
uv stableAs of November 2026, 0.13.9, released 2026-11-17; MIT OR Apache-2.0PyPI and GitHub agree
Breaking boundary0.13.0, released 2026-10-09Release
Earlier patch0.13.2, released 2026-10-19Release

Hosted pricing is outside this migration. uv_build is a separate backend package.

Python downloads and caches

0.13.0 changes default stable Python downloads from 3.14 to 3.15. Suitable installed interpreters can still be reused; clean CI may download the newer default. Preserve an intentional older runtime with uv python pin 3.14 for projects or uv venv --python 3.14. Cache-format changes can cause rebuilding/downloading; different uv versions can share the cache. Do not clear it preemptively. 0.13.0 notes, checked 2026-10-20.

Hash enforcement from nested constraints

--require-hashes inside constraints included through -c was previously ignored. It now applies to installation. Supply missing hashes and rerun the existing uv pip install -r requirements.txt job. Remove the directive only if hash checking was never intended; do not bypass a security policy. Zanie Blue's change #22275 confirms the cause; reviewers discuss how nested includes obscure the directive's origin (checked 2026-10-20). Full diagnostic text is unverified.

Editable constraints are rejected

Editable requirements in included constraints are no longer silently discarded. Move them to a requirements file passed with -r, or pass --editable directly. After removing the editable from constraints, an illustrative command is:

uv pip install -r requirements.txt --editable ./local-package

Do not delete a dependency merely to pass parsing. Change #22282, checked 2026-10-20, confirms rejection; the release documents replacements. Full error text is unverified.

Requirement-file paths are single values

The historical exact message “error: File not found: constraints” appears in henryiii's issue #12639: a filename containing spaces was split. That is fixed. Conversely, an old quoted list now names one file. Replace it with repeated options:

uv pip install -r requirements.txt -c a.txt -c b.txt

This applies to --constraint, --override, --exclude and --build-constraint; corresponding space-separated environment-variable lists remain supported. Keep quotes around actual filenames containing spaces. Fix #22290, checked 2026-10-20. Post-upgrade diagnostic text is unverified.

Build clearing is guarded

uv build --clear rejects an output directory containing a build source, including symlink equivalents. Choose a separate output directory or omit --clear and run uv build. Do not manually delete source to bypass the guard. Change #22276, checked 2026-10-20; exact rejection text is unverified.

Lockfiles, workspaces and resolution

0.13.2 broadens uv workspace metadata to all installed packages, including ones outside the selected resolution. Consumers must distinguish installed inventory from selected dependencies. It exports supported environment restrictions into pylock.toml and honors them on install/sync, alongside resolver/marker performance work. 0.13.2 notes, checked 2026-10-20.

0.13.3 addresses severe export slowdowns in graphs with extras; no speedup was measured here. 0.13.3 notes, checked 2026-10-20.

The reviewed notes do not announce a mandatory uv.lock format migration. Retain the lockfile and review diffs. --locked checks freshness; --frozen skips that check. Use locked mode as the upgrade gate. Locking docs, checked 2026-10-20.

Ordered upgrade

1. Record uv --version, install method and Python pin. Preserve the lockfile; inspect nested constraints. 2. Upgrade through the original install method. The installation guide documents these alternatives (checked 2026-10-20); choose only the matching one:

# Standalone
uv self update
# pip installation
pip install --upgrade uv
# Confirm the result
uv --version

As of November 2026, the checked target is 0.13.9. Update CI's existing version pin. Self-update is disabled for other install methods. 3. Pin Python and apply the constraints fixes. For backend users, the release's example bound is uv_build>=0.13.0,<0.14; leave other backends alone. 4. Run uv lock --check, then uv sync --locked. If an intentional manifest edit needs relocking, run uv lock, review the diff and repeat locked sync. Run existing tests. 5. Test cold/warm CI, deployed workspace members, editables, extras/groups and actual exports. Verify pylock environment restrictions survive export/install and downstream inventory tolerates broader metadata.

Recommendation by constraint and tests

ConstraintGate
Same clean-CI runtimeExplicit Python pin and printed interpreter version
Hash-enforced installsNested includes audited; missing-hash negative case fails
Workspace automationInstalled inventory checked separately from resolution
Slow exports with extrasEvaluate 0.13.3 on the real graph; check reproducibility

What the community says

  • henryiii's constraint-filename report, closed through #22290, supplies the concrete historical failure above.
  • Weidav's script-lock report #18312 describes local editable metadata leaving a script lock stale while project locking refreshed it. Closed through a separate fix, it motivates independent script/project checks; it does not establish an unresolved 0.13 regression.

A prompt to give your agent

Read the linked official releases, installation guide and locking docs before proposing commands; do not guess removed flags or exact diagnostics. Inventory install method, Python pin, constraints, workspace consumers and exports. Retain the lockfile, show diffs and test locked sync plus actual exports. Separate verified behavior from unverified messages.

Mistakes and Limits

Do not delete uv.lock, use frozen mode to hide drift or bypass hashes. No removed CLI flag was established in the reviewed 0.13 notes. Other changes include native Windows ARM64 interpreter preference, stricter tar handling and omission of the distutils startup patch on newer Python; platform/archive migration is untested. No uv commands, installs, resolutions, exports or benchmarks were run. Full missing-hash, editable-constraint, build-clear and post-upgrade missing-path strings are unverified. Community reports are historical; direct 0.13 adoption evidence is thin. Complete published overlap is unverified.

Started from a post by @astral-sh, packaged by the editor. Original post

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# uv 0.12→0.13: how do I migrate constraints and CI?
Summary: As of November 2026, uv 0.13.9 is the current stable release; the 0.13 boundary changes unpinned Python downloads and nested constraints, while patches change workspace inventory and export handling. Pin Python, retain the lockfile and test locked sync; checked 2026-11-24.
Copy for agent
get the whatworks thread uv-012-to-013-python-constraints-lockfile-workspace-upgrade and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread uv-012-to-013-python-constraints-lockfile-workspace-upgrade
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks