From d178d97a40183c04b608eabd454e398f6461fbb9 Mon Sep 17 00:00:00 2001 From: konsti Date: Thu, 4 Jul 2024 14:27:02 +0200 Subject: [PATCH] Document the `RequiresPython` fields (#4798) --- crates/uv-resolver/src/requires_python.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/uv-resolver/src/requires_python.rs b/crates/uv-resolver/src/requires_python.rs index 43a861b20..25d3c1f15 100644 --- a/crates/uv-resolver/src/requires_python.rs +++ b/crates/uv-resolver/src/requires_python.rs @@ -25,7 +25,14 @@ pub enum RequiresPythonError { /// See: #[derive(Debug, Clone, Eq, PartialEq, Hash)] pub struct RequiresPython { + /// The supported Python versions as provides by the user, usually through the `requires-python` + /// field in `pyproject.toml`. + /// + /// For a workspace, it's the union of all `requires-python` fields in the workspace. If no + /// bound was provided by the user, it's greater equal the current Python version. specifiers: VersionSpecifiers, + /// The lower bound from the `specifiers` field, i.e. greater or greater equal the lowest + /// version allowed by `specifiers`. bound: RequiresPythonBound, }