Skip to content

No-op timestamp for exclude-newer-package with spansΒ #19089

Closed

Description

@kdeldycke

Summary

I just discovered #19022 while subscribed to #18708, and it looks like a great improvement to eliminate timestamp noise.

In the same spirit of this workaround, I just wonder if we could use the sane no-op flag for [options.exclude-newer-package].

See how a package configured with a relative span (like 0 day), the lockfile records the a full timestamp:

[options]
exclude-newer = "0001-01-01T00:00:00Z" # no-op placeholder (fixed by #19022)
exclude-newer-span = "P1W"

[options.exclude-newer-package]
mypackage = { timestamp = "2026-04-21T14:32:07.819274Z", span = "PT0S" }  # still changes every run

So currently every uv lock invokation update the timestamp.

Example

Configuration in pyproject.toml:

[tool.uv]
exclude-newer = "1 week"
exclude-newer-package = { mypackage = "0 day" }

Running uv lock twice in quick succession produces a diff:

 [options.exclude-newer-package]
-mypackage = { timestamp = "2026-04-21T14:32:07.819274Z", span = "PT0S" }
+mypackage = { timestamp = "2026-04-21T14:32:09.123456Z", span = "PT0S" }

My proposal is to reuse the same no-op placeholder when a span is present:

[options.exclude-newer-package]
mypackage = { timestamp = "0001-01-01T00:00:00Z", span = "PT0S" }

This would make the lockfile fully stable across runs.

Activity

  1. added
    enhancementNew feature or improvement to existing functionality
    on Apr 21, 2026
  2. added
    great writeupA wonderful example of a quality contribution πŸ’œ
    on Apr 21, 2026
  3. zanieb commented on Apr 21, 2026

    @zanieb
    Member

    Yep, that's just an oversight. Thanks!

  4. added a commit that references this issue on Apr 21, 2026
    c875b02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement to existing functionalitygreat writeupA wonderful example of a quality contribution πŸ’œ

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions