Skip to content

Commit

Permalink
Update Packse snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Nov 4, 2024
1 parent ad4b2ab commit 6562100
Showing 2 changed files with 53 additions and 43 deletions.
84 changes: 53 additions & 31 deletions crates/uv/tests/it/pip_install_scenarios.rs
Original file line number Diff line number Diff line change
@@ -334,10 +334,10 @@ fn dependency_excludes_non_contiguous_range_of_compatible_versions() {
----- stderr -----
× No solution found when resolving dependencies:
╰─▶ Because package-a==1.0.0 depends on package-b==1.0.0 and only the following versions of package-a are available:
╰─▶ Because only the following versions of package-a are available:
package-a==1.0.0
package-a>2.0.0,<=3.0.0
we can conclude that package-a<2.0.0 depends on package-b==1.0.0. (1)
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. (1)
Because only the following versions of package-c are available:
package-c==1.0.0
@@ -445,10 +445,10 @@ fn dependency_excludes_range_of_compatible_versions() {
----- stderr -----
× No solution found when resolving dependencies:
╰─▶ Because package-a==1.0.0 depends on package-b==1.0.0 and only the following versions of package-a are available:
╰─▶ Because only the following versions of package-a are available:
package-a==1.0.0
package-a>2.0.0,<=3.0.0
we can conclude that package-a<2.0.0 depends on package-b==1.0.0. (1)
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. (1)
Because only the following versions of package-c are available:
package-c==1.0.0
@@ -529,17 +529,17 @@ fn excluded_only_compatible_version() {
----- stderr -----
× No solution found when resolving dependencies:
╰─▶ Because package-a==1.0.0 depends on package-b==1.0.0 and only the following versions of package-a are available:
╰─▶ Because only the following versions of package-a are available:
package-a==1.0.0
package-a==2.0.0
package-a==3.0.0
we can conclude that package-a<2.0.0 depends on package-b==1.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.
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
@@ -1369,19 +1369,22 @@ fn local_less_than_or_equal() {
uv_snapshot!(filters, command(&context)
.arg("local-less-than-or-equal-a<=1.2.3")
, @r###"
success: false
exit_code: 1
success: true
exit_code: 0
----- stdout -----
----- stderr -----
× No solution found when resolving dependencies:
╰─▶ Because only package-a==1.2.3+foo is available and you require package-a<=1.2.3, we can conclude that your requirements are unsatisfiable.
Resolved 1 package in [TIME]
Prepared 1 package in [TIME]
Installed 1 package in [TIME]
+ package-a==1.2.3+foo
"###);

// The version '1.2.3+foo' satisfies the constraint '<=1.2.3'.
assert_not_installed(
assert_installed(
&context.venv,
"local_less_than_or_equal_a",
"1.2.3+foo",
&context.temp_dir,
);
}
@@ -1500,14 +1503,14 @@ fn local_not_used_with_sdist() {
Resolved 1 package in [TIME]
Prepared 1 package in [TIME]
Installed 1 package in [TIME]
+ package-a==1.2.3
+ package-a==1.2.3+foo
"###);

// The version '1.2.3' with an sdist satisfies the constraint '==1.2.3'.
assert_installed(
&context.venv,
"local_not_used_with_sdist_a",
"1.2.3",
"1.2.3+foo",
&context.temp_dir,
);
}
@@ -1535,17 +1538,24 @@ fn local_simple() {
uv_snapshot!(filters, command(&context)
.arg("local-simple-a==1.2.3")
, @r###"
success: false
exit_code: 1
success: true
exit_code: 0
----- stdout -----
----- stderr -----
× No solution found when resolving dependencies:
╰─▶ Because there is no version of package-a==1.2.3 and you require package-a==1.2.3, we can conclude that your requirements are unsatisfiable.
Resolved 1 package in [TIME]
Prepared 1 package in [TIME]
Installed 1 package in [TIME]
+ package-a==1.2.3+foo
"###);

// The version '1.2.3+foo' satisfies the constraint '==1.2.3'.
assert_not_installed(&context.venv, "local_simple_a", &context.temp_dir);
assert_installed(
&context.venv,
"local_simple_a",
"1.2.3+foo",
&context.temp_dir,
);
}

/// A dependency depends on a conflicting local version of a direct dependency, but we can backtrack to a compatible version.
@@ -1693,20 +1703,29 @@ fn local_transitive_confounding() {
uv_snapshot!(filters, command(&context)
.arg("local-transitive-confounding-a")
, @r###"
success: false
exit_code: 1
success: true
exit_code: 0
----- stdout -----
----- stderr -----
× No solution found when resolving dependencies:
╰─▶ Because package-b==2.0.0 has no wheels with a matching Python ABI tag and package-a==1.0.0 depends on package-b==2.0.0, we can conclude that package-a==1.0.0 cannot be used.
And because only package-a==1.0.0 is available and you require package-a, we can conclude that your requirements are unsatisfiable.
Resolved 2 packages in [TIME]
Prepared 2 packages in [TIME]
Installed 2 packages in [TIME]
+ package-a==1.0.0
+ package-b==2.0.0+foo
"###);

// The version '2.0.0+foo' satisfies the constraint '==2.0.0'.
assert_not_installed(
assert_installed(
&context.venv,
"local_transitive_confounding_a",
"1.0.0",
&context.temp_dir,
);
assert_installed(
&context.venv,
"local_transitive_confounding_b",
"2.0.0+foo",
&context.temp_dir,
);
}
@@ -2011,19 +2030,22 @@ fn local_used_without_sdist() {
uv_snapshot!(filters, command(&context)
.arg("local-used-without-sdist-a==1.2.3")
, @r###"
success: false
exit_code: 1
success: true
exit_code: 0
----- stdout -----
----- stderr -----
× No solution found when resolving dependencies:
╰─▶ Because package-a==1.2.3 has no wheels with a matching Python ABI tag and you require package-a==1.2.3, we can conclude that your requirements are unsatisfiable.
Resolved 1 package in [TIME]
Prepared 1 package in [TIME]
Installed 1 package in [TIME]
+ package-a==1.2.3+foo
"###);

// The version '1.2.3+foo' satisfies the constraint '==1.2.3'.
assert_not_installed(
assert_installed(
&context.venv,
"local_used_without_sdist_a",
"1.2.3+foo",
&context.temp_dir,
);
}
12 changes: 0 additions & 12 deletions scripts/scenarios/generate.py
Original file line number Diff line number Diff line change
@@ -152,18 +152,6 @@ def main(scenarios: list[Path], snapshot_update: bool = True):
else:
scenario["python_patch"] = False

# We don't yet support local versions that aren't expressed as direct dependencies.
for scenario in data["scenarios"]:
expected = scenario["expected"]

if scenario["name"] in (
"local-less-than-or-equal",
"local-simple",
"local-transitive-confounding",
"local-used-without-sdist",
):
expected["satisfiable"] = False

# Split scenarios into `install`, `compile` and `lock` cases
install_scenarios = []
compile_scenarios = []

0 comments on commit 6562100

Please sign in to comment.