diff --git a/crates/uv-settings/src/settings.rs b/crates/uv-settings/src/settings.rs index 7169f32d2..8f8ca022b 100644 --- a/crates/uv-settings/src/settings.rs +++ b/crates/uv-settings/src/settings.rs @@ -803,11 +803,14 @@ pub struct ResolverInstallerSchema { "# )] pub extra_build_variables: Option, - /// Limit candidate packages to those that were uploaded prior to a given point in time. + /// Limit candidate packages to those that were uploaded prior to the given date. /// - /// 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. + /// Accepts RFC 3339 timestamps (e.g., `2006-12-02T02:07:43Z`), a "friendly" duration (e.g., + /// `24 hours`, `1 week`, `30 days`), or an ISO 8601 duration (e.g., `PT24H`, `P7D`, `P30D`). + /// + /// Durations do not respect semantics of the local time zone and are always resolved to a fixed + /// number of seconds assuming that a day is 24 hours (e.g., DST transitions are ignored). + /// Calendar units such as months and years are not allowed. #[option( default = "None", value_type = "str", @@ -816,9 +819,16 @@ pub struct ResolverInstallerSchema { "# )] pub exclude_newer: Option, - /// Limit candidate packages for specific packages to those that were uploaded prior to the given date. + /// Limit candidate packages for specific packages to those that were uploaded prior to the + /// given date. /// - /// Accepts package-date pairs in a dictionary format. + /// Accepts a dictionary format of `PACKAGE = "DATE"` pairs, where `DATE` is an RFC 3339 + /// timestamp (e.g., `2006-12-02T02:07:43Z`), a "friendly" duration (e.g., `24 hours`, `1 week`, + /// `30 days`), or a ISO 8601 duration (e.g., `PT24H`, `P7D`, `P30D`). + /// + /// Durations do not respect semantics of the local time zone and are always resolved to a fixed + /// number of seconds assuming that a day is 24 hours (e.g., DST transitions are ignored). + /// Calendar units such as months and years are not allowed. #[option( default = "None", value_type = "dict", diff --git a/uv.schema.json b/uv.schema.json index bcabfdfd1..c76c7ca01 100644 --- a/uv.schema.json +++ b/uv.schema.json @@ -214,7 +214,7 @@ } }, "exclude-newer": { - "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.,\n`2006-12-02T02:07:43Z`). A full timestamp is required to ensure that the resolver will\nbehave consistently across timezones.", + "description": "Limit candidate packages to those that were uploaded prior to the given date.\n\nAccepts RFC 3339 timestamps (e.g., `2006-12-02T02:07:43Z`), a \"friendly\" duration (e.g.,\n`24 hours`, `1 week`, `30 days`), or an ISO 8601 duration (e.g., `PT24H`, `P7D`, `P30D`).\n\nDurations do not respect semantics of the local time zone and are always resolved to a fixed\nnumber of seconds assuming that a day is 24 hours (e.g., DST transitions are ignored).\nCalendar units such as months and years are not allowed.", "anyOf": [ { "$ref": "#/definitions/ExcludeNewerTimestamp" @@ -225,7 +225,7 @@ ] }, "exclude-newer-package": { - "description": "Limit candidate packages for specific packages to those that were uploaded prior to the given date.\n\nAccepts package-date pairs in a dictionary format.", + "description": "Limit candidate packages for specific packages to those that were uploaded prior to the\ngiven date.\n\nAccepts a dictionary format of `PACKAGE = \"DATE\"` pairs, where `DATE` is an RFC 3339\ntimestamp (e.g., `2006-12-02T02:07:43Z`), a \"friendly\" duration (e.g., `24 hours`, `1 week`,\n`30 days`), or a ISO 8601 duration (e.g., `PT24H`, `P7D`, `P30D`).\n\nDurations do not respect semantics of the local time zone and are always resolved to a fixed\nnumber of seconds assuming that a day is 24 hours (e.g., DST transitions are ignored).\nCalendar units such as months and years are not allowed.", "anyOf": [ { "$ref": "#/definitions/ExcludeNewerPackage"