Skip to content

uv lock sometimes changes the lock file when run for a second time #6063

@BurntSushi

Description

@BurntSushi

I believe it is true that this should never happen. To reproduce, create a pyproject.toml with:

[project]
name = "uv-lock-instability"
version = "0.1.0"
description = "whatever"
requires-python = ">=3.9.0"
dependencies = [
    "jax==0.4.17",
]

And now do a lock followed by another lock:

$ rm -f *.lock
$ cargo r --manifest-path ~/astral/uv/Cargo.toml -p uv -- lock
$ cp uv.lock before.lock
$ cargo r --manifest-path ~/astral/uv/Cargo.toml -p uv -- lock
$ cp uv.lock after.lock
$ diff before.lock after.lock
15c15
<     { name = "zipp" },
---
>     { name = "zipp", marker = "python_version < '3.10'" },

The diff output at the end should be empty, but it isn't.

Running the same steps in the ecosystem/transformers directory produces a larger diff (and this MRE was minimized from that).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions