From 31bf8eb43bc6beef0436a1c2fd45c9731c3080f3 Mon Sep 17 00:00:00 2001 From: konsti Date: Wed, 16 Oct 2024 17:39:23 +0200 Subject: [PATCH] Update PubGrub (#8245) --- Cargo.lock | 2 +- Cargo.toml | 2 +- crates/uv/tests/it/pip_install_scenarios.rs | 36 ++++++++++----------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 999ffeea0..afeddab02 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2479,7 +2479,7 @@ dependencies = [ [[package]] name = "pubgrub" version = "0.2.1" -source = "git+https://github.com/astral-sh/pubgrub?rev=388685a8711092971930986644cfed152d1a1f6c#388685a8711092971930986644cfed152d1a1f6c" +source = "git+https://github.com/astral-sh/pubgrub?rev=19c77268c0ad5f69d7e12126e0cfacfbba466481#19c77268c0ad5f69d7e12126e0cfacfbba466481" dependencies = [ "indexmap", "log", diff --git a/Cargo.toml b/Cargo.toml index 52d333871..eea0858ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -124,7 +124,7 @@ pathdiff = { version = "0.2.1" } petgraph = { version = "0.6.5" } platform-info = { version = "2.0.3" } proc-macro2 = { version = "1.0.86" } -pubgrub = { git = "https://github.com/astral-sh/pubgrub", rev = "388685a8711092971930986644cfed152d1a1f6c" } +pubgrub = { git = "https://github.com/astral-sh/pubgrub", rev = "19c77268c0ad5f69d7e12126e0cfacfbba466481" } quote = { version = "1.0.37" } rayon = { version = "1.10.0" } reflink-copy = { version = "0.1.19" } diff --git a/crates/uv/tests/it/pip_install_scenarios.rs b/crates/uv/tests/it/pip_install_scenarios.rs index 623639b25..7116d2b4f 100644 --- a/crates/uv/tests/it/pip_install_scenarios.rs +++ b/crates/uv/tests/it/pip_install_scenarios.rs @@ -335,30 +335,30 @@ fn excluded_only_compatible_version() { uv_snapshot!(filters, command(&context) .arg("excluded-only-compatible-version-a!=2.0.0") .arg("excluded-only-compatible-version-b<3.0.0,>=2.0.0") - , @r#" + , @r###" success: false exit_code: 1 ----- stdout ----- ----- stderr ----- × No solution found when resolving dependencies: - ╰─▶ Because only the following versions of package-a are available: + ╰─▶ Because package-a==1.0.0 depends on package-b==1.0.0 and only the following versions of package-a are available: package-a==1.0.0 package-a==2.0.0 package-a==3.0.0 - and package-a==1.0.0 depends on package-b==1.0.0, we can conclude that package-a<2.0.0 depends on package-b==1.0.0. + we can conclude that package-a<2.0.0 depends on package-b==1.0.0. And because package-a==3.0.0 depends on package-b==3.0.0, we can conclude that all of: package-a<2.0.0 package-a>2.0.0 depend on one of: - package-b==1.0.0 - package-b==3.0.0 + package-b<=1.0.0 + package-b>=3.0.0 And because you require one of: package-a<2.0.0 package-a>2.0.0 and package-b>=2.0.0,<3.0.0, we can conclude that your requirements are unsatisfiable. - "#); + "###); // Only `a==1.2.0` is available since `a==1.0.0` and `a==3.0.0` require // incompatible versions of `b`. The user has excluded that version of `a` so @@ -1167,16 +1167,16 @@ fn transitive_incompatible_with_root_version() { uv_snapshot!(filters, command(&context) .arg("transitive-incompatible-with-root-version-a") .arg("transitive-incompatible-with-root-version-b==1.0.0") - , @r#" + , @r###" success: false exit_code: 1 ----- stdout ----- ----- stderr ----- × No solution found when resolving dependencies: - ╰─▶ Because package-a==1.0.0 depends on package-b==2.0.0 and only package-a==1.0.0 is available, we can conclude that all versions of package-a depend on package-b==2.0.0. + ╰─▶ Because only package-a==1.0.0 is available and package-a==1.0.0 depends on package-b==2.0.0, we can conclude that all versions of package-a depend on package-b==2.0.0. And because you require package-a and package-b==1.0.0, we can conclude that your requirements are unsatisfiable. - "#); + "###); assert_not_installed( &context.venv, @@ -1556,16 +1556,16 @@ fn local_transitive_greater_than() { uv_snapshot!(filters, command(&context) .arg("local-transitive-greater-than-a") .arg("local-transitive-greater-than-b==2.0.0+foo") - , @r#" + , @r###" success: false exit_code: 1 ----- stdout ----- ----- stderr ----- × No solution found when resolving dependencies: - ╰─▶ Because package-a==1.0.0 depends on package-b>2.0.0 and only package-a==1.0.0 is available, we can conclude that all versions of package-a depend on package-b>2.0.0. + ╰─▶ Because only package-a==1.0.0 is available and package-a==1.0.0 depends on package-b>2.0.0, we can conclude that all versions of package-a depend on package-b>2.0.0. And because you require package-a and package-b==2.0.0+foo, we can conclude that your requirements are unsatisfiable. - "#); + "###); assert_not_installed( &context.venv, @@ -1667,16 +1667,16 @@ fn local_transitive_less_than() { uv_snapshot!(filters, command(&context) .arg("local-transitive-less-than-a") .arg("local-transitive-less-than-b==2.0.0+foo") - , @r#" + , @r###" success: false exit_code: 1 ----- stdout ----- ----- stderr ----- × No solution found when resolving dependencies: - ╰─▶ Because package-a==1.0.0 depends on package-b<2.0.0 and only package-a==1.0.0 is available, we can conclude that all versions of package-a depend on package-b<2.0.0. + ╰─▶ Because only package-a==1.0.0 is available and package-a==1.0.0 depends on package-b<2.0.0, we can conclude that all versions of package-a depend on package-b<2.0.0. And because you require package-a and package-b==2.0.0+foo, we can conclude that your requirements are unsatisfiable. - "#); + "###); assert_not_installed( &context.venv, @@ -1826,16 +1826,16 @@ fn local_transitive_conflicting() { uv_snapshot!(filters, command(&context) .arg("local-transitive-conflicting-a") .arg("local-transitive-conflicting-b==2.0.0+foo") - , @r#" + , @r###" success: false exit_code: 1 ----- stdout ----- ----- stderr ----- × No solution found when resolving dependencies: - ╰─▶ Because package-a==1.0.0 depends on package-b==2.0.0+bar and only package-a==1.0.0 is available, we can conclude that all versions of package-a depend on package-b==2.0.0+bar. + ╰─▶ Because only package-a==1.0.0 is available and package-a==1.0.0 depends on package-b==2.0.0+bar, we can conclude that all versions of package-a depend on package-b==2.0.0+bar. And because you require package-a and package-b==2.0.0+foo, we can conclude that your requirements are unsatisfiable. - "#); + "###); assert_not_installed( &context.venv,