Summary
(I've tried searching for a similar issue, and read the original issue for dependency cooldown. Didn't see a discussion of this.)
Setting a cooldown in pyproject.toml, like 1 week for instance, also writes a timestamp into uv.lock. When upgrading a package, the timestamp gets updated.
The problem comes with larger teams working on the same code base, in multiple branches. If a package is updated in one branch, and a different package is upgraded in a separate branch, you have a merge conflict, since they both write (different) timestamps.
If uv only wrote the span in the lock file, that would avoid merge conflicts.
Example:
git switch -c exclude-newer-base
# add exclude-newer = "1 week" to pyproject.toml
uv lock
git add -u && git commit -m "add exclude-newer cooldown"
git switch -c exclude-newer-1
uv lock -P ruff && git add -u && git commit -m "upgrade ruff"
git switch exclude-newer-base
git switch -c exclude-newer-2
uv lock -P ruff && git add -u && git commit -m "upgrade ruff"
git switch exclude-newer-base
git merge exclude-newer-1 # fast-forward
git merge exclude-newer-2 # merge conflict in uv.lock
Summary
(I've tried searching for a similar issue, and read the original issue for dependency cooldown. Didn't see a discussion of this.)
Setting a cooldown in
pyproject.toml, like1 weekfor instance, also writes a timestamp intouv.lock. When upgrading a package, the timestamp gets updated.The problem comes with larger teams working on the same code base, in multiple branches. If a package is updated in one branch, and a different package is upgraded in a separate branch, you have a merge conflict, since they both write (different) timestamps.
If
uvonly wrote the span in the lock file, that would avoid merge conflicts.Example: