Skip to content

uv sync rewrites python/uv.lock with metadata-only diffs on uv 0.9.x #227

@terasakisatoshi

Description

@terasakisatoshi

uv sync rewrites python/uv.lock with metadata-only diffs on newer uv releases

Summary

Running uv sync --offline in python/ can rewrite python/uv.lock even when the environment is already up to date and no dependency set has changed.

In my local reproduction with uv 0.9.10, the diff is metadata-only:

  • revision = 1 becomes revision = 3
  • package entries gain upload-time = ... fields
  • the resolved package set does not materially change

This creates noisy contributor churn in a tracked lockfile from a routine setup command.

Reproduction steps

  1. Use uv 0.9.10.

    uv --version
  2. Start from a clean checkout where python/uv.lock matches the repository.

  3. Run the documented setup command:

    cd python
    uv sync --offline
  4. Check the diff:

    cd ..
    git diff -- python/uv.lock
  5. Observe that python/uv.lock is rewritten with format/metadata changes such as revision = 3 and upload-time fields, despite no intentional dependency update.

Expected behavior

Routine contributor setup with uv sync should not rewrite python/uv.lock unless dependencies or the intended lockfile format for the repo have actually changed.

Actual behavior

uv sync introduces a large lockfile diff consisting of metadata-only changes.

Notes

Observed locally on:

  • uv 0.9.10 (44f5a14f4 2025-11-17)

This is especially noticeable because the Python setup path in the repo documentation points contributors at uv sync.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions