From 7294fce8c59affe88fe265bc7d7e041490f1df35 Mon Sep 17 00:00:00 2001 From: nichmor Date: Mon, 23 Sep 2024 17:15:09 +0200 Subject: [PATCH] fix: allow exact yanked packages (#2116) Co-authored-by: Tim de Jager --- src/lock_file/resolve/pypi.rs | 6 ++++-- tests/wheel_tests/wheels.toml | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lock_file/resolve/pypi.rs b/src/lock_file/resolve/pypi.rs index 9d4b8ff25..db70df7b6 100644 --- a/src/lock_file/resolve/pypi.rs +++ b/src/lock_file/resolve/pypi.rs @@ -397,6 +397,8 @@ pub async fn resolve_pypi( .into_diagnostic() .context("error creating requires-python for solver")?; + let markers = ResolverMarkers::SpecificEnvironment(marker_environment.into()); + let fallback_provider = DefaultResolverProvider::new( DistributionDatabase::new( ®istry_client, @@ -406,7 +408,7 @@ pub async fn resolve_pypi( &flat_index, Some(&tags), Some(&requires_python), - AllowedYanks::default(), + AllowedYanks::from_manifest(&manifest, &markers, options.dependency_mode), &context.hash_strategy, options.exclude_newer, &context.build_options, @@ -427,7 +429,7 @@ pub async fn resolve_pypi( manifest, options, &context.hash_strategy, - ResolverMarkers::SpecificEnvironment(marker_environment.into()), + markers, &PythonRequirement::from_python_version(&interpreter, &python_version), &resolver_in_memory_index, &git_resolver, diff --git a/tests/wheel_tests/wheels.toml b/tests/wheel_tests/wheels.toml index 711b22b80..642a23d07 100644 --- a/tests/wheel_tests/wheels.toml +++ b/tests/wheel_tests/wheels.toml @@ -17,6 +17,7 @@ pytest-benchmark = "*" pyvista = "*" ruff = "*" scipy = "*" +setuptools-scm = "6.2.0" taichi = "*" trimesh = "*" typeguard = "*"