Skip to content

Warning when using date-only format for exclude-newer #13704

@johnthagen

Description

@johnthagen

Summary

The exclude-newer docs say

Accepts both RFC 3339 timestamps (e.g., 2006-12-02T02:07:43Z) and local dates in the same format (e.g., 2006-12-02) in your system's configured time zone.

But using the more concise/simpler date format:

[tool.uv]
exclude-newer = "2025-04-01"

Results in a warning being printed on every usage:

$ uv sync
warning: Failed to parse `pyproject.toml` during settings discovery:
  TOML parse error at line 18, column 17
     |
  18 | exclude-newer = "2025-04-01"
     |                 ^^^^^^^^^^^^
  failed to find time component in "2025-04-01", which is required for parsing a timestamp

The short version is simpler, more concise, and much easier for a human to type manually. The docs say that it is supported, so I suggest that a warning should not be printed.

Platform

macOS 15 arm64

Version

uv 0.7.8 (0ddcc19 2025-05-23)

Python version

3.11.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions