From dbca9b0a46bed9b69426c3f1e7ba45a8d647b98d Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Tue, 11 Jun 2024 09:57:10 -0400 Subject: [PATCH 1/4] uv-resolver: use Requires-Python to filter dependencies during universal resolution In the time before universal resolving, we would always pass a `MarkerEnvironment`, and this environment would capture any relevant `Requires-Python` specifier (including if `-p/--python` was provided on the CLI). But in universal resolution, we very specifically do not use a `MarkerEnvironment` because we want to produce a resolution that is compatible across potentially multiple environments. This in turn meant that we lost `Requires-Python` filtering. This PR adds it back. We do this by converting our `PythonRequirement` into a `MarkerTree` that encodes the version specifiers in a `Requires-Python` specifier. We then ask whether that `MarkerTree` is disjoint with a dependency specification's `MarkerTree`. If it is, then we know it's impossible for that dependency specification to every be true, and we can completely ignore it. --- .../uv-resolver/src/pubgrub/dependencies.rs | 35 +- crates/uv-resolver/src/python_requirement.rs | 6 + crates/uv-resolver/src/requires_python.rs | 63 +++- crates/uv-resolver/src/resolver/mod.rs | 22 ++ crates/uv/tests/edit.rs | 92 +---- crates/uv/tests/lock.rs | 337 +----------------- crates/uv/tests/run.rs | 6 +- crates/uv/tests/workspace.rs | 8 +- 8 files changed, 147 insertions(+), 422 deletions(-) diff --git a/crates/uv-resolver/src/pubgrub/dependencies.rs b/crates/uv-resolver/src/pubgrub/dependencies.rs index 475c8d1924f1..e01f73d8f785 100644 --- a/crates/uv-resolver/src/pubgrub/dependencies.rs +++ b/crates/uv-resolver/src/pubgrub/dependencies.rs @@ -8,7 +8,7 @@ use tracing::warn; use distribution_types::Verbatim; use pep440_rs::Version; -use pep508_rs::MarkerEnvironment; +use pep508_rs::{MarkerEnvironment, MarkerTree}; use pypi_types::{ ParsedArchiveUrl, ParsedGitUrl, ParsedPathUrl, ParsedUrl, Requirement, RequirementSource, }; @@ -39,6 +39,7 @@ impl PubGrubDependencies { locals: &Locals, git: &GitResolver, env: Option<&MarkerEnvironment>, + requires_python: Option<&MarkerTree>, ) -> Result { let mut dependencies = Vec::default(); let mut seen = FxHashSet::default(); @@ -55,6 +56,7 @@ impl PubGrubDependencies { locals, git, env, + requires_python, &mut dependencies, &mut seen, )?; @@ -87,6 +89,7 @@ fn add_requirements( locals: &Locals, git: &GitResolver, env: Option<&MarkerEnvironment>, + requires_python: Option<&MarkerTree>, dependencies: &mut Vec<(PubGrubPackage, Range)>, seen: &mut FxHashSet, ) -> Result<(), ResolveError> { @@ -96,6 +99,11 @@ fn add_requirements( } else { Either::Right(requirements.iter()) }) { + // If the requirement would not be selected with any Python version + // supported by the root, skip it. + if !satisfies_requires_python(requires_python, requirement) { + continue; + } // If the requirement isn't relevant for the current platform, skip it. match source_extra { Some(source_extra) => { @@ -157,6 +165,7 @@ fn add_requirements( locals, git, env, + requires_python, dependencies, seen, )?; @@ -170,6 +179,11 @@ fn add_requirements( // If the requirement was constrained, add those constraints. for constraint in constraints.get(&requirement.name).into_iter().flatten() { + // If the requirement would not be selected with any Python + // version supported by the root, skip it. + if !satisfies_requires_python(requires_python, constraint) { + continue; + } // If the requirement isn't relevant for the current platform, skip it. match source_extra { Some(source_extra) => { @@ -381,3 +395,22 @@ impl PubGrubRequirement { Self::from_requirement(constraint, None, urls, locals, git) } } + +/// Returns true if and only if the given requirement's marker expression has a +/// possible true value given the `requires_python` specifier given. +/// +/// While this is always called, a `requires_python` is only non-None when in +/// universal resolution mode. In non-universal mode, `requires_python` is +/// `None` and this always returns `true`. +fn satisfies_requires_python( + requires_python: Option<&MarkerTree>, + requirement: &Requirement, +) -> bool { + let Some(requires_python) = requires_python else { + return true; + }; + let Some(marker) = requirement.marker.as_ref() else { + return true; + }; + !crate::marker::is_disjoint(requires_python, marker) +} diff --git a/crates/uv-resolver/src/python_requirement.rs b/crates/uv-resolver/src/python_requirement.rs index a2f58efa4216..153c4ec35f84 100644 --- a/crates/uv-resolver/src/python_requirement.rs +++ b/crates/uv-resolver/src/python_requirement.rs @@ -58,6 +58,12 @@ impl PythonRequirement { pub fn target(&self) -> Option<&PythonTarget> { self.target.as_ref() } + + /// Return the target version of Python as a "requires python" type, + /// if available. + pub(crate) fn requires_python(&self) -> Option<&RequiresPython> { + self.target().and_then(|target| target.as_requires_python()) + } } #[derive(Debug, Clone, Eq, PartialEq)] diff --git a/crates/uv-resolver/src/requires_python.rs b/crates/uv-resolver/src/requires_python.rs index 17f99f808146..48a4588babe0 100644 --- a/crates/uv-resolver/src/requires_python.rs +++ b/crates/uv-resolver/src/requires_python.rs @@ -3,7 +3,8 @@ use std::collections::Bound; use itertools::Itertools; use pubgrub::range::Range; -use pep440_rs::{Version, VersionSpecifier, VersionSpecifiers}; +use pep440_rs::{Operator, Version, VersionSpecifier, VersionSpecifiers}; +use pep508_rs::{MarkerExpression, MarkerTree, MarkerValueVersion}; #[derive(thiserror::Error, Debug)] pub enum RequiresPythonError { @@ -169,6 +170,66 @@ impl RequiresPython { pub fn bound(&self) -> &Bound { &self.bound } + + /// Returns this `Requires-Python` specifier as an equivalent marker + /// expression utilizing the `python_version` marker field. + /// + /// This is useful for comparing a `Requires-Python` specifier with + /// arbitrary marker expressions. For example, one can ask whether the + /// returned marker expression is disjoint with another marker expression. + /// If it is, then one can conclude that the `Requires-Python` specifier + /// excludes the dependency with that other marker expression. + /// + /// If this `Requires-Python` specifier has no constraints, then this + /// returns a marker tree that evaluates to `true` for all possible marker + /// environments. + pub fn to_marker_tree(&self) -> MarkerTree { + let (op, version) = match self.bound { + // If we see this anywhere, then it implies the marker + // tree we would generate would always evaluate to + // `true` because every possible Python version would + // satisfy it. + Bound::Unbounded => return MarkerTree::And(vec![]), + Bound::Excluded(ref version) => { + (Operator::GreaterThan, version.clone().without_local()) + } + Bound::Included(ref version) => { + (Operator::GreaterThanEqual, version.clone().without_local()) + } + }; + // For the `python_version` marker expression, it specifically only + // supports truncate major/minor versions of Python. This means that + // a `Requires-Python: 3.10.1` is satisfied by `python_version == + // '3.10'`. So for disjointness checking, we need to ensure that the + // marker expression we generate for `Requires-Python` doesn't try to + // be overly selective about the patch version. We do this by keeping + // this part of our marker limited to the major and minor version + // components only. + let version_major_minor_only = Version::new(version.release().iter().take(2)); + let expr_python_version = MarkerExpression::Version { + key: MarkerValueVersion::PythonVersion, + // OK because a version specifier is only invalid when the + // version is local (which is impossible here because we + // strip it above) or if the operator is ~= (which is also + // impossible here). + specifier: VersionSpecifier::from_version(op, version_major_minor_only).unwrap(), + }; + let expr_python_full_version = MarkerExpression::Version { + key: MarkerValueVersion::PythonFullVersion, + // For `python_full_version`, we can use the entire + // version as-is. + // + // OK because a version specifier is only invalid when the + // version is local (which is impossible here because we + // strip it above) or if the operator is ~= (which is also + // impossible here). + specifier: VersionSpecifier::from_version(op, version).unwrap(), + }; + MarkerTree::And(vec![ + MarkerTree::Expression(expr_python_version), + MarkerTree::Expression(expr_python_full_version), + ]) + } } impl std::fmt::Display for RequiresPython { diff --git a/crates/uv-resolver/src/resolver/mod.rs b/crates/uv-resolver/src/resolver/mod.rs index 78a455342cfe..a73830d4d306 100644 --- a/crates/uv-resolver/src/resolver/mod.rs +++ b/crates/uv-resolver/src/resolver/mod.rs @@ -47,6 +47,7 @@ use crate::pubgrub::{ PubGrubPriorities, PubGrubPython, PubGrubSpecifier, }; use crate::python_requirement::PythonRequirement; +use crate::requires_python::RequiresPython; use crate::resolution::ResolutionGraph; pub(crate) use crate::resolver::availability::{ IncompletePackage, ResolverVersion, UnavailablePackage, UnavailableReason, UnavailableVersion, @@ -94,6 +95,14 @@ struct ResolverState { /// When not set, the resolver is in "universal" mode. markers: Option, python_requirement: PythonRequirement, + /// This is derived from `PythonRequirement` once at initialization + /// time. It's used in universal mode to filter our dependencies with + /// a `python_version` marker expression that has no overlap with the + /// `Requires-Python` specifier. + /// + /// This is non-None if and only if the resolver is operating in + /// universal mode. (i.e., when `markers` is `None`.) + requires_python: Option, selector: CandidateSelector, index: InMemoryIndex, installed_packages: InstalledPackages, @@ -181,6 +190,16 @@ impl provider: Provider, installed_packages: InstalledPackages, ) -> Result { + let requires_python = if markers.is_some() { + None + } else { + Some( + python_requirement + .requires_python() + .map(RequiresPython::to_marker_tree) + .unwrap_or_else(|| MarkerTree::And(vec![])), + ) + }; let state = ResolverState { index: index.clone(), git: git.clone(), @@ -200,6 +219,7 @@ impl hasher: hasher.clone(), markers: markers.cloned(), python_requirement: python_requirement.clone(), + requires_python, reporter: None, installed_packages, }; @@ -959,6 +979,7 @@ impl ResolverState ResolverState Result<()> { ----- stderr ----- warning: `uv add` is experimental and may change without warning. - Resolved 6 packages in [TIME] + Resolved 4 packages in [TIME] Downloaded 4 packages in [TIME] Installed 4 packages in [TIME] + anyio==3.7.0 @@ -76,12 +76,6 @@ fn add_registry() -> Result<()> { sdist = { url = "https://files.pythonhosted.org/packages/c6/b3/fefbf7e78ab3b805dec67d698dc18dd505af7a18a8dd08868c9b4fa736b5/anyio-3.7.0.tar.gz", hash = "sha256:275d9973793619a5374e1c89a4f4ad3f4b0a5510a2b5b939444bee8f4c4d37ce", size = 142737 } wheels = [{ url = "https://files.pythonhosted.org/packages/68/fe/7ce1926952c8a403b35029e194555558514b365ad77d75125f521a2bec62/anyio-3.7.0-py3-none-any.whl", hash = "sha256:eddca883c4175f14df8aedce21054bfca3adb70ffe76a9f607aef9d7fa2ea7f0", size = 80873 }] - [[distribution.dependencies]] - name = "exceptiongroup" - version = "1.2.1" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.11'" - [[distribution.dependencies]] name = "idna" version = "3.7" @@ -92,19 +86,6 @@ fn add_registry() -> Result<()> { version = "1.3.1" source = "registry+https://pypi.org/simple" - [[distribution.dependencies]] - name = "typing-extensions" - version = "4.12.2" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.8'" - - [[distribution]] - name = "exceptiongroup" - version = "1.2.1" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/a0/65/d66b7fbaef021b3c954b3bbb196d21d8a4b97918ea524f82cfae474215af/exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16", size = 28717 } - wheels = [{ url = "https://files.pythonhosted.org/packages/01/90/79fe92dd413a9cab314ef5c591b5aa9b9ba787ae4cadab75055b0ae00b33/exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad", size = 16458 }] - [[distribution]] name = "idna" version = "3.7" @@ -129,13 +110,6 @@ fn add_registry() -> Result<()> { source = "registry+https://pypi.org/simple" sdist = { url = "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc", size = 20372 } wheels = [{ url = "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", size = 10235 }] - - [[distribution]] - name = "typing-extensions" - version = "4.12.2" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8", size = 85321 } - wheels = [{ url = "https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", size = 37438 }] "### ); }); @@ -175,7 +149,7 @@ fn add_git() -> Result<()> { ----- stderr ----- warning: `uv lock` is experimental and may change without warning. - Resolved 6 packages in [TIME] + Resolved 4 packages in [TIME] "###); uv_snapshot!(context.filters(), context.sync(), @r###" @@ -200,7 +174,7 @@ fn add_git() -> Result<()> { ----- stderr ----- warning: `uv add` is experimental and may change without warning. - Resolved 7 packages in [TIME] + Resolved 5 packages in [TIME] Downloaded 2 packages in [TIME] Uninstalled 1 package in [TIME] Installed 2 packages in [TIME] @@ -245,12 +219,6 @@ fn add_git() -> Result<()> { sdist = { url = "https://files.pythonhosted.org/packages/c6/b3/fefbf7e78ab3b805dec67d698dc18dd505af7a18a8dd08868c9b4fa736b5/anyio-3.7.0.tar.gz", hash = "sha256:275d9973793619a5374e1c89a4f4ad3f4b0a5510a2b5b939444bee8f4c4d37ce", size = 142737 } wheels = [{ url = "https://files.pythonhosted.org/packages/68/fe/7ce1926952c8a403b35029e194555558514b365ad77d75125f521a2bec62/anyio-3.7.0-py3-none-any.whl", hash = "sha256:eddca883c4175f14df8aedce21054bfca3adb70ffe76a9f607aef9d7fa2ea7f0", size = 80873 }] - [[distribution.dependencies]] - name = "exceptiongroup" - version = "1.2.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.11'" - [[distribution.dependencies]] name = "idna" version = "3.6" @@ -261,19 +229,6 @@ fn add_git() -> Result<()> { version = "1.3.1" source = "registry+https://pypi.org/simple" - [[distribution.dependencies]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.8'" - - [[distribution]] - name = "exceptiongroup" - version = "1.2.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/8e/1c/beef724eaf5b01bb44b6338c8c3494eff7cab376fab4904cfbbc3585dc79/exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68", size = 26264 } - wheels = [{ url = "https://files.pythonhosted.org/packages/b8/9a/5028fd52db10e600f1c4674441b968cf2ea4959085bfb5b99fb1250e5f68/exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14", size = 16210 }] - [[distribution]] name = "idna" version = "3.6" @@ -304,13 +259,6 @@ fn add_git() -> Result<()> { sdist = { url = "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc", size = 20372 } wheels = [{ url = "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", size = 10235 }] - [[distribution]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/16/3a/0d26ce356c7465a19c9ea8814b960f8a36c3b0d07c323176620b7b483e44/typing_extensions-4.10.0.tar.gz", hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb", size = 77558 } - wheels = [{ url = "https://files.pythonhosted.org/packages/f9/de/dc04a3ea60b22624b51c703a84bbe0184abcd1d0b9bc8074b5d6b7ab90bb/typing_extensions-4.10.0-py3-none-any.whl", hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475", size = 33926 }] - [[distribution]] name = "uv-public-pypackage" version = "0.1.0" @@ -358,7 +306,7 @@ fn update_registry() -> Result<()> { ----- stderr ----- warning: `uv lock` is experimental and may change without warning. - Resolved 10 packages in [TIME] + Resolved 4 packages in [TIME] "###); uv_snapshot!(context.filters(), context.sync(), @r###" @@ -383,7 +331,7 @@ fn update_registry() -> Result<()> { ----- stderr ----- warning: `uv add` is experimental and may change without warning. - Resolved 6 packages in [TIME] + Resolved 4 packages in [TIME] Downloaded 2 packages in [TIME] Uninstalled 2 packages in [TIME] Installed 2 packages in [TIME] @@ -428,12 +376,6 @@ fn update_registry() -> Result<()> { sdist = { url = "https://files.pythonhosted.org/packages/db/4d/3970183622f0330d3c23d9b8a5f52e365e50381fd484d08e3285104333d3/anyio-4.3.0.tar.gz", hash = "sha256:f75253795a87df48568485fd18cdd2a3fa5c4f7c5be8e5e36637733fce06fed6", size = 159642 } wheels = [{ url = "https://files.pythonhosted.org/packages/14/fd/2f20c40b45e4fb4324834aea24bd4afdf1143390242c0b33774da0e2e34f/anyio-4.3.0-py3-none-any.whl", hash = "sha256:048e05d0f6caeed70d731f3db756d35dcc1f35747c8c403364a8332c630441b8", size = 85584 }] - [[distribution.dependencies]] - name = "exceptiongroup" - version = "1.2.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.11'" - [[distribution.dependencies]] name = "idna" version = "3.6" @@ -444,19 +386,6 @@ fn update_registry() -> Result<()> { version = "1.3.1" source = "registry+https://pypi.org/simple" - [[distribution.dependencies]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.11'" - - [[distribution]] - name = "exceptiongroup" - version = "1.2.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/8e/1c/beef724eaf5b01bb44b6338c8c3494eff7cab376fab4904cfbbc3585dc79/exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68", size = 26264 } - wheels = [{ url = "https://files.pythonhosted.org/packages/b8/9a/5028fd52db10e600f1c4674441b968cf2ea4959085bfb5b99fb1250e5f68/exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14", size = 16210 }] - [[distribution]] name = "idna" version = "3.6" @@ -481,13 +410,6 @@ fn update_registry() -> Result<()> { source = "registry+https://pypi.org/simple" sdist = { url = "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc", size = 20372 } wheels = [{ url = "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", size = 10235 }] - - [[distribution]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/16/3a/0d26ce356c7465a19c9ea8814b960f8a36c3b0d07c323176620b7b483e44/typing_extensions-4.10.0.tar.gz", hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb", size = 77558 } - wheels = [{ url = "https://files.pythonhosted.org/packages/f9/de/dc04a3ea60b22624b51c703a84bbe0184abcd1d0b9bc8074b5d6b7ab90bb/typing_extensions-4.10.0-py3-none-any.whl", hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475", size = 33926 }] "### ); }); @@ -527,7 +449,7 @@ fn remove_registry() -> Result<()> { ----- stderr ----- warning: `uv lock` is experimental and may change without warning. - Resolved 6 packages in [TIME] + Resolved 4 packages in [TIME] "###); uv_snapshot!(context.filters(), context.sync(), @r###" @@ -633,7 +555,7 @@ fn remove_all_registry() -> Result<()> { ----- stderr ----- warning: `uv lock` is experimental and may change without warning. - Resolved 10 packages in [TIME] + Resolved 4 packages in [TIME] "###); uv_snapshot!(context.filters(), context.sync(), @r###" diff --git a/crates/uv/tests/lock.rs b/crates/uv/tests/lock.rs index 85e466053165..a44db3af4649 100644 --- a/crates/uv/tests/lock.rs +++ b/crates/uv/tests/lock.rs @@ -31,7 +31,7 @@ fn lock_wheel_registry() -> Result<()> { ----- stderr ----- warning: `uv lock` is experimental and may change without warning. - Resolved 6 packages in [TIME] + Resolved 4 packages in [TIME] "###); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?; @@ -51,12 +51,6 @@ fn lock_wheel_registry() -> Result<()> { sdist = { url = "https://files.pythonhosted.org/packages/c6/b3/fefbf7e78ab3b805dec67d698dc18dd505af7a18a8dd08868c9b4fa736b5/anyio-3.7.0.tar.gz", hash = "sha256:275d9973793619a5374e1c89a4f4ad3f4b0a5510a2b5b939444bee8f4c4d37ce", size = 142737 } wheels = [{ url = "https://files.pythonhosted.org/packages/68/fe/7ce1926952c8a403b35029e194555558514b365ad77d75125f521a2bec62/anyio-3.7.0-py3-none-any.whl", hash = "sha256:eddca883c4175f14df8aedce21054bfca3adb70ffe76a9f607aef9d7fa2ea7f0", size = 80873 }] - [[distribution.dependencies]] - name = "exceptiongroup" - version = "1.2.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.11'" - [[distribution.dependencies]] name = "idna" version = "3.6" @@ -67,19 +61,6 @@ fn lock_wheel_registry() -> Result<()> { version = "1.3.1" source = "registry+https://pypi.org/simple" - [[distribution.dependencies]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.8'" - - [[distribution]] - name = "exceptiongroup" - version = "1.2.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/8e/1c/beef724eaf5b01bb44b6338c8c3494eff7cab376fab4904cfbbc3585dc79/exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68", size = 26264 } - wheels = [{ url = "https://files.pythonhosted.org/packages/b8/9a/5028fd52db10e600f1c4674441b968cf2ea4959085bfb5b99fb1250e5f68/exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14", size = 16210 }] - [[distribution]] name = "idna" version = "3.6" @@ -104,13 +85,6 @@ fn lock_wheel_registry() -> Result<()> { source = "registry+https://pypi.org/simple" sdist = { url = "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc", size = 20372 } wheels = [{ url = "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", size = 10235 }] - - [[distribution]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/16/3a/0d26ce356c7465a19c9ea8814b960f8a36c3b0d07c323176620b7b483e44/typing_extensions-4.10.0.tar.gz", hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb", size = 77558 } - wheels = [{ url = "https://files.pythonhosted.org/packages/f9/de/dc04a3ea60b22624b51c703a84bbe0184abcd1d0b9bc8074b5d6b7ab90bb/typing_extensions-4.10.0-py3-none-any.whl", hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475", size = 33926 }] "### ); }); @@ -303,7 +277,7 @@ fn lock_wheel_url() -> Result<()> { ----- stderr ----- warning: `uv lock` is experimental and may change without warning. - Resolved 6 packages in [TIME] + Resolved 4 packages in [TIME] "###); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?; @@ -322,12 +296,6 @@ fn lock_wheel_url() -> Result<()> { source = "direct+https://files.pythonhosted.org/packages/14/fd/2f20c40b45e4fb4324834aea24bd4afdf1143390242c0b33774da0e2e34f/anyio-4.3.0-py3-none-any.whl" wheels = [{ url = "https://files.pythonhosted.org/packages/14/fd/2f20c40b45e4fb4324834aea24bd4afdf1143390242c0b33774da0e2e34f/anyio-4.3.0-py3-none-any.whl", hash = "sha256:048e05d0f6caeed70d731f3db756d35dcc1f35747c8c403364a8332c630441b8" }] - [[distribution.dependencies]] - name = "exceptiongroup" - version = "1.2.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.11'" - [[distribution.dependencies]] name = "idna" version = "3.6" @@ -338,19 +306,6 @@ fn lock_wheel_url() -> Result<()> { version = "1.3.1" source = "registry+https://pypi.org/simple" - [[distribution.dependencies]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.11'" - - [[distribution]] - name = "exceptiongroup" - version = "1.2.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/8e/1c/beef724eaf5b01bb44b6338c8c3494eff7cab376fab4904cfbbc3585dc79/exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68", size = 26264 } - wheels = [{ url = "https://files.pythonhosted.org/packages/b8/9a/5028fd52db10e600f1c4674441b968cf2ea4959085bfb5b99fb1250e5f68/exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14", size = 16210 }] - [[distribution]] name = "idna" version = "3.6" @@ -375,13 +330,6 @@ fn lock_wheel_url() -> Result<()> { source = "registry+https://pypi.org/simple" sdist = { url = "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc", size = 20372 } wheels = [{ url = "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", size = 10235 }] - - [[distribution]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/16/3a/0d26ce356c7465a19c9ea8814b960f8a36c3b0d07c323176620b7b483e44/typing_extensions-4.10.0.tar.gz", hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb", size = 77558 } - wheels = [{ url = "https://files.pythonhosted.org/packages/f9/de/dc04a3ea60b22624b51c703a84bbe0184abcd1d0b9bc8074b5d6b7ab90bb/typing_extensions-4.10.0-py3-none-any.whl", hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475", size = 33926 }] "### ); }); @@ -428,7 +376,7 @@ fn lock_sdist_url() -> Result<()> { ----- stderr ----- warning: `uv lock` is experimental and may change without warning. - Resolved 6 packages in [TIME] + Resolved 4 packages in [TIME] "###); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?; @@ -447,12 +395,6 @@ fn lock_sdist_url() -> Result<()> { source = "direct+https://files.pythonhosted.org/packages/db/4d/3970183622f0330d3c23d9b8a5f52e365e50381fd484d08e3285104333d3/anyio-4.3.0.tar.gz" sdist = { url = "https://files.pythonhosted.org/packages/db/4d/3970183622f0330d3c23d9b8a5f52e365e50381fd484d08e3285104333d3/anyio-4.3.0.tar.gz", hash = "sha256:f75253795a87df48568485fd18cdd2a3fa5c4f7c5be8e5e36637733fce06fed6" } - [[distribution.dependencies]] - name = "exceptiongroup" - version = "1.2.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.11'" - [[distribution.dependencies]] name = "idna" version = "3.6" @@ -463,19 +405,6 @@ fn lock_sdist_url() -> Result<()> { version = "1.3.1" source = "registry+https://pypi.org/simple" - [[distribution.dependencies]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.11'" - - [[distribution]] - name = "exceptiongroup" - version = "1.2.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/8e/1c/beef724eaf5b01bb44b6338c8c3494eff7cab376fab4904cfbbc3585dc79/exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68", size = 26264 } - wheels = [{ url = "https://files.pythonhosted.org/packages/b8/9a/5028fd52db10e600f1c4674441b968cf2ea4959085bfb5b99fb1250e5f68/exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14", size = 16210 }] - [[distribution]] name = "idna" version = "3.6" @@ -500,13 +429,6 @@ fn lock_sdist_url() -> Result<()> { source = "registry+https://pypi.org/simple" sdist = { url = "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc", size = 20372 } wheels = [{ url = "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", size = 10235 }] - - [[distribution]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/16/3a/0d26ce356c7465a19c9ea8814b960f8a36c3b0d07c323176620b7b483e44/typing_extensions-4.10.0.tar.gz", hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb", size = 77558 } - wheels = [{ url = "https://files.pythonhosted.org/packages/f9/de/dc04a3ea60b22624b51c703a84bbe0184abcd1d0b9bc8074b5d6b7ab90bb/typing_extensions-4.10.0-py3-none-any.whl", hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475", size = 33926 }] "### ); }); @@ -556,7 +478,7 @@ fn lock_project_extra() -> Result<()> { ----- stderr ----- warning: `uv lock` is experimental and may change without warning. - Resolved 7 packages in [TIME] + Resolved 5 packages in [TIME] "###); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?; @@ -576,12 +498,6 @@ fn lock_project_extra() -> Result<()> { sdist = { url = "https://files.pythonhosted.org/packages/c6/b3/fefbf7e78ab3b805dec67d698dc18dd505af7a18a8dd08868c9b4fa736b5/anyio-3.7.0.tar.gz", hash = "sha256:275d9973793619a5374e1c89a4f4ad3f4b0a5510a2b5b939444bee8f4c4d37ce", size = 142737 } wheels = [{ url = "https://files.pythonhosted.org/packages/68/fe/7ce1926952c8a403b35029e194555558514b365ad77d75125f521a2bec62/anyio-3.7.0-py3-none-any.whl", hash = "sha256:eddca883c4175f14df8aedce21054bfca3adb70ffe76a9f607aef9d7fa2ea7f0", size = 80873 }] - [[distribution.dependencies]] - name = "exceptiongroup" - version = "1.2.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.11'" - [[distribution.dependencies]] name = "idna" version = "3.6" @@ -592,19 +508,6 @@ fn lock_project_extra() -> Result<()> { version = "1.3.1" source = "registry+https://pypi.org/simple" - [[distribution.dependencies]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.8'" - - [[distribution]] - name = "exceptiongroup" - version = "1.2.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/8e/1c/beef724eaf5b01bb44b6338c8c3494eff7cab376fab4904cfbbc3585dc79/exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68", size = 26264 } - wheels = [{ url = "https://files.pythonhosted.org/packages/b8/9a/5028fd52db10e600f1c4674441b968cf2ea4959085bfb5b99fb1250e5f68/exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14", size = 16210 }] - [[distribution]] name = "idna" version = "3.6" @@ -643,13 +546,6 @@ fn lock_project_extra() -> Result<()> { source = "registry+https://pypi.org/simple" sdist = { url = "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc", size = 20372 } wheels = [{ url = "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", size = 10235 }] - - [[distribution]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/16/3a/0d26ce356c7465a19c9ea8814b960f8a36c3b0d07c323176620b7b483e44/typing_extensions-4.10.0.tar.gz", hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb", size = 77558 } - wheels = [{ url = "https://files.pythonhosted.org/packages/f9/de/dc04a3ea60b22624b51c703a84bbe0184abcd1d0b9bc8074b5d6b7ab90bb/typing_extensions-4.10.0-py3-none-any.whl", hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475", size = 33926 }] "### ); }); @@ -709,7 +605,7 @@ fn lock_dependency_extra() -> Result<()> { ----- stderr ----- warning: `uv lock` is experimental and may change without warning. - Resolved 13 packages in [TIME] + Resolved 10 packages in [TIME] "###); let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?; @@ -742,12 +638,6 @@ fn lock_dependency_extra() -> Result<()> { source = "registry+https://pypi.org/simple" marker = "platform_system == 'Windows'" - [[distribution.dependencies]] - name = "importlib-metadata" - version = "7.1.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.8'" - [[distribution]] name = "colorama" version = "0.4.6" @@ -772,12 +662,6 @@ fn lock_dependency_extra() -> Result<()> { version = "8.1.7" source = "registry+https://pypi.org/simple" - [[distribution.dependencies]] - name = "importlib-metadata" - version = "7.1.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.10'" - [[distribution.dependencies]] name = "itsdangerous" version = "2.1.2" @@ -800,24 +684,6 @@ fn lock_dependency_extra() -> Result<()> { version = "1.0.1" source = "registry+https://pypi.org/simple" - [[distribution]] - name = "importlib-metadata" - version = "7.1.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/a0/fc/c4e6078d21fc4fa56300a241b87eae76766aa380a23fc450fc85bb7bf547/importlib_metadata-7.1.0.tar.gz", hash = "sha256:b78938b926ee8d5f020fc4772d487045805a55ddbad2ecf21c6d60938dc7fcd2", size = 52120 } - wheels = [{ url = "https://files.pythonhosted.org/packages/2d/0a/679461c511447ffaf176567d5c496d1de27cbe34a87df6677d7171b2fbd4/importlib_metadata-7.1.0-py3-none-any.whl", hash = "sha256:30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570", size = 24409 }] - - [[distribution.dependencies]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.8'" - - [[distribution.dependencies]] - name = "zipp" - version = "3.18.1" - source = "registry+https://pypi.org/simple" - [[distribution]] name = "itsdangerous" version = "2.1.2" @@ -928,13 +794,6 @@ fn lock_dependency_extra() -> Result<()> { sdist = { url = "https://files.pythonhosted.org/packages/bc/57/e84d88dfe0aec03b7a2d4327012c1627ab5f03652216c63d49846d7a6c58/python-dotenv-1.0.1.tar.gz", hash = "sha256:e324ee90a023d808f1959c46bcbc04446a10ced277783dc6ee09987c37ec10ca", size = 39115 } wheels = [{ url = "https://files.pythonhosted.org/packages/6a/3e/b68c118422ec867fa7ab88444e1274aa40681c606d59ac27de5a5588f082/python_dotenv-1.0.1-py3-none-any.whl", hash = "sha256:f7b63ef50f1b690dddf550d03497b66d609393b40b564ed0d674909a68ebf16a", size = 19863 }] - [[distribution]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/16/3a/0d26ce356c7465a19c9ea8814b960f8a36c3b0d07c323176620b7b483e44/typing_extensions-4.10.0.tar.gz", hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb", size = 77558 } - wheels = [{ url = "https://files.pythonhosted.org/packages/f9/de/dc04a3ea60b22624b51c703a84bbe0184abcd1d0b9bc8074b5d6b7ab90bb/typing_extensions-4.10.0-py3-none-any.whl", hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475", size = 33926 }] - [[distribution]] name = "werkzeug" version = "3.0.1" @@ -946,13 +805,6 @@ fn lock_dependency_extra() -> Result<()> { name = "markupsafe" version = "2.1.5" source = "registry+https://pypi.org/simple" - - [[distribution]] - name = "zipp" - version = "3.18.1" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/3e/ef/65da662da6f9991e87f058bc90b91a935ae655a16ae5514660d6460d1298/zipp-3.18.1.tar.gz", hash = "sha256:2884ed22e7d8961de1c9a05142eb69a247f120291bc0206a00a7642f09b5b715", size = 21220 } - wheels = [{ url = "https://files.pythonhosted.org/packages/c2/0a/ba9d0ee9536d3ef73a3448e931776e658b36f128d344e175bc32b092a8bf/zipp-3.18.1-py3-none-any.whl", hash = "sha256:206f5a15f2af3dbaee80769fb7dc6f249695e940acca08dfb2a4769fe61e538b", size = 8247 }] "### ); }); @@ -1941,7 +1793,7 @@ fn lock_requires_python() -> Result<()> { ----- stderr ----- warning: `uv lock` is experimental and may change without warning. - Resolved 9 packages in [TIME] + Resolved 5 packages in [TIME] "###); let lock = fs_err::read_to_string(&lockfile)?; @@ -1961,12 +1813,6 @@ fn lock_requires_python() -> Result<()> { sdist = { url = "https://files.pythonhosted.org/packages/e3/fc/f800d51204003fa8ae392c4e8278f256206e7a919b708eef054f5f4b650d/attrs-23.2.0.tar.gz", hash = "sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30", size = 780820 } wheels = [{ url = "https://files.pythonhosted.org/packages/e0/44/827b2a91a5816512fcaf3cc4ebc465ccd5d598c45cefa6703fcf4a79018f/attrs-23.2.0-py3-none-any.whl", hash = "sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1", size = 60752 }] - [[distribution.dependencies]] - name = "importlib-metadata" - version = "7.1.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.8'" - [[distribution]] name = "cattrs" version = "23.2.3" @@ -1979,43 +1825,6 @@ fn lock_requires_python() -> Result<()> { version = "23.2.0" source = "registry+https://pypi.org/simple" - [[distribution.dependencies]] - name = "exceptiongroup" - version = "1.2.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.11'" - - [[distribution.dependencies]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.11'" - - [[distribution]] - name = "exceptiongroup" - version = "1.2.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/8e/1c/beef724eaf5b01bb44b6338c8c3494eff7cab376fab4904cfbbc3585dc79/exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68", size = 26264 } - wheels = [{ url = "https://files.pythonhosted.org/packages/b8/9a/5028fd52db10e600f1c4674441b968cf2ea4959085bfb5b99fb1250e5f68/exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14", size = 16210 }] - - [[distribution]] - name = "importlib-metadata" - version = "7.1.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/a0/fc/c4e6078d21fc4fa56300a241b87eae76766aa380a23fc450fc85bb7bf547/importlib_metadata-7.1.0.tar.gz", hash = "sha256:b78938b926ee8d5f020fc4772d487045805a55ddbad2ecf21c6d60938dc7fcd2", size = 52120 } - wheels = [{ url = "https://files.pythonhosted.org/packages/2d/0a/679461c511447ffaf176567d5c496d1de27cbe34a87df6677d7171b2fbd4/importlib_metadata-7.1.0-py3-none-any.whl", hash = "sha256:30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570", size = 24409 }] - - [[distribution.dependencies]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.8'" - - [[distribution.dependencies]] - name = "zipp" - version = "3.18.1" - source = "registry+https://pypi.org/simple" - [[distribution]] name = "lsprotocol" version = "2023.0.1" @@ -2060,20 +1869,6 @@ fn lock_requires_python() -> Result<()> { name = "lsprotocol" version = "2023.0.1" source = "registry+https://pypi.org/simple" - - [[distribution]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/16/3a/0d26ce356c7465a19c9ea8814b960f8a36c3b0d07c323176620b7b483e44/typing_extensions-4.10.0.tar.gz", hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb", size = 77558 } - wheels = [{ url = "https://files.pythonhosted.org/packages/f9/de/dc04a3ea60b22624b51c703a84bbe0184abcd1d0b9bc8074b5d6b7ab90bb/typing_extensions-4.10.0-py3-none-any.whl", hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475", size = 33926 }] - - [[distribution]] - name = "zipp" - version = "3.18.1" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/3e/ef/65da662da6f9991e87f058bc90b91a935ae655a16ae5514660d6460d1298/zipp-3.18.1.tar.gz", hash = "sha256:2884ed22e7d8961de1c9a05142eb69a247f120291bc0206a00a7642f09b5b715", size = 21220 } - wheels = [{ url = "https://files.pythonhosted.org/packages/c2/0a/ba9d0ee9536d3ef73a3448e931776e658b36f128d344e175bc32b092a8bf/zipp-3.18.1-py3-none-any.whl", hash = "sha256:206f5a15f2af3dbaee80769fb7dc6f249695e940acca08dfb2a4769fe61e538b", size = 8247 }] "### ); }); @@ -2131,7 +1926,7 @@ fn lock_requires_python_star() -> Result<()> { ----- stderr ----- warning: `uv lock` is experimental and may change without warning. - Resolved 10 packages in [TIME] + Resolved 6 packages in [TIME] "###); let lock = fs_err::read_to_string(lockfile)?; @@ -2151,12 +1946,6 @@ fn lock_requires_python_star() -> Result<()> { sdist = { url = "https://files.pythonhosted.org/packages/e3/fc/f800d51204003fa8ae392c4e8278f256206e7a919b708eef054f5f4b650d/attrs-23.2.0.tar.gz", hash = "sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30", size = 780820 } wheels = [{ url = "https://files.pythonhosted.org/packages/e0/44/827b2a91a5816512fcaf3cc4ebc465ccd5d598c45cefa6703fcf4a79018f/attrs-23.2.0-py3-none-any.whl", hash = "sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1", size = 60752 }] - [[distribution.dependencies]] - name = "importlib-metadata" - version = "7.1.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.8'" - [[distribution]] name = "cattrs" version = "23.2.3" @@ -2169,43 +1958,6 @@ fn lock_requires_python_star() -> Result<()> { version = "23.2.0" source = "registry+https://pypi.org/simple" - [[distribution.dependencies]] - name = "exceptiongroup" - version = "1.2.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.11'" - - [[distribution.dependencies]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.11'" - - [[distribution]] - name = "exceptiongroup" - version = "1.2.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/8e/1c/beef724eaf5b01bb44b6338c8c3494eff7cab376fab4904cfbbc3585dc79/exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68", size = 26264 } - wheels = [{ url = "https://files.pythonhosted.org/packages/b8/9a/5028fd52db10e600f1c4674441b968cf2ea4959085bfb5b99fb1250e5f68/exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14", size = 16210 }] - - [[distribution]] - name = "importlib-metadata" - version = "7.1.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/a0/fc/c4e6078d21fc4fa56300a241b87eae76766aa380a23fc450fc85bb7bf547/importlib_metadata-7.1.0.tar.gz", hash = "sha256:b78938b926ee8d5f020fc4772d487045805a55ddbad2ecf21c6d60938dc7fcd2", size = 52120 } - wheels = [{ url = "https://files.pythonhosted.org/packages/2d/0a/679461c511447ffaf176567d5c496d1de27cbe34a87df6677d7171b2fbd4/importlib_metadata-7.1.0-py3-none-any.whl", hash = "sha256:30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570", size = 24409 }] - - [[distribution.dependencies]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.8'" - - [[distribution.dependencies]] - name = "zipp" - version = "3.18.1" - source = "registry+https://pypi.org/simple" - [[distribution]] name = "linehaul" version = "1.0.1" @@ -2252,20 +2004,6 @@ fn lock_requires_python_star() -> Result<()> { source = "registry+https://pypi.org/simple" sdist = { url = "https://files.pythonhosted.org/packages/46/3a/31fd28064d016a2182584d579e033ec95b809d8e220e74c4af6f0f2e8842/pyparsing-3.1.2.tar.gz", hash = "sha256:a1bac0ce561155ecc3ed78ca94d3c9378656ad4c94c1270de543f621420f94ad", size = 889571 } wheels = [{ url = "https://files.pythonhosted.org/packages/9d/ea/6d76df31432a0e6fdf81681a895f009a4bb47b3c39036db3e1b528191d52/pyparsing-3.1.2-py3-none-any.whl", hash = "sha256:f9db75911801ed778fe61bb643079ff86601aca99fcae6345aa67292038fb742", size = 103245 }] - - [[distribution]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/16/3a/0d26ce356c7465a19c9ea8814b960f8a36c3b0d07c323176620b7b483e44/typing_extensions-4.10.0.tar.gz", hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb", size = 77558 } - wheels = [{ url = "https://files.pythonhosted.org/packages/f9/de/dc04a3ea60b22624b51c703a84bbe0184abcd1d0b9bc8074b5d6b7ab90bb/typing_extensions-4.10.0-py3-none-any.whl", hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475", size = 33926 }] - - [[distribution]] - name = "zipp" - version = "3.18.1" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/3e/ef/65da662da6f9991e87f058bc90b91a935ae655a16ae5514660d6460d1298/zipp-3.18.1.tar.gz", hash = "sha256:2884ed22e7d8961de1c9a05142eb69a247f120291bc0206a00a7642f09b5b715", size = 21220 } - wheels = [{ url = "https://files.pythonhosted.org/packages/c2/0a/ba9d0ee9536d3ef73a3448e931776e658b36f128d344e175bc32b092a8bf/zipp-3.18.1-py3-none-any.whl", hash = "sha256:206f5a15f2af3dbaee80769fb7dc6f249695e940acca08dfb2a4769fe61e538b", size = 8247 }] "### ); }); @@ -2300,7 +2038,7 @@ fn lock_requires_python_pre() -> Result<()> { ----- stderr ----- warning: `uv lock` is experimental and may change without warning. - Resolved 10 packages in [TIME] + Resolved 6 packages in [TIME] "###); let lock = fs_err::read_to_string(lockfile)?; @@ -2320,12 +2058,6 @@ fn lock_requires_python_pre() -> Result<()> { sdist = { url = "https://files.pythonhosted.org/packages/e3/fc/f800d51204003fa8ae392c4e8278f256206e7a919b708eef054f5f4b650d/attrs-23.2.0.tar.gz", hash = "sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30", size = 780820 } wheels = [{ url = "https://files.pythonhosted.org/packages/e0/44/827b2a91a5816512fcaf3cc4ebc465ccd5d598c45cefa6703fcf4a79018f/attrs-23.2.0-py3-none-any.whl", hash = "sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1", size = 60752 }] - [[distribution.dependencies]] - name = "importlib-metadata" - version = "7.1.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.8'" - [[distribution]] name = "cattrs" version = "23.2.3" @@ -2338,43 +2070,6 @@ fn lock_requires_python_pre() -> Result<()> { version = "23.2.0" source = "registry+https://pypi.org/simple" - [[distribution.dependencies]] - name = "exceptiongroup" - version = "1.2.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.11'" - - [[distribution.dependencies]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.11'" - - [[distribution]] - name = "exceptiongroup" - version = "1.2.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/8e/1c/beef724eaf5b01bb44b6338c8c3494eff7cab376fab4904cfbbc3585dc79/exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68", size = 26264 } - wheels = [{ url = "https://files.pythonhosted.org/packages/b8/9a/5028fd52db10e600f1c4674441b968cf2ea4959085bfb5b99fb1250e5f68/exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14", size = 16210 }] - - [[distribution]] - name = "importlib-metadata" - version = "7.1.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/a0/fc/c4e6078d21fc4fa56300a241b87eae76766aa380a23fc450fc85bb7bf547/importlib_metadata-7.1.0.tar.gz", hash = "sha256:b78938b926ee8d5f020fc4772d487045805a55ddbad2ecf21c6d60938dc7fcd2", size = 52120 } - wheels = [{ url = "https://files.pythonhosted.org/packages/2d/0a/679461c511447ffaf176567d5c496d1de27cbe34a87df6677d7171b2fbd4/importlib_metadata-7.1.0-py3-none-any.whl", hash = "sha256:30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570", size = 24409 }] - - [[distribution.dependencies]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - marker = "python_version < '3.8'" - - [[distribution.dependencies]] - name = "zipp" - version = "3.18.1" - source = "registry+https://pypi.org/simple" - [[distribution]] name = "linehaul" version = "1.0.1" @@ -2421,20 +2116,6 @@ fn lock_requires_python_pre() -> Result<()> { source = "registry+https://pypi.org/simple" sdist = { url = "https://files.pythonhosted.org/packages/46/3a/31fd28064d016a2182584d579e033ec95b809d8e220e74c4af6f0f2e8842/pyparsing-3.1.2.tar.gz", hash = "sha256:a1bac0ce561155ecc3ed78ca94d3c9378656ad4c94c1270de543f621420f94ad", size = 889571 } wheels = [{ url = "https://files.pythonhosted.org/packages/9d/ea/6d76df31432a0e6fdf81681a895f009a4bb47b3c39036db3e1b528191d52/pyparsing-3.1.2-py3-none-any.whl", hash = "sha256:f9db75911801ed778fe61bb643079ff86601aca99fcae6345aa67292038fb742", size = 103245 }] - - [[distribution]] - name = "typing-extensions" - version = "4.10.0" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/16/3a/0d26ce356c7465a19c9ea8814b960f8a36c3b0d07c323176620b7b483e44/typing_extensions-4.10.0.tar.gz", hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb", size = 77558 } - wheels = [{ url = "https://files.pythonhosted.org/packages/f9/de/dc04a3ea60b22624b51c703a84bbe0184abcd1d0b9bc8074b5d6b7ab90bb/typing_extensions-4.10.0-py3-none-any.whl", hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475", size = 33926 }] - - [[distribution]] - name = "zipp" - version = "3.18.1" - source = "registry+https://pypi.org/simple" - sdist = { url = "https://files.pythonhosted.org/packages/3e/ef/65da662da6f9991e87f058bc90b91a935ae655a16ae5514660d6460d1298/zipp-3.18.1.tar.gz", hash = "sha256:2884ed22e7d8961de1c9a05142eb69a247f120291bc0206a00a7642f09b5b715", size = 21220 } - wheels = [{ url = "https://files.pythonhosted.org/packages/c2/0a/ba9d0ee9536d3ef73a3448e931776e658b36f128d344e175bc32b092a8bf/zipp-3.18.1-py3-none-any.whl", hash = "sha256:206f5a15f2af3dbaee80769fb7dc6f249695e940acca08dfb2a4769fe61e538b", size = 8247 }] "### ); }); @@ -2720,7 +2401,7 @@ fn lock_multiple_markers() -> Result<()> { name = "iniconfig" version = "2.0.0" source = "registry+https://pypi.org/simple" - marker = "python_version < '3.12' or implementation_name == 'cpython'" + marker = "implementation_name == 'cpython'" "### ); }); diff --git a/crates/uv/tests/run.rs b/crates/uv/tests/run.rs index 4e2b84416c4e..ffbd967c2915 100644 --- a/crates/uv/tests/run.rs +++ b/crates/uv/tests/run.rs @@ -54,7 +54,7 @@ fn run_with_python_version() -> Result<()> { 3.7.0 ----- stderr ----- - Resolved 10 packages in [TIME] + Resolved 5 packages in [TIME] Downloaded 4 packages in [TIME] Installed 4 packages in [TIME] + anyio==3.7.0 @@ -81,7 +81,7 @@ fn run_with_python_version() -> Result<()> { 3.7.0 ----- stderr ----- - Resolved 10 packages in [TIME] + Resolved 5 packages in [TIME] Audited 4 packages in [TIME] "###); @@ -115,7 +115,7 @@ fn run_with_python_version() -> Result<()> { Removing virtual environment at: [VENV]/ Using Python 3.11.[X] interpreter at: [PYTHON] Creating virtualenv at: [VENV]/ - Resolved 10 packages in [TIME] + Resolved 5 packages in [TIME] Downloaded 4 packages in [TIME] Installed 4 packages in [TIME] + anyio==3.6.0 diff --git a/crates/uv/tests/workspace.rs b/crates/uv/tests/workspace.rs index 3fc4486cddb4..c7f84439d2ec 100644 --- a/crates/uv/tests/workspace.rs +++ b/crates/uv/tests/workspace.rs @@ -420,7 +420,7 @@ fn test_uv_run_with_package_virtual_workspace() -> Result<()> { ----- stderr ----- Using Python 3.12.[X] interpreter at: [PYTHON] Creating virtualenv at: [VENV]/ - Resolved 10 packages in [TIME] + Resolved 8 packages in [TIME] Downloaded 5 packages in [TIME] Installed 5 packages in [TIME] + anyio==4.3.0 @@ -442,7 +442,7 @@ fn test_uv_run_with_package_virtual_workspace() -> Result<()> { Success ----- stderr ----- - Resolved 10 packages in [TIME] + Resolved 8 packages in [TIME] Downloaded 2 packages in [TIME] Installed 2 packages in [TIME] + albatross==0.1.0 (from file://[TEMP_DIR]/albatross-virtual-workspace/packages/albatross) @@ -480,7 +480,7 @@ fn test_uv_run_with_package_root_workspace() -> Result<()> { ----- stderr ----- Using Python 3.12.[X] interpreter at: [PYTHON] Creating virtualenv at: [VENV]/ - Resolved 10 packages in [TIME] + Resolved 8 packages in [TIME] Downloaded 5 packages in [TIME] Installed 5 packages in [TIME] + anyio==4.3.0 @@ -502,7 +502,7 @@ fn test_uv_run_with_package_root_workspace() -> Result<()> { Success ----- stderr ----- - Resolved 10 packages in [TIME] + Resolved 8 packages in [TIME] Downloaded 2 packages in [TIME] Installed 2 packages in [TIME] + albatross==0.1.0 (from file://[TEMP_DIR]/albatross-root-workspace) From df460b137fa2cbcf777d18486061b70f5a4a7752 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Wed, 12 Jun 2024 10:44:22 -0400 Subject: [PATCH 2/4] scripts/scenarios: add requires-python to packse lock test template packse has the ability to specify a project wide Requires-Python constraint, but our lock template wasn't forwarding this to the corresponding pyproject.toml. This update makes that happen. --- scripts/scenarios/templates/lock.mustache | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/scenarios/templates/lock.mustache b/scripts/scenarios/templates/lock.mustache index 198b12a2915a..b5d89525e9cb 100644 --- a/scripts/scenarios/templates/lock.mustache +++ b/scripts/scenarios/templates/lock.mustache @@ -45,6 +45,9 @@ fn {{module_name}}() -> Result<()> { '''{{requirement}}''', {{/root.requires}} ] + {{#root.requires_python}} + requires-python = "{{.}}" + {{/root.requires_python}} "### )?; From c4904244ed14b7f110f0c554286e9afce44e9e94 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Wed, 12 Jun 2024 10:46:13 -0400 Subject: [PATCH 3/4] scenarios: bump packse to 0.3.24 --- scripts/scenarios/requirements.in | 2 +- scripts/scenarios/requirements.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/scenarios/requirements.in b/scripts/scenarios/requirements.in index b01be6d44300..ad3bc51fe56d 100644 --- a/scripts/scenarios/requirements.in +++ b/scripts/scenarios/requirements.in @@ -1,2 +1,2 @@ chevron-blue -packse>=0.3.18 +packse>=0.3.24 diff --git a/scripts/scenarios/requirements.txt b/scripts/scenarios/requirements.txt index 55551e176095..2acc96c439a2 100644 --- a/scripts/scenarios/requirements.txt +++ b/scripts/scenarios/requirements.txt @@ -1,5 +1,5 @@ # This file was autogenerated by uv via the following command: -# uv pip compile scripts/scenarios/requirements.in -o scripts/scenarios/requirements.txt --refresh-package packse +# uv pip compile scripts/scenarios/requirements.in -o scripts/scenarios/requirements.txt --refresh-package packse -n certifi==2024.2.2 # via requests cffi==1.16.0 @@ -46,7 +46,7 @@ nh3==0.2.17 # via readme-renderer packaging==24.0 # via hatchling -packse==0.3.18 +packse==0.3.24 # via -r scripts/scenarios/requirements.in pathspec==0.12.1 # via hatchling From c2c1ccf494bdeba11200a33b4284087d4f1f6ebb Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Wed, 12 Jun 2024 11:35:33 -0400 Subject: [PATCH 4/4] uv/tests: add Requires-Python packse tests Ref https://github.com/astral-sh/packse/pull/187 Ref https://github.com/astral-sh/packse/pull/188 Ref https://github.com/astral-sh/packse/pull/189 --- crates/uv/tests/common/mod.rs | 2 +- crates/uv/tests/lock_scenarios.rs | 479 ++++++++++++++++++----- crates/uv/tests/pip_compile_scenarios.rs | 6 +- crates/uv/tests/pip_install_scenarios.rs | 10 +- 4 files changed, 399 insertions(+), 98 deletions(-) diff --git a/crates/uv/tests/common/mod.rs b/crates/uv/tests/common/mod.rs index 1cd759bb364a..d22176e46cfd 100644 --- a/crates/uv/tests/common/mod.rs +++ b/crates/uv/tests/common/mod.rs @@ -26,7 +26,7 @@ pub static EXCLUDE_NEWER: &str = "2024-03-25T00:00:00Z"; /// Using a find links url allows using `--index-url` instead of `--extra-index-url` in tests /// to prevent dependency confusion attacks against our test suite. pub const BUILD_VENDOR_LINKS_URL: &str = - "https://raw.githubusercontent.com/astral-sh/packse/0.3.18/vendor/links.html"; + "https://raw.githubusercontent.com/astral-sh/packse/0.3.24/vendor/links.html"; #[doc(hidden)] // Macro and test context only, don't use directly. pub const INSTA_FILTERS: &[(&str, &str)] = &[ diff --git a/crates/uv/tests/lock_scenarios.rs b/crates/uv/tests/lock_scenarios.rs index b839626a041b..df26fb690097 100644 --- a/crates/uv/tests/lock_scenarios.rs +++ b/crates/uv/tests/lock_scenarios.rs @@ -1,7 +1,7 @@ //! DO NOT EDIT //! //! Generated with `./scripts/sync_scenarios.sh` -//! Scenarios from +//! Scenarios from //! #![cfg(all(feature = "python", feature = "pypi"))] #![allow(clippy::needless_raw_string_hashes)] @@ -48,12 +48,13 @@ fn fork_basic() -> Result<()> { '''fork-basic-a>=2; sys_platform == "linux"''', '''fork-basic-a<2; sys_platform == "darwin"''', ] + requires-python = ">=3.8" "###, )?; let mut cmd = context.lock_without_exclude_newer(); cmd.arg("--index-url") - .arg("https://astral-sh.github.io/packse/0.3.18/simple-html/"); + .arg("https://astral-sh.github.io/packse/0.3.24/simple-html/"); uv_snapshot!(filters, cmd, @r###" success: true exit_code: 0 @@ -61,7 +62,6 @@ fn fork_basic() -> Result<()> { ----- stderr ----- warning: `uv lock` is experimental and may change without warning. - warning: No `requires-python` field found in `project`. Defaulting to `>=3.8`. Resolved 3 packages in [TIME] "### ); @@ -78,16 +78,16 @@ fn fork_basic() -> Result<()> { [[distribution]] name = "package-a" version = "1.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" - sdist = { url = "https://astral-sh.github.io/packse/0.3.18/files/fork_basic_a-1.0.0.tar.gz#sha256=3e45d6136e4a52416f85b7f53f405493db8f9fea33210299e6a68895bf0acf2a", hash = "sha256:3e45d6136e4a52416f85b7f53f405493db8f9fea33210299e6a68895bf0acf2a" } - wheels = [{ url = "https://astral-sh.github.io/packse/0.3.18/files/fork_basic_a-1.0.0-py3-none-any.whl#sha256=b81a7553af25f15c9d49ed26af9c5b86eb2be107f3dd1bd97d7a4b0e8ca0329e", hash = "sha256:b81a7553af25f15c9d49ed26af9c5b86eb2be107f3dd1bd97d7a4b0e8ca0329e" }] + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" + sdist = { url = "https://astral-sh.github.io/packse/0.3.24/files/fork_basic_a-1.0.0.tar.gz#sha256=9bd6d9d74d8928854f79ea3ed4cd0d8a4906eeaa40f5f3d63460a1c2d5f6d773", hash = "sha256:9bd6d9d74d8928854f79ea3ed4cd0d8a4906eeaa40f5f3d63460a1c2d5f6d773" } + wheels = [{ url = "https://astral-sh.github.io/packse/0.3.24/files/fork_basic_a-1.0.0-py3-none-any.whl#sha256=1a28e30240634de42f24d34ff9bdac181208ef57215def75baac0de205685d27", hash = "sha256:1a28e30240634de42f24d34ff9bdac181208ef57215def75baac0de205685d27" }] [[distribution]] name = "package-a" version = "2.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" - sdist = { url = "https://astral-sh.github.io/packse/0.3.18/files/fork_basic_a-2.0.0.tar.gz#sha256=ceb7349a6dd7640be952c70dce8ee6a44e3442dfd9b248b96242e37623e1028e", hash = "sha256:ceb7349a6dd7640be952c70dce8ee6a44e3442dfd9b248b96242e37623e1028e" } - wheels = [{ url = "https://astral-sh.github.io/packse/0.3.18/files/fork_basic_a-2.0.0-py3-none-any.whl#sha256=9cab1de38d28e75ac5fe5c4dda9157555c60dd03ee26e6ad51b01ca18d8a0f01", hash = "sha256:9cab1de38d28e75ac5fe5c4dda9157555c60dd03ee26e6ad51b01ca18d8a0f01" }] + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" + sdist = { url = "https://astral-sh.github.io/packse/0.3.24/files/fork_basic_a-2.0.0.tar.gz#sha256=c0ce6dfb6d712eb42a4bbe9402a1f823627b9d3773f31d259c49478fc7d8d082", hash = "sha256:c0ce6dfb6d712eb42a4bbe9402a1f823627b9d3773f31d259c49478fc7d8d082" } + wheels = [{ url = "https://astral-sh.github.io/packse/0.3.24/files/fork_basic_a-2.0.0-py3-none-any.whl#sha256=c830122b1b31a6229208e04ced83ae4d1cef8be28b857b56af054bb4bd868a30", hash = "sha256:c830122b1b31a6229208e04ced83ae4d1cef8be28b857b56af054bb4bd868a30" }] [[distribution]] name = "project" @@ -98,13 +98,13 @@ fn fork_basic() -> Result<()> { [[distribution.dependencies]] name = "package-a" version = "1.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" marker = "sys_platform == 'darwin'" [[distribution.dependencies]] name = "package-a" version = "2.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" marker = "sys_platform == 'linux'" "### ); @@ -157,12 +157,13 @@ fn fork_marker_accrue() -> Result<()> { '''fork-marker-accrue-a==1.0.0; implementation_name == "cpython"''', '''fork-marker-accrue-b==1.0.0; implementation_name == "pypy"''', ] + requires-python = ">=3.8" "###, )?; let mut cmd = context.lock_without_exclude_newer(); cmd.arg("--index-url") - .arg("https://astral-sh.github.io/packse/0.3.18/simple-html/"); + .arg("https://astral-sh.github.io/packse/0.3.24/simple-html/"); uv_snapshot!(filters, cmd, @r###" success: true exit_code: 0 @@ -170,7 +171,6 @@ fn fork_marker_accrue() -> Result<()> { ----- stderr ----- warning: `uv lock` is experimental and may change without warning. - warning: No `requires-python` field found in `project`. Defaulting to `>=3.8`. Resolved 4 packages in [TIME] "### ); @@ -187,35 +187,35 @@ fn fork_marker_accrue() -> Result<()> { [[distribution]] name = "package-a" version = "1.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" - sdist = { url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_accrue_a-1.0.0.tar.gz#sha256=9096dbf9c8e8c2da4a1527be515f740f697ee833ec1492953883f36c8931bc37", hash = "sha256:9096dbf9c8e8c2da4a1527be515f740f697ee833ec1492953883f36c8931bc37" } - wheels = [{ url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_accrue_a-1.0.0-py3-none-any.whl#sha256=5fed1607b73cc7a5e9703206c24cc3fa730600a776bf40ae264ad364ad610e0a", hash = "sha256:5fed1607b73cc7a5e9703206c24cc3fa730600a776bf40ae264ad364ad610e0a" }] + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" + sdist = { url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_accrue_a-1.0.0.tar.gz#sha256=c791e6062a510c63bff857ca6f7a921a7795bfbc588f21a51124e091fb0343d6", hash = "sha256:c791e6062a510c63bff857ca6f7a921a7795bfbc588f21a51124e091fb0343d6" } + wheels = [{ url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_accrue_a-1.0.0-py3-none-any.whl#sha256=c1b40f368e7be6c16c1d537481421bf6cd1e18a09a83f42ed35029633d4b3249", hash = "sha256:c1b40f368e7be6c16c1d537481421bf6cd1e18a09a83f42ed35029633d4b3249" }] [[distribution.dependencies]] name = "package-c" version = "1.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" marker = "sys_platform == 'linux'" [[distribution]] name = "package-b" version = "1.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" - sdist = { url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_accrue_b-1.0.0.tar.gz#sha256=d92d0083d2d5da2f83180c08dfc79a03ec9606c00bc3153566f7b577c0e6b859", hash = "sha256:d92d0083d2d5da2f83180c08dfc79a03ec9606c00bc3153566f7b577c0e6b859" } - wheels = [{ url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_accrue_b-1.0.0-py3-none-any.whl#sha256=e5382e438f417f2de9427296a5960f9f9631ff1fa11c93d6b0b3b9d7fb60760f", hash = "sha256:e5382e438f417f2de9427296a5960f9f9631ff1fa11c93d6b0b3b9d7fb60760f" }] + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" + sdist = { url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_accrue_b-1.0.0.tar.gz#sha256=32e7ea1022061783857c3f6fec5051b4b320630fe8a5aec6523cd565db350387", hash = "sha256:32e7ea1022061783857c3f6fec5051b4b320630fe8a5aec6523cd565db350387" } + wheels = [{ url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_accrue_b-1.0.0-py3-none-any.whl#sha256=2df49decd1b188800d1cbf5265806d32388e4c792da3074b6f9be2e7b72185f5", hash = "sha256:2df49decd1b188800d1cbf5265806d32388e4c792da3074b6f9be2e7b72185f5" }] [[distribution.dependencies]] name = "package-c" version = "1.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" marker = "sys_platform == 'darwin'" [[distribution]] name = "package-c" version = "1.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" - sdist = { url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_accrue_c-1.0.0.tar.gz#sha256=81068ae8b43deb3165cab17eb52aa5f99cda64f51c359b4659918d86995b9cad", hash = "sha256:81068ae8b43deb3165cab17eb52aa5f99cda64f51c359b4659918d86995b9cad" } - wheels = [{ url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_accrue_c-1.0.0-py3-none-any.whl#sha256=f5fe6d35f360ea802b3a7da030e9ed1dce776c30ed028ea7be04fafcb7ac55b6", hash = "sha256:f5fe6d35f360ea802b3a7da030e9ed1dce776c30ed028ea7be04fafcb7ac55b6" }] + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" + sdist = { url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_accrue_c-1.0.0.tar.gz#sha256=a3e09ac3dc8e787a08ebe8d5d6072e09720c76cbbcb76a6645d6f59652742015", hash = "sha256:a3e09ac3dc8e787a08ebe8d5d6072e09720c76cbbcb76a6645d6f59652742015" } + wheels = [{ url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_accrue_c-1.0.0-py3-none-any.whl#sha256=01993b60f134b3b80585fe95e3511b9a6194c2387c0215d962dbf65abd5a5fe1", hash = "sha256:01993b60f134b3b80585fe95e3511b9a6194c2387c0215d962dbf65abd5a5fe1" }] [[distribution]] name = "project" @@ -226,13 +226,13 @@ fn fork_marker_accrue() -> Result<()> { [[distribution.dependencies]] name = "package-a" version = "1.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" marker = "implementation_name == 'cpython'" [[distribution.dependencies]] name = "package-b" version = "1.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" marker = "implementation_name == 'pypy'" "### ); @@ -282,12 +282,13 @@ fn fork_marker_disjoint() -> Result<()> { '''fork-marker-disjoint-a>=2; sys_platform == "linux"''', '''fork-marker-disjoint-a<2; sys_platform == "linux"''', ] + requires-python = ">=3.8" "###, )?; let mut cmd = context.lock_without_exclude_newer(); cmd.arg("--index-url") - .arg("https://astral-sh.github.io/packse/0.3.18/simple-html/"); + .arg("https://astral-sh.github.io/packse/0.3.24/simple-html/"); uv_snapshot!(filters, cmd, @r###" success: false exit_code: 1 @@ -295,7 +296,6 @@ fn fork_marker_disjoint() -> Result<()> { ----- stderr ----- warning: `uv lock` is experimental and may change without warning. - warning: No `requires-python` field found in `project`. Defaulting to `>=3.8`. × No solution found when resolving dependencies: ╰─▶ Because project==0.1.0 depends on package-a{sys_platform == 'linux'}>=2 and package-a{sys_platform == 'linux'}<2, we can conclude that project==0.1.0 cannot be used. And because only project==0.1.0 is available and project depends on project, we can conclude that the requirements are unsatisfiable. @@ -351,12 +351,13 @@ fn fork_marker_selection() -> Result<()> { '''fork-marker-selection-b>=2; sys_platform == "linux"''', '''fork-marker-selection-b<2; sys_platform == "darwin"''', ] + requires-python = ">=3.8" "###, )?; let mut cmd = context.lock_without_exclude_newer(); cmd.arg("--index-url") - .arg("https://astral-sh.github.io/packse/0.3.18/simple-html/"); + .arg("https://astral-sh.github.io/packse/0.3.24/simple-html/"); uv_snapshot!(filters, cmd, @r###" success: true exit_code: 0 @@ -364,7 +365,6 @@ fn fork_marker_selection() -> Result<()> { ----- stderr ----- warning: `uv lock` is experimental and may change without warning. - warning: No `requires-python` field found in `project`. Defaulting to `>=3.8`. Resolved 5 packages in [TIME] "### ); @@ -381,35 +381,35 @@ fn fork_marker_selection() -> Result<()> { [[distribution]] name = "package-a" version = "0.1.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" - sdist = { url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_selection_a-0.1.0.tar.gz#sha256=03c464276ee75f5a1468da2a4090ee6b5fda0f26f548707c9ffcf06d3cf69282", hash = "sha256:03c464276ee75f5a1468da2a4090ee6b5fda0f26f548707c9ffcf06d3cf69282" } - wheels = [{ url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_selection_a-0.1.0-py3-none-any.whl#sha256=0e45ca7b3616810a583dc9754b52b91c69aeea4070d6fe0806c67081d0e95473", hash = "sha256:0e45ca7b3616810a583dc9754b52b91c69aeea4070d6fe0806c67081d0e95473" }] + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" + sdist = { url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_selection_a-0.1.0.tar.gz#sha256=ece83ba864a62d5d747439f79a0bf36aa4c18d15bca96aab855ffc2e94a8eef7", hash = "sha256:ece83ba864a62d5d747439f79a0bf36aa4c18d15bca96aab855ffc2e94a8eef7" } + wheels = [{ url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_selection_a-0.1.0-py3-none-any.whl#sha256=8aecc639cc090aa80aa263fb3a9644a7cec9da215133299b8fb381cb7a6bcbb7", hash = "sha256:8aecc639cc090aa80aa263fb3a9644a7cec9da215133299b8fb381cb7a6bcbb7" }] [[distribution]] name = "package-a" version = "0.2.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" - sdist = { url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_selection_a-0.2.0.tar.gz#sha256=ef1d840fe2e86c6eecd4673606076d858b51a3712c1de097b7503fee0c96b97f", hash = "sha256:ef1d840fe2e86c6eecd4673606076d858b51a3712c1de097b7503fee0c96b97f" } - wheels = [{ url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_selection_a-0.2.0-py3-none-any.whl#sha256=78797f388900cece9866aa20917c6a40040dd65f906f8ef034a8cedb4dd75e6c", hash = "sha256:78797f388900cece9866aa20917c6a40040dd65f906f8ef034a8cedb4dd75e6c" }] + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" + sdist = { url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_selection_a-0.2.0.tar.gz#sha256=42abfb3ce2c13ae008e498d27c80ae39ab19e30fd56e175719b67b1c778ea632", hash = "sha256:42abfb3ce2c13ae008e498d27c80ae39ab19e30fd56e175719b67b1c778ea632" } + wheels = [{ url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_selection_a-0.2.0-py3-none-any.whl#sha256=65ff1ce26de8218278abb1ae190fe70d031de79833d85231112208672566b9c4", hash = "sha256:65ff1ce26de8218278abb1ae190fe70d031de79833d85231112208672566b9c4" }] [[distribution.dependencies]] name = "package-b" version = "2.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" [[distribution]] name = "package-b" version = "1.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" - sdist = { url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_selection_b-1.0.0.tar.gz#sha256=97f1098f4c89457ab2b16982990d487ac6ae2c664f8e22e822a086df71999dc1", hash = "sha256:97f1098f4c89457ab2b16982990d487ac6ae2c664f8e22e822a086df71999dc1" } - wheels = [{ url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_selection_b-1.0.0-py3-none-any.whl#sha256=aba998c3dfa70f4118a4587f636c96f5a2785081b733120cf81b6d762f67b1ca", hash = "sha256:aba998c3dfa70f4118a4587f636c96f5a2785081b733120cf81b6d762f67b1ca" }] + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" + sdist = { url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_selection_b-1.0.0.tar.gz#sha256=6f5ea28cadb8b5dfa15d32c9e38818f8f7150fc4f9a58e49aec4e10b23342be4", hash = "sha256:6f5ea28cadb8b5dfa15d32c9e38818f8f7150fc4f9a58e49aec4e10b23342be4" } + wheels = [{ url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_selection_b-1.0.0-py3-none-any.whl#sha256=d86ba6d371e152071be1e5bc902a5a54010e94592c8c7e7908870b96ad04d851", hash = "sha256:d86ba6d371e152071be1e5bc902a5a54010e94592c8c7e7908870b96ad04d851" }] [[distribution]] name = "package-b" version = "2.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" - sdist = { url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_selection_b-2.0.0.tar.gz#sha256=1f66e4ba827d2913827fa52cc9fd08491b16ab409fa31c40a2fe4e3cde91cb4a", hash = "sha256:1f66e4ba827d2913827fa52cc9fd08491b16ab409fa31c40a2fe4e3cde91cb4a" } - wheels = [{ url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_selection_b-2.0.0-py3-none-any.whl#sha256=ad1b23547813b9ac69b33d3fcf1896cd49a90cd8f957e954dbdd77b628d631cf", hash = "sha256:ad1b23547813b9ac69b33d3fcf1896cd49a90cd8f957e954dbdd77b628d631cf" }] + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" + sdist = { url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_selection_b-2.0.0.tar.gz#sha256=d32033ecdf37d605e4b3b3e88df6562bb7ca01c6ed3fb9a55ec078eccc1df9d1", hash = "sha256:d32033ecdf37d605e4b3b3e88df6562bb7ca01c6ed3fb9a55ec078eccc1df9d1" } + wheels = [{ url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_selection_b-2.0.0-py3-none-any.whl#sha256=535c038dec0bb33c867ee979fe8863734dd6fb913a94603dcbff42c62790f98b", hash = "sha256:535c038dec0bb33c867ee979fe8863734dd6fb913a94603dcbff42c62790f98b" }] [[distribution]] name = "project" @@ -420,23 +420,23 @@ fn fork_marker_selection() -> Result<()> { [[distribution.dependencies]] name = "package-a" version = "0.1.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" [[distribution.dependencies]] name = "package-a" version = "0.2.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" [[distribution.dependencies]] name = "package-b" version = "1.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" marker = "sys_platform == 'darwin'" [[distribution.dependencies]] name = "package-b" version = "2.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" marker = "sys_platform == 'linux'" "### ); @@ -502,12 +502,13 @@ fn fork_marker_track() -> Result<()> { '''fork-marker-track-b>=2.8; sys_platform == "linux"''', '''fork-marker-track-b<2.8; sys_platform == "darwin"''', ] + requires-python = ">=3.8" "###, )?; let mut cmd = context.lock_without_exclude_newer(); cmd.arg("--index-url") - .arg("https://astral-sh.github.io/packse/0.3.18/simple-html/"); + .arg("https://astral-sh.github.io/packse/0.3.24/simple-html/"); uv_snapshot!(filters, cmd, @r###" success: true exit_code: 0 @@ -515,7 +516,6 @@ fn fork_marker_track() -> Result<()> { ----- stderr ----- warning: `uv lock` is experimental and may change without warning. - warning: No `requires-python` field found in `project`. Defaulting to `>=3.8`. Resolved 6 packages in [TIME] "### ); @@ -532,48 +532,48 @@ fn fork_marker_track() -> Result<()> { [[distribution]] name = "package-a" version = "1.3.1" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" - sdist = { url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_track_a-1.3.1.tar.gz#sha256=b88e1c256f2f3b2f3d0cff5398fd6a1a17682f3b5fd736e08d44c313ed48ef37", hash = "sha256:b88e1c256f2f3b2f3d0cff5398fd6a1a17682f3b5fd736e08d44c313ed48ef37" } - wheels = [{ url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_track_a-1.3.1-py3-none-any.whl#sha256=8f2bd8bcd8f3fc2cfe64621d62a3a9404db665830f7a76db60307a80cf8e632f", hash = "sha256:8f2bd8bcd8f3fc2cfe64621d62a3a9404db665830f7a76db60307a80cf8e632f" }] + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" + sdist = { url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_track_a-1.3.1.tar.gz#sha256=ffc490c887058825e96a0cc4a270cf56b72f7f28b927c450086603317bb8c120", hash = "sha256:ffc490c887058825e96a0cc4a270cf56b72f7f28b927c450086603317bb8c120" } + wheels = [{ url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_track_a-1.3.1-py3-none-any.whl#sha256=79e82592fe6644839cdb6dc73d3d54fc543f0e0f28cce26e221a6c1e30072104", hash = "sha256:79e82592fe6644839cdb6dc73d3d54fc543f0e0f28cce26e221a6c1e30072104" }] [[distribution.dependencies]] name = "package-c" version = "1.10" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" marker = "implementation_name == 'iron'" [[distribution]] name = "package-a" version = "4.3.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" - sdist = { url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_track_a-4.3.0.tar.gz#sha256=46a0ab5d6b934f2b8c762893660483036a81ac1f8df9a6555e72a3b4859e1a75", hash = "sha256:46a0ab5d6b934f2b8c762893660483036a81ac1f8df9a6555e72a3b4859e1a75" } - wheels = [{ url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_track_a-4.3.0-py3-none-any.whl#sha256=73ad4b017bae8cb4743be03bc406f65594c92ec5038b0f56a4acb07873bfcaa5", hash = "sha256:73ad4b017bae8cb4743be03bc406f65594c92ec5038b0f56a4acb07873bfcaa5" }] + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" + sdist = { url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_track_a-4.3.0.tar.gz#sha256=ce810c2e0922cff256d3050167c0d2a041955d389d21280fd684ab986dfdb1f5", hash = "sha256:ce810c2e0922cff256d3050167c0d2a041955d389d21280fd684ab986dfdb1f5" } + wheels = [{ url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_track_a-4.3.0-py3-none-any.whl#sha256=fb90bca8d00206119df736f59a9c4e18e104a9321b8ea91f19400a119b77ef99", hash = "sha256:fb90bca8d00206119df736f59a9c4e18e104a9321b8ea91f19400a119b77ef99" }] [[distribution.dependencies]] name = "package-b" version = "2.8" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" [[distribution]] name = "package-b" version = "2.7" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" - sdist = { url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_track_b-2.7.tar.gz#sha256=25258fd52c9611c9e101138f9986ada5930f5bea08988d0356645c772a8162dd", hash = "sha256:25258fd52c9611c9e101138f9986ada5930f5bea08988d0356645c772a8162dd" } - wheels = [{ url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_track_b-2.7-py3-none-any.whl#sha256=be56f5850a343cb02dfc22e75eaa1009db675ac2f1275b78ba4089c6ea2f2808", hash = "sha256:be56f5850a343cb02dfc22e75eaa1009db675ac2f1275b78ba4089c6ea2f2808" }] + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" + sdist = { url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_track_b-2.7.tar.gz#sha256=855bf45837a4ba669a5850b14b0253cb138925fdd2b06a2f15c6582b8fabb8a0", hash = "sha256:855bf45837a4ba669a5850b14b0253cb138925fdd2b06a2f15c6582b8fabb8a0" } + wheels = [{ url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_track_b-2.7-py3-none-any.whl#sha256=106d0c1c60d67fcf1711029f58f34b770007fed24d087f2fb9cee91226dbdbba", hash = "sha256:106d0c1c60d67fcf1711029f58f34b770007fed24d087f2fb9cee91226dbdbba" }] [[distribution]] name = "package-b" version = "2.8" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" - sdist = { url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_track_b-2.8.tar.gz#sha256=7ec0f88f013fa0b75a4c88097799866617de4cae558b18ad0677f7cc65ad6628", hash = "sha256:7ec0f88f013fa0b75a4c88097799866617de4cae558b18ad0677f7cc65ad6628" } - wheels = [{ url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_track_b-2.8-py3-none-any.whl#sha256=d9969066117d846fe3a200df5bafc3b3279cc419f36f7275e6e55b2dbde2d5d1", hash = "sha256:d9969066117d846fe3a200df5bafc3b3279cc419f36f7275e6e55b2dbde2d5d1" }] + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" + sdist = { url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_track_b-2.8.tar.gz#sha256=2e14b0ff1fb7f5cf491bd31d876218adee1d6a208ff197dc30363cdf25262e80", hash = "sha256:2e14b0ff1fb7f5cf491bd31d876218adee1d6a208ff197dc30363cdf25262e80" } + wheels = [{ url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_track_b-2.8-py3-none-any.whl#sha256=7e2ea2b4f530fa04bec90cf131289ac7eaca1ae38267150587d418d42c814b7c", hash = "sha256:7e2ea2b4f530fa04bec90cf131289ac7eaca1ae38267150587d418d42c814b7c" }] [[distribution]] name = "package-c" version = "1.10" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" - sdist = { url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_track_c-1.10.tar.gz#sha256=6f4a62bec34fbda0e605dc9acb40af318b1d789816d81cbd0bc7c60595de5930", hash = "sha256:6f4a62bec34fbda0e605dc9acb40af318b1d789816d81cbd0bc7c60595de5930" } - wheels = [{ url = "https://astral-sh.github.io/packse/0.3.18/files/fork_marker_track_c-1.10-py3-none-any.whl#sha256=19791f8bd3bad9a76be5477e1753dc2a4e797d163bef90fdfd99462c271ed6ff", hash = "sha256:19791f8bd3bad9a76be5477e1753dc2a4e797d163bef90fdfd99462c271ed6ff" }] + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" + sdist = { url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_track_c-1.10.tar.gz#sha256=c89006d893254790b0fcdd1b33520241c8ff66ab950c6752b745e006bdeff144", hash = "sha256:c89006d893254790b0fcdd1b33520241c8ff66ab950c6752b745e006bdeff144" } + wheels = [{ url = "https://astral-sh.github.io/packse/0.3.24/files/fork_marker_track_c-1.10-py3-none-any.whl#sha256=6894f06e085884d812ec5e929ed42e7e01a1c7c95fd5ab30781541e4cd94b58d", hash = "sha256:6894f06e085884d812ec5e929ed42e7e01a1c7c95fd5ab30781541e4cd94b58d" }] [[distribution]] name = "project" @@ -584,23 +584,23 @@ fn fork_marker_track() -> Result<()> { [[distribution.dependencies]] name = "package-a" version = "1.3.1" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" [[distribution.dependencies]] name = "package-a" version = "4.3.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" [[distribution.dependencies]] name = "package-b" version = "2.7" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" marker = "sys_platform == 'darwin'" [[distribution.dependencies]] name = "package-b" version = "2.8" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" marker = "sys_platform == 'linux'" "### ); @@ -652,12 +652,13 @@ fn fork_non_fork_marker_transitive() -> Result<()> { '''fork-non-fork-marker-transitive-a==1.0.0''', '''fork-non-fork-marker-transitive-b==1.0.0''', ] + requires-python = ">=3.8" "###, )?; let mut cmd = context.lock_without_exclude_newer(); cmd.arg("--index-url") - .arg("https://astral-sh.github.io/packse/0.3.18/simple-html/"); + .arg("https://astral-sh.github.io/packse/0.3.24/simple-html/"); uv_snapshot!(filters, cmd, @r###" success: true exit_code: 0 @@ -665,7 +666,6 @@ fn fork_non_fork_marker_transitive() -> Result<()> { ----- stderr ----- warning: `uv lock` is experimental and may change without warning. - warning: No `requires-python` field found in `project`. Defaulting to `>=3.8`. Resolved 4 packages in [TIME] "### ); @@ -682,35 +682,35 @@ fn fork_non_fork_marker_transitive() -> Result<()> { [[distribution]] name = "package-a" version = "1.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" - sdist = { url = "https://astral-sh.github.io/packse/0.3.18/files/fork_non_fork_marker_transitive_a-1.0.0.tar.gz#sha256=017f775164ac5e33682262bbd44922938737bb8d7258161abb65d8d22f7f0749", hash = "sha256:017f775164ac5e33682262bbd44922938737bb8d7258161abb65d8d22f7f0749" } - wheels = [{ url = "https://astral-sh.github.io/packse/0.3.18/files/fork_non_fork_marker_transitive_a-1.0.0-py3-none-any.whl#sha256=d0ffdf00cba31099cc02d1419f1d2a0c8add5efe7c916b5e12bc23c8f7fdfb4c", hash = "sha256:d0ffdf00cba31099cc02d1419f1d2a0c8add5efe7c916b5e12bc23c8f7fdfb4c" }] + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" + sdist = { url = "https://astral-sh.github.io/packse/0.3.24/files/fork_non_fork_marker_transitive_a-1.0.0.tar.gz#sha256=68cff02c9f4a0b3014fdce524982a3cbf3a2ecaf0291c32c824cadb19f1e7cd0", hash = "sha256:68cff02c9f4a0b3014fdce524982a3cbf3a2ecaf0291c32c824cadb19f1e7cd0" } + wheels = [{ url = "https://astral-sh.github.io/packse/0.3.24/files/fork_non_fork_marker_transitive_a-1.0.0-py3-none-any.whl#sha256=589fb29588410fe1685650a1151e0f33131c9b295506af6babe16e98dad9da59", hash = "sha256:589fb29588410fe1685650a1151e0f33131c9b295506af6babe16e98dad9da59" }] [[distribution.dependencies]] name = "package-c" version = "2.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" marker = "sys_platform == 'linux'" [[distribution]] name = "package-b" version = "1.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" - sdist = { url = "https://astral-sh.github.io/packse/0.3.18/files/fork_non_fork_marker_transitive_b-1.0.0.tar.gz#sha256=f930b038c81f712230deda8d3b7d2a9a9758b71e86313722747e0ecd44d86e4a", hash = "sha256:f930b038c81f712230deda8d3b7d2a9a9758b71e86313722747e0ecd44d86e4a" } - wheels = [{ url = "https://astral-sh.github.io/packse/0.3.18/files/fork_non_fork_marker_transitive_b-1.0.0-py3-none-any.whl#sha256=d50cf9f9bcff0c90e969d6eba899bbbcb3c09666217c2c9a8011cdef089070a4", hash = "sha256:d50cf9f9bcff0c90e969d6eba899bbbcb3c09666217c2c9a8011cdef089070a4" }] + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" + sdist = { url = "https://astral-sh.github.io/packse/0.3.24/files/fork_non_fork_marker_transitive_b-1.0.0.tar.gz#sha256=ae7abe9cde79b810f91dff7329b63788a8253250053fe4e82563f0b2d0877182", hash = "sha256:ae7abe9cde79b810f91dff7329b63788a8253250053fe4e82563f0b2d0877182" } + wheels = [{ url = "https://astral-sh.github.io/packse/0.3.24/files/fork_non_fork_marker_transitive_b-1.0.0-py3-none-any.whl#sha256=545bea70509188de241037b506a1c38dbabb4e52042bb88ca836c04d8103fc48", hash = "sha256:545bea70509188de241037b506a1c38dbabb4e52042bb88ca836c04d8103fc48" }] [[distribution.dependencies]] name = "package-c" version = "2.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" marker = "sys_platform == 'darwin'" [[distribution]] name = "package-c" version = "2.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" - sdist = { url = "https://astral-sh.github.io/packse/0.3.18/files/fork_non_fork_marker_transitive_c-2.0.0.tar.gz#sha256=c989314fe5534401e9b2374e9b0461c9d44c237853d9122bc7d9aee006ee0c34", hash = "sha256:c989314fe5534401e9b2374e9b0461c9d44c237853d9122bc7d9aee006ee0c34" } - wheels = [{ url = "https://astral-sh.github.io/packse/0.3.18/files/fork_non_fork_marker_transitive_c-2.0.0-py3-none-any.whl#sha256=661def8c77b372df8146049485a75678ecee810518fb7cba024b609920bdef74", hash = "sha256:661def8c77b372df8146049485a75678ecee810518fb7cba024b609920bdef74" }] + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" + sdist = { url = "https://astral-sh.github.io/packse/0.3.24/files/fork_non_fork_marker_transitive_c-2.0.0.tar.gz#sha256=ffab9124854f64c8b5059ccaed481547f54abac868ba98aa6a454c0163cdb1c7", hash = "sha256:ffab9124854f64c8b5059ccaed481547f54abac868ba98aa6a454c0163cdb1c7" } + wheels = [{ url = "https://astral-sh.github.io/packse/0.3.24/files/fork_non_fork_marker_transitive_c-2.0.0-py3-none-any.whl#sha256=80495d1a9075682f6e9dc8d474afd98a3324d32c57c65769b573f281105f3d08", hash = "sha256:80495d1a9075682f6e9dc8d474afd98a3324d32c57c65769b573f281105f3d08" }] [[distribution]] name = "project" @@ -721,12 +721,12 @@ fn fork_non_fork_marker_transitive() -> Result<()> { [[distribution.dependencies]] name = "package-a" version = "1.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" [[distribution.dependencies]] name = "package-b" version = "1.0.0" - source = "registry+https://astral-sh.github.io/packse/0.3.18/simple-html/" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" "### ); }); @@ -778,12 +778,13 @@ fn fork_non_local_fork_marker_direct() -> Result<()> { '''fork-non-local-fork-marker-direct-a==1.0.0; sys_platform == "linux"''', '''fork-non-local-fork-marker-direct-b==1.0.0; sys_platform == "darwin"''', ] + requires-python = ">=3.8" "###, )?; let mut cmd = context.lock_without_exclude_newer(); cmd.arg("--index-url") - .arg("https://astral-sh.github.io/packse/0.3.18/simple-html/"); + .arg("https://astral-sh.github.io/packse/0.3.24/simple-html/"); uv_snapshot!(filters, cmd, @r###" success: false exit_code: 1 @@ -791,7 +792,6 @@ fn fork_non_local_fork_marker_direct() -> Result<()> { ----- stderr ----- warning: `uv lock` is experimental and may change without warning. - warning: No `requires-python` field found in `project`. Defaulting to `>=3.8`. × No solution found when resolving dependencies: ╰─▶ Because package-b{sys_platform == 'darwin'}==1.0.0 depends on package-c>=2.0.0 and package-a{sys_platform == 'linux'}==1.0.0 depends on package-c<2.0.0, we can conclude that package-a{sys_platform == 'linux'}==1.0.0 and package-b{sys_platform == 'darwin'}==1.0.0 are incompatible. And because project==0.1.0 depends on package-a{sys_platform == 'linux'}==1.0.0 and package-b{sys_platform == 'darwin'}==1.0.0, we can conclude that project==0.1.0 cannot be used. @@ -852,12 +852,13 @@ fn fork_non_local_fork_marker_transitive() -> Result<()> { '''fork-non-local-fork-marker-transitive-a==1.0.0''', '''fork-non-local-fork-marker-transitive-b==1.0.0''', ] + requires-python = ">=3.8" "###, )?; let mut cmd = context.lock_without_exclude_newer(); cmd.arg("--index-url") - .arg("https://astral-sh.github.io/packse/0.3.18/simple-html/"); + .arg("https://astral-sh.github.io/packse/0.3.24/simple-html/"); uv_snapshot!(filters, cmd, @r###" success: false exit_code: 1 @@ -865,7 +866,6 @@ fn fork_non_local_fork_marker_transitive() -> Result<()> { ----- stderr ----- warning: `uv lock` is experimental and may change without warning. - warning: No `requires-python` field found in `project`. Defaulting to `>=3.8`. × No solution found when resolving dependencies: ╰─▶ Because package-b==1.0.0 depends on package-c{sys_platform == 'darwin'}>=2.0.0 and only package-c{sys_platform == 'darwin'}<=2.0.0 is available, we can conclude that package-b==1.0.0 depends on package-c{sys_platform == 'darwin'}==2.0.0. And because only the following versions of package-c{sys_platform == 'linux'} are available: @@ -879,3 +879,304 @@ fn fork_non_local_fork_marker_transitive() -> Result<()> { Ok(()) } + +/// This tests that a `Requires-Python` specifier will result in the exclusion of +/// dependency specifications that cannot possibly satisfy it. In particular, this +/// is tested via the `python_full_version` marker with a pre-release version. +/// +/// ```text +/// fork-requires-python-full-prerelease +/// ├── environment +/// │ └── python3.12 +/// ├── root +/// │ └── requires a==1.0.0; python_full_version == "3.9b1" +/// │ └── satisfied by a-1.0.0 +/// └── a +/// └── a-1.0.0 +/// └── requires python>=3.8 +/// ``` +#[test] +fn fork_requires_python_full_prerelease() -> Result<()> { + let context = TestContext::new("3.12"); + + // In addition to the standard filters, swap out package names for shorter messages + let mut filters = context.filters(); + filters.push((r"fork-requires-python-full-prerelease-", "package-")); + + let pyproject_toml = context.temp_dir.child("pyproject.toml"); + pyproject_toml.write_str( + r###" + [project] + name = "project" + version = "0.1.0" + dependencies = [ + '''fork-requires-python-full-prerelease-a==1.0.0; python_full_version == "3.9b1"''', + ] + requires-python = ">=3.10" + "###, + )?; + + let mut cmd = context.lock_without_exclude_newer(); + cmd.arg("--index-url") + .arg("https://astral-sh.github.io/packse/0.3.24/simple-html/"); + uv_snapshot!(filters, cmd, @r###" + success: true + exit_code: 0 + ----- stdout ----- + + ----- stderr ----- + warning: `uv lock` is experimental and may change without warning. + Resolved 1 package in [TIME] + "### + ); + + let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?; + insta::with_settings!({ + filters => filters, + }, { + assert_snapshot!( + lock, @r###" + version = 1 + requires-python = ">=3.10" + + [[distribution]] + name = "project" + version = "0.1.0" + source = "editable+." + sdist = { path = "." } + "### + ); + }); + + Ok(()) +} + +/// This tests that a `Requires-Python` specifier will result in the exclusion of +/// dependency specifications that cannot possibly satisfy it. In particular, this +/// is tested via the `python_full_version` marker instead of the more common +/// `python_version` marker. +/// +/// ```text +/// fork-requires-python-full +/// ├── environment +/// │ └── python3.12 +/// ├── root +/// │ └── requires a==1.0.0; python_full_version == "3.9" +/// │ └── satisfied by a-1.0.0 +/// └── a +/// └── a-1.0.0 +/// └── requires python>=3.8 +/// ``` +#[test] +fn fork_requires_python_full() -> Result<()> { + let context = TestContext::new("3.12"); + + // In addition to the standard filters, swap out package names for shorter messages + let mut filters = context.filters(); + filters.push((r"fork-requires-python-full-", "package-")); + + let pyproject_toml = context.temp_dir.child("pyproject.toml"); + pyproject_toml.write_str( + r###" + [project] + name = "project" + version = "0.1.0" + dependencies = [ + '''fork-requires-python-full-a==1.0.0; python_full_version == "3.9"''', + ] + requires-python = ">=3.10" + "###, + )?; + + let mut cmd = context.lock_without_exclude_newer(); + cmd.arg("--index-url") + .arg("https://astral-sh.github.io/packse/0.3.24/simple-html/"); + uv_snapshot!(filters, cmd, @r###" + success: true + exit_code: 0 + ----- stdout ----- + + ----- stderr ----- + warning: `uv lock` is experimental and may change without warning. + Resolved 1 package in [TIME] + "### + ); + + let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?; + insta::with_settings!({ + filters => filters, + }, { + assert_snapshot!( + lock, @r###" + version = 1 + requires-python = ">=3.10" + + [[distribution]] + name = "project" + version = "0.1.0" + source = "editable+." + sdist = { path = "." } + "### + ); + }); + + Ok(()) +} + +/// This tests that a `Requires-Python` specifier that includes a Python patch +/// version will not result in excluded a dependency specification with a +/// `python_version == '3.10'` marker. This is a regression test for the universal +/// resolver where it would convert a `Requires-Python: >=3.10.1` specifier into a +/// `python_version >= '3.10.1'` marker expression, which would be considered +/// disjoint with `python_version == '3.10'`. Thus, the dependency `a` below was +/// erroneously excluded. It should be included. +/// +/// ```text +/// fork-requires-python-patch-overlap +/// ├── environment +/// │ └── python3.12 +/// ├── root +/// │ └── requires a==1.0.0; python_version == "3.10" +/// │ └── satisfied by a-1.0.0 +/// └── a +/// └── a-1.0.0 +/// └── requires python>=3.8 +/// ``` +#[test] +fn fork_requires_python_patch_overlap() -> Result<()> { + let context = TestContext::new("3.12"); + + // In addition to the standard filters, swap out package names for shorter messages + let mut filters = context.filters(); + filters.push((r"fork-requires-python-patch-overlap-", "package-")); + + let pyproject_toml = context.temp_dir.child("pyproject.toml"); + pyproject_toml.write_str( + r###" + [project] + name = "project" + version = "0.1.0" + dependencies = [ + '''fork-requires-python-patch-overlap-a==1.0.0; python_version == "3.10"''', + ] + requires-python = ">=3.10.1" + "###, + )?; + + let mut cmd = context.lock_without_exclude_newer(); + cmd.arg("--index-url") + .arg("https://astral-sh.github.io/packse/0.3.24/simple-html/"); + uv_snapshot!(filters, cmd, @r###" + success: true + exit_code: 0 + ----- stdout ----- + + ----- stderr ----- + warning: `uv lock` is experimental and may change without warning. + Resolved 2 packages in [TIME] + "### + ); + + let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?; + insta::with_settings!({ + filters => filters, + }, { + assert_snapshot!( + lock, @r###" + version = 1 + requires-python = ">=3.10.1" + + [[distribution]] + name = "package-a" + version = "1.0.0" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" + sdist = { url = "https://astral-sh.github.io/packse/0.3.24/files/fork_requires_python_patch_overlap_a-1.0.0.tar.gz#sha256=ac2820ee4808788674295192d79a709e3259aa4eef5b155e77f719ad4eaa324d", hash = "sha256:ac2820ee4808788674295192d79a709e3259aa4eef5b155e77f719ad4eaa324d" } + wheels = [{ url = "https://astral-sh.github.io/packse/0.3.24/files/fork_requires_python_patch_overlap_a-1.0.0-py3-none-any.whl#sha256=9c8e127993ded58b011f08453d4103f71f12aa2e8fb61e755061fb56128214e2", hash = "sha256:9c8e127993ded58b011f08453d4103f71f12aa2e8fb61e755061fb56128214e2" }] + + [[distribution]] + name = "project" + version = "0.1.0" + source = "editable+." + sdist = { path = "." } + + [[distribution.dependencies]] + name = "package-a" + version = "1.0.0" + source = "registry+https://astral-sh.github.io/packse/0.3.24/simple-html/" + marker = "python_version == '3.10'" + "### + ); + }); + + Ok(()) +} + +/// This tests that a `Requires-Python` specifier will result in the exclusion of +/// dependency specifications that cannot possibly satisfy it. +/// +/// ```text +/// fork-requires-python +/// ├── environment +/// │ └── python3.12 +/// ├── root +/// │ └── requires a==1.0.0; python_version == "3.9" +/// │ └── satisfied by a-1.0.0 +/// └── a +/// └── a-1.0.0 +/// └── requires python>=3.8 +/// ``` +#[test] +fn fork_requires_python() -> Result<()> { + let context = TestContext::new("3.12"); + + // In addition to the standard filters, swap out package names for shorter messages + let mut filters = context.filters(); + filters.push((r"fork-requires-python-", "package-")); + + let pyproject_toml = context.temp_dir.child("pyproject.toml"); + pyproject_toml.write_str( + r###" + [project] + name = "project" + version = "0.1.0" + dependencies = [ + '''fork-requires-python-a==1.0.0; python_version == "3.9"''', + ] + requires-python = ">=3.10" + "###, + )?; + + let mut cmd = context.lock_without_exclude_newer(); + cmd.arg("--index-url") + .arg("https://astral-sh.github.io/packse/0.3.24/simple-html/"); + uv_snapshot!(filters, cmd, @r###" + success: true + exit_code: 0 + ----- stdout ----- + + ----- stderr ----- + warning: `uv lock` is experimental and may change without warning. + Resolved 1 package in [TIME] + "### + ); + + let lock = fs_err::read_to_string(context.temp_dir.join("uv.lock"))?; + insta::with_settings!({ + filters => filters, + }, { + assert_snapshot!( + lock, @r###" + version = 1 + requires-python = ">=3.10" + + [[distribution]] + name = "project" + version = "0.1.0" + source = "editable+." + sdist = { path = "." } + "### + ); + }); + + Ok(()) +} diff --git a/crates/uv/tests/pip_compile_scenarios.rs b/crates/uv/tests/pip_compile_scenarios.rs index bf282d24c793..0bc14c92a2b3 100644 --- a/crates/uv/tests/pip_compile_scenarios.rs +++ b/crates/uv/tests/pip_compile_scenarios.rs @@ -1,7 +1,7 @@ //! DO NOT EDIT //! //! Generated with `./scripts/sync_scenarios.sh` -//! Scenarios from +//! Scenarios from //! #![cfg(all(feature = "python", feature = "pypi", unix))] @@ -27,9 +27,9 @@ fn command(context: &TestContext, python_versions: &[&str]) -> Command { .arg("compile") .arg("requirements.in") .arg("--index-url") - .arg("https://astral-sh.github.io/packse/0.3.18/simple-html/") + .arg("https://astral-sh.github.io/packse/0.3.24/simple-html/") .arg("--find-links") - .arg("https://raw.githubusercontent.com/astral-sh/packse/0.3.18/vendor/links.html") + .arg("https://raw.githubusercontent.com/astral-sh/packse/0.3.24/vendor/links.html") .arg("--cache-dir") .arg(context.cache_dir.path()) .env("VIRTUAL_ENV", context.venv.as_os_str()) diff --git a/crates/uv/tests/pip_install_scenarios.rs b/crates/uv/tests/pip_install_scenarios.rs index bb6404c4d216..8297d4ba1d6e 100644 --- a/crates/uv/tests/pip_install_scenarios.rs +++ b/crates/uv/tests/pip_install_scenarios.rs @@ -1,7 +1,7 @@ //! DO NOT EDIT //! //! Generated with `./scripts/sync_scenarios.sh` -//! Scenarios from +//! Scenarios from //! #![cfg(all(feature = "python", feature = "pypi", unix))] @@ -46,9 +46,9 @@ fn command(context: &TestContext) -> Command { .arg("pip") .arg("install") .arg("--index-url") - .arg("https://astral-sh.github.io/packse/0.3.18/simple-html/") + .arg("https://astral-sh.github.io/packse/0.3.24/simple-html/") .arg("--find-links") - .arg("https://raw.githubusercontent.com/astral-sh/packse/0.3.18/vendor/links.html") + .arg("https://raw.githubusercontent.com/astral-sh/packse/0.3.24/vendor/links.html") .arg("--cache-dir") .arg(context.cache_dir.path()) .env("VIRTUAL_ENV", context.venv.as_os_str()) @@ -3530,8 +3530,8 @@ fn package_only_prereleases_boundary() { "###); // Since there are only prerelease versions of `a` available, a prerelease is - // allowed. Since the user did not explicitly request a pre-release, pre-releases at - // the boundary should not be selected. + // allowed. Since the user did not explicitly request a pre-release, pre-releases + // at the boundary should not be selected. assert_installed( &context.venv, "package_only_prereleases_boundary_a",