Skip to content

Add dry-run and JSON output to uv upgrade - #20592

Draft
zsol wants to merge 2 commits into
zsol/upgrade-04-workspacesfrom
zsol/upgrade-05-output
Draft

zsol wants to merge 2 commits into
zsol/upgrade-04-workspacesfrom
zsol/upgrade-05-output

Conversation

@zsol

@zsol zsol commented Jul 21, 2026

Copy link
Copy Markdown
Member

uv upgrade currently writes changed requirements immediately and only reports text output. That makes it difficult to preview an upgrade or consume its result programmatically.

This adds --dry-run and preview --output-format json. The report identifies each declaration and workspace member, its location, resolved versions, changed/unchanged/blocked/skipped status, and the applicable reason. Lock changes are limited to packages with an applicable declaration. Dry runs leave pyproject.toml, the lockfile, and the environment unchanged.

URL credentials and query parameters are redacted from warnings and JSON output. Mixed outcomes update safe declarations where possible, while an unrepresentable requirement prevents writes that would leave the manifest inconsistent with the resolution.

@zsol
zsol force-pushed the zsol/upgrade-05-output branch from b25f954 to 3f37c59 Compare July 28, 2026 12:10
@zsol
zsol temporarily deployed to automations July 28, 2026 12:11 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
automations — 3f37c592 Deployed Jul 28, 2026 by zsol via review / security review #43523
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.

1 participant