From 54b9e8ff82587153e204325dde5a36f7ba96b02c Mon Sep 17 00:00:00 2001 From: Trevor Manz Date: Mon, 6 Jan 2025 10:03:21 -0500 Subject: [PATCH] Clarify exclude-newer only allows full timestamps in settings docs (#9135) ## Summary Follow up to #8553 Clarifies that the `exclude-newer` setting must be a full timestamp and not a date. ## Test Plan N/A --- crates/uv-settings/src/settings.rs | 10 +++++----- docs/reference/settings.md | 12 ++++++------ uv.schema.json | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/crates/uv-settings/src/settings.rs b/crates/uv-settings/src/settings.rs index bf9815e7f..6f645ebc6 100644 --- a/crates/uv-settings/src/settings.rs +++ b/crates/uv-settings/src/settings.rs @@ -1276,16 +1276,16 @@ pub struct PipOptions { "# )] pub universal: Option, - /// Limit candidate packages to those that were uploaded prior to the given date. + /// Limit candidate packages to those that were uploaded prior to a given point in time. /// - /// Accepts both [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html) 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. + /// Accepts a superset of [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html) (e.g., + /// `2006-12-02T02:07:43Z`). A full timestamp is required to ensure that the resolver will + /// behave consistently across timezones. #[option( default = "None", value_type = "str", example = r#" - exclude-newer = "2006-12-02" + exclude-newer = "2006-12-02T02:07:43Z" "# )] pub exclude_newer: Option, diff --git a/docs/reference/settings.md b/docs/reference/settings.md index e8a142900..f401eef33 100644 --- a/docs/reference/settings.md +++ b/docs/reference/settings.md @@ -2055,11 +2055,11 @@ be correct. #### [`exclude-newer`](#pip_exclude-newer) {: #pip_exclude-newer } -Limit candidate packages to those that were uploaded prior to the given date. +Limit candidate packages to those that were uploaded prior to a given point in time. -Accepts both [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html) 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. +Accepts a superset of [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html) (e.g., +`2006-12-02T02:07:43Z`). A full timestamp is required to ensure that the resolver will +behave consistently across timezones. **Default value**: `None` @@ -2071,13 +2071,13 @@ system's configured time zone. ```toml [tool.uv.pip] - exclude-newer = "2006-12-02" + exclude-newer = "2006-12-02T02:07:43Z" ``` === "uv.toml" ```toml [pip] - exclude-newer = "2006-12-02" + exclude-newer = "2006-12-02T02:07:43Z" ``` --- diff --git a/uv.schema.json b/uv.schema.json index fcba78967..5304a2a6f 100644 --- a/uv.schema.json +++ b/uv.schema.json @@ -960,7 +960,7 @@ ] }, "exclude-newer": { - "description": "Limit candidate packages to those that were uploaded prior to the given date.\n\nAccepts both [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html) 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.", + "description": "Limit candidate packages to those that were uploaded prior to a given point in time.\n\nAccepts a superset of [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html) (e.g., `2006-12-02T02:07:43Z`). A full timestamp is required to ensure that the resolver will behave consistently across timezones.", "anyOf": [ { "$ref": "#/definitions/ExcludeNewer"