Skip to content

Commit f988e43

Browse files
authored
Use "your requirements" consistently in resolver error messages (#6113)
Follow-up to #6092 (comment)
1 parent 171c39d commit f988e43

File tree

10 files changed

+122
-122
lines changed

10 files changed

+122
-122
lines changed

crates/uv-resolver/src/pubgrub/report.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,8 @@ impl PubGrubReportFormatter<'_> {
357357
}
358358
}
359359
match &**package {
360-
PubGrubPackageInner::Root(Some(_)) => Some("the requirements".to_string()),
361-
PubGrubPackageInner::Root(None) => Some("the requirements".to_string()),
360+
PubGrubPackageInner::Root(Some(_)) => Some("your requirements".to_string()),
361+
PubGrubPackageInner::Root(None) => Some("your requirements".to_string()),
362362
_ => None,
363363
}
364364
}

crates/uv/tests/cache_prune.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ fn prune_unzipped() -> Result<()> {
244244
and iniconfig==0.1 network connectivity is disabled, but the metadata wasn't found in the cache, we can conclude that iniconfig<1.0.0 cannot be used.
245245
And because iniconfig==1.0.0 network connectivity is disabled, but the metadata wasn't found in the cache and iniconfig==1.0.1 network connectivity is disabled, but the metadata wasn't found in the cache, we can conclude that iniconfig<1.1.0 cannot be used.
246246
And because iniconfig==1.1.0 network connectivity is disabled, but the metadata wasn't found in the cache and iniconfig==1.1.1 network connectivity is disabled, but the metadata wasn't found in the cache, we can conclude that iniconfig<2.0.0 cannot be used.
247-
And because iniconfig==2.0.0 network connectivity is disabled, but the metadata wasn't found in the cache and you require iniconfig, we can conclude that the requirements are unsatisfiable.
247+
And because iniconfig==2.0.0 network connectivity is disabled, but the metadata wasn't found in the cache and you require iniconfig, we can conclude that your requirements are unsatisfiable.
248248
249249
hint: Pre-releases are available for iniconfig in the requested range (e.g., 0.2.dev0), but pre-releases weren't enabled (try: `--prerelease=allow`)
250250

crates/uv/tests/pip_compile.rs

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,7 @@ fn compile_python_37() -> Result<()> {
11321132
----- stderr -----
11331133
× No solution found when resolving dependencies:
11341134
╰─▶ Because the requested Python version (3.7.0) does not satisfy Python>=3.8 and black==23.10.1 depends on Python>=3.8, we can conclude that black==23.10.1 cannot be used.
1135-
And because you require black==23.10.1, we can conclude that the requirements are unsatisfiable.
1135+
And because you require black==23.10.1, we can conclude that your requirements are unsatisfiable.
11361136
"###);
11371137

11381138
Ok(())
@@ -1759,7 +1759,7 @@ fn conflicting_direct_url_dependency() -> Result<()> {
17591759
17601760
----- stderr -----
17611761
× No solution found when resolving dependencies:
1762-
╰─▶ Because there is no version of werkzeug==3.0.0 and you require werkzeug==3.0.0, we can conclude that the requirements are unsatisfiable.
1762+
╰─▶ Because there is no version of werkzeug==3.0.0 and you require werkzeug==3.0.0, we can conclude that your requirements are unsatisfiable.
17631763
"###
17641764
);
17651765

@@ -1886,7 +1886,7 @@ fn conflicting_transitive_url_dependency() -> Result<()> {
18861886
----- stderr -----
18871887
× No solution found when resolving dependencies:
18881888
╰─▶ Because only werkzeug<3.0.0 is available and flask==3.0.0 depends on werkzeug>=3.0.0, we can conclude that flask==3.0.0 cannot be used.
1889-
And because you require flask==3.0.0, we can conclude that the requirements are unsatisfiable.
1889+
And because you require flask==3.0.0, we can conclude that your requirements are unsatisfiable.
18901890
"###
18911891
);
18921892

@@ -2237,7 +2237,7 @@ fn requirement_constraint_override_url() -> Result<()> {
22372237
22382238
----- stderr -----
22392239
× No solution found when resolving dependencies:
2240-
╰─▶ Because there is no version of anyio==3.7.0 and you require anyio==3.7.0, we can conclude that the requirements are unsatisfiable.
2240+
╰─▶ Because there is no version of anyio==3.7.0 and you require anyio==3.7.0, we can conclude that your requirements are unsatisfiable.
22412241
"###
22422242
);
22432243

@@ -2459,7 +2459,7 @@ dependencies = ["anyio==3.7.0", "anyio==4.0.0"]
24592459
24602460
----- stderr -----
24612461
× No solution found when resolving dependencies:
2462-
╰─▶ Because my-project depends on anyio==3.7.0 and anyio==4.0.0, we can conclude that the requirements are unsatisfiable.
2462+
╰─▶ Because my-project depends on anyio==3.7.0 and anyio==4.0.0, we can conclude that your requirements are unsatisfiable.
24632463
"###
24642464
);
24652465

@@ -2491,7 +2491,7 @@ dependencies = ["anyio==300.1.4"]
24912491
24922492
----- stderr -----
24932493
× No solution found when resolving dependencies:
2494-
╰─▶ Because there is no version of anyio==300.1.4 and my-project depends on anyio==300.1.4, we can conclude that the requirements are unsatisfiable.
2494+
╰─▶ Because there is no version of anyio==300.1.4 and my-project depends on anyio==300.1.4, we can conclude that your requirements are unsatisfiable.
24952495
"###
24962496
);
24972497

@@ -2938,7 +2938,7 @@ fn compile_yanked_version_indirect() -> Result<()> {
29382938
attrs==21.1.0
29392939
attrs>=21.2.0
29402940
and attrs==21.1.0 was yanked (reason: Installable but not importable on Python 3.4), we can conclude that attrs>20.3.0,<21.2.0 cannot be used.
2941-
And because you require attrs>20.3.0,<21.2.0, we can conclude that the requirements are unsatisfiable.
2941+
And because you require attrs>20.3.0,<21.2.0, we can conclude that your requirements are unsatisfiable.
29422942
"###
29432943
);
29442944

@@ -5402,7 +5402,7 @@ fn no_index_requirements_txt() -> Result<()> {
54025402
54035403
----- stderr -----
54045404
× No solution found when resolving dependencies:
5405-
╰─▶ Because tqdm was not found in the provided package locations and you require tqdm, we can conclude that the requirements are unsatisfiable.
5405+
╰─▶ Because tqdm was not found in the provided package locations and you require tqdm, we can conclude that your requirements are unsatisfiable.
54065406
54075407
hint: Packages were unavailable because index lookups were disabled and no additional package locations were provided (try: `--find-links <uri>`)
54085408
"###
@@ -5511,7 +5511,7 @@ fn offline_registry() -> Result<()> {
55115511
55125512
----- stderr -----
55135513
× No solution found when resolving dependencies:
5514-
╰─▶ Because black was not found in the cache and you require black==23.10.1, we can conclude that the requirements are unsatisfiable.
5514+
╰─▶ Because black was not found in the cache and you require black==23.10.1, we can conclude that your requirements are unsatisfiable.
55155515
55165516
hint: Packages were unavailable because the network was disabled
55175517
"###
@@ -5642,7 +5642,7 @@ fn offline_find_links() -> Result<()> {
56425642
56435643
----- stderr -----
56445644
× No solution found when resolving dependencies:
5645-
╰─▶ Because tqdm was not found in the cache and you require tqdm, we can conclude that the requirements are unsatisfiable.
5645+
╰─▶ Because tqdm was not found in the cache and you require tqdm, we can conclude that your requirements are unsatisfiable.
56465646
56475647
hint: Packages were unavailable because the network was disabled
56485648
"###
@@ -5661,7 +5661,7 @@ fn offline_find_links() -> Result<()> {
56615661
56625662
----- stderr -----
56635663
× No solution found when resolving dependencies:
5664-
╰─▶ Because tqdm was not found in the cache and you require tqdm, we can conclude that the requirements are unsatisfiable.
5664+
╰─▶ Because tqdm was not found in the cache and you require tqdm, we can conclude that your requirements are unsatisfiable.
56655665
56665666
hint: Packages were unavailable because the network was disabled
56675667
"###
@@ -5747,7 +5747,7 @@ fn invalid_metadata_requires_python() -> Result<()> {
57475747
57485748
----- stderr -----
57495749
× No solution found when resolving dependencies:
5750-
╰─▶ Because validation==2.0.0 has invalid metadata and you require validation==2.0.0, we can conclude that the requirements are unsatisfiable.
5750+
╰─▶ Because validation==2.0.0 has invalid metadata and you require validation==2.0.0, we can conclude that your requirements are unsatisfiable.
57515751
57525752
hint: Metadata for validation==2.0.0 could not be parsed:
57535753
Failed to parse version: Unexpected end of version specifier, expected operator:
@@ -5779,7 +5779,7 @@ fn invalid_metadata_multiple_dist_info() -> Result<()> {
57795779
57805780
----- stderr -----
57815781
× No solution found when resolving dependencies:
5782-
╰─▶ Because validation==3.0.0 has an invalid package format and you require validation==3.0.0, we can conclude that the requirements are unsatisfiable.
5782+
╰─▶ Because validation==3.0.0 has an invalid package format and you require validation==3.0.0, we can conclude that your requirements are unsatisfiable.
57835783
57845784
hint: The structure of validation==3.0.0 was invalid:
57855785
Multiple .dist-info directories found: validation-2.0.0, validation-3.0.0
@@ -6048,7 +6048,7 @@ fn compile_constraints_incompatible_url() -> Result<()> {
60486048
60496049
----- stderr -----
60506050
× No solution found when resolving dependencies:
6051-
╰─▶ Because only anyio>=4 is available and you require anyio<4, we can conclude that the requirements are unsatisfiable.
6051+
╰─▶ Because only anyio>=4 is available and you require anyio<4, we can conclude that your requirements are unsatisfiable.
60526052
"###
60536053
);
60546054

@@ -6071,7 +6071,7 @@ fn index_url_in_requirements() -> Result<()> {
60716071
60726072
----- stderr -----
60736073
× No solution found when resolving dependencies:
6074-
╰─▶ Because anyio was not found in the package registry and you require anyio<4, we can conclude that the requirements are unsatisfiable.
6074+
╰─▶ Because anyio was not found in the package registry and you require anyio<4, we can conclude that your requirements are unsatisfiable.
60756075
"###
60766076
);
60776077

@@ -8021,7 +8021,7 @@ fn universal_requires_python_incomplete() -> Result<()> {
80218021
uv{python_version >= '3.8'}==0.1.23
80228022
uv{python_version >= '3.8'}==0.1.24
80238023
and the requested Python version (>=3.7) does not satisfy Python>=3.8, we can conclude that all versions of uv{python_version >= '3.8'} are incompatible.
8024-
And because you require uv{python_version >= '3.8'}, we can conclude that the requirements are unsatisfiable.
8024+
And because you require uv{python_version >= '3.8'}, we can conclude that your requirements are unsatisfiable.
80258025
"###
80268026
);
80278027

@@ -8368,7 +8368,7 @@ fn compile_constraints_incompatible_version() -> Result<()> {
83688368
83698369
----- stderr -----
83708370
× No solution found when resolving dependencies:
8371-
╰─▶ Because you require filelock==1.0.0 and filelock==3.8.0, we can conclude that the requirements are unsatisfiable.
8371+
╰─▶ Because you require filelock==1.0.0 and filelock==3.8.0, we can conclude that your requirements are unsatisfiable.
83728372
"###
83738373
);
83748374

@@ -8396,7 +8396,7 @@ fn conflicting_url_markers() -> Result<()> {
83968396
83978397
----- stderr -----
83988398
× No solution found when resolving dependencies:
8399-
╰─▶ Because you require filelock==1.0.0 and filelock==3.8.0, we can conclude that the requirements are unsatisfiable.
8399+
╰─▶ Because you require filelock==1.0.0 and filelock==3.8.0, we can conclude that your requirements are unsatisfiable.
84008400
"###
84018401
);
84028402

@@ -8550,7 +8550,7 @@ fn override_with_incompatible_constraint() -> Result<()> {
85508550
85518551
----- stderr -----
85528552
× No solution found when resolving dependencies:
8553-
╰─▶ Because you require anyio>=3.0.0 and anyio<3.0.0, we can conclude that the requirements are unsatisfiable.
8553+
╰─▶ Because you require anyio>=3.0.0 and anyio<3.0.0, we can conclude that your requirements are unsatisfiable.
85548554
"###
85558555
);
85568556

@@ -9078,7 +9078,7 @@ requires-python = "<=3.8"
90789078
----- stderr -----
90799079
× No solution found when resolving dependencies:
90809080
╰─▶ Because the current Python version (3.12.[X]) does not satisfy Python<=3.8 and example==0.0.0 depends on Python<=3.8, we can conclude that example==0.0.0 cannot be used.
9081-
And because only example==0.0.0 is available and you require example, we can conclude that the requirements are unsatisfiable.
9081+
And because only example==0.0.0 is available and you require example, we can conclude that your requirements are unsatisfiable.
90829082
"###
90839083
);
90849084

@@ -9130,7 +9130,7 @@ requires-python = "<=3.8"
91309130
----- stderr -----
91319131
× No solution found when resolving dependencies:
91329132
╰─▶ Because the requested Python version (3.11.0) does not satisfy Python<=3.8 and example==0.0.0 depends on Python<=3.8, we can conclude that example==0.0.0 cannot be used.
9133-
And because only example==0.0.0 is available and you require example, we can conclude that the requirements are unsatisfiable.
9133+
And because only example==0.0.0 is available and you require example, we can conclude that your requirements are unsatisfiable.
91349134
"###
91359135
);
91369136

@@ -9358,7 +9358,7 @@ requires-python = "<=3.8"
93589358
----- stderr -----
93599359
× No solution found when resolving dependencies:
93609360
╰─▶ Because the current Python version (3.12.[X]) does not satisfy Python<=3.8 and example==0.0.0 depends on Python<=3.8, we can conclude that example==0.0.0 cannot be used.
9361-
And because only example==0.0.0 is available and you require example, we can conclude that the requirements are unsatisfiable.
9361+
And because only example==0.0.0 is available and you require example, we can conclude that your requirements are unsatisfiable.
93629362
"###
93639363
);
93649364

@@ -10494,7 +10494,7 @@ requires-python = ">3.8"
1049410494
× No solution found when resolving dependencies:
1049510495
╰─▶ Because there is no version of anyio==0.0.0 and lib==0.0.0 depends on anyio==0.0.0, we can conclude that lib==0.0.0 cannot be used.
1049610496
And because only lib==0.0.0 is available and example==0.0.0 depends on lib, we can conclude that example==0.0.0 cannot be used.
10497-
And because only example==0.0.0 is available and you require example, we can conclude that the requirements are unsatisfiable.
10497+
And because only example==0.0.0 is available and you require example, we can conclude that your requirements are unsatisfiable.
1049810498
"###
1049910499
);
1050010500

@@ -10665,7 +10665,7 @@ fn compile_index_url_first_match() -> Result<()> {
1066510665
1066610666
----- stderr -----
1066710667
× No solution found when resolving dependencies:
10668-
╰─▶ Because there is no version of jinja2==3.1.0 and you require jinja2==3.1.0, we can conclude that the requirements are unsatisfiable.
10668+
╰─▶ Because there is no version of jinja2==3.1.0 and you require jinja2==3.1.0, we can conclude that your requirements are unsatisfiable.
1066910669
"###
1067010670
);
1067110671

@@ -11693,7 +11693,7 @@ fn no_binary_only_binary() -> Result<()> {
1169311693
----- stderr -----
1169411694
× No solution found when resolving dependencies:
1169511695
╰─▶ Because only source-distribution==0.0.1 is available and source-distribution==0.0.1 has no usable wheels and building from source is disabled, we can conclude that all versions of source-distribution cannot be used.
11696-
And because you require source-distribution, we can conclude that the requirements are unsatisfiable.
11696+
And because you require source-distribution, we can conclude that your requirements are unsatisfiable.
1169711697
"###
1169811698
);
1169911699

@@ -11778,7 +11778,7 @@ fn incompatible_build_constraint() -> Result<()> {
1177811778
error: Failed to download and build `requests==1.2.0`
1177911779
Caused by: Failed to install requirements from setup.py build (resolve)
1178011780
Caused by: No solution found when resolving: setuptools>=40.8.0
11781-
Caused by: Because you require setuptools>=40.8.0 and setuptools==1, we can conclude that the requirements are unsatisfiable.
11781+
Caused by: Because you require setuptools>=40.8.0 and setuptools==1, we can conclude that your requirements are unsatisfiable.
1178211782
"###
1178311783
);
1178411784

crates/uv/tests/pip_compile_scenarios.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ fn compatible_python_incompatible_override() -> Result<()> {
128128
warning: The requested Python version 3.9 is not available; 3.11.[X] will be used to build dependencies instead.
129129
× No solution found when resolving dependencies:
130130
╰─▶ Because the requested Python version (3.9.0) does not satisfy Python>=3.10 and package-a==1.0.0 depends on Python>=3.10, we can conclude that package-a==1.0.0 cannot be used.
131-
And because you require package-a==1.0.0, we can conclude that the requirements are unsatisfiable.
131+
And because you require package-a==1.0.0, we can conclude that your requirements are unsatisfiable.
132132
"###
133133
);
134134

@@ -182,7 +182,7 @@ fn incompatible_python_compatible_override_unavailable_no_wheels() -> Result<()>
182182
warning: The requested Python version 3.11 is not available; 3.9.[X] will be used to build dependencies instead.
183183
× No solution found when resolving dependencies:
184184
╰─▶ Because the current Python version (3.9.[X]) does not satisfy Python>=3.10 and package-a==1.0.0 depends on Python>=3.10, we can conclude that package-a==1.0.0 cannot be used.
185-
And because you require package-a==1.0.0, we can conclude that the requirements are unsatisfiable.
185+
And because you require package-a==1.0.0, we can conclude that your requirements are unsatisfiable.
186186
"###
187187
);
188188

@@ -294,7 +294,7 @@ fn incompatible_python_compatible_override_no_compatible_wheels() -> Result<()>
294294
warning: The requested Python version 3.11 is not available; 3.9.[X] will be used to build dependencies instead.
295295
× No solution found when resolving dependencies:
296296
╰─▶ Because the current Python version (3.9.[X]) does not satisfy Python>=3.10 and package-a==1.0.0 depends on Python>=3.10, we can conclude that package-a==1.0.0 cannot be used.
297-
And because you require package-a==1.0.0, we can conclude that the requirements are unsatisfiable.
297+
And because you require package-a==1.0.0, we can conclude that your requirements are unsatisfiable.
298298
"###
299299
);
300300

@@ -359,7 +359,7 @@ fn incompatible_python_compatible_override_other_wheel() -> Result<()> {
359359
360360
Because the requested Python version (3.11.0) does not satisfy Python>=3.12 and package-a==2.0.0 depends on Python>=3.12, we can conclude that package-a==2.0.0 cannot be used.
361361
And because we know from (1) that package-a<2.0.0 cannot be used, we can conclude that all versions of package-a cannot be used.
362-
And because you require package-a, we can conclude that the requirements are unsatisfiable.
362+
And because you require package-a, we can conclude that your requirements are unsatisfiable.
363363
"###
364364
);
365365

@@ -407,7 +407,7 @@ fn python_patch_override_no_patch() -> Result<()> {
407407
----- stderr -----
408408
× No solution found when resolving dependencies:
409409
╰─▶ Because the requested Python version (3.8.0) does not satisfy Python>=3.8.4 and package-a==1.0.0 depends on Python>=3.8.4, we can conclude that package-a==1.0.0 cannot be used.
410-
And because you require package-a==1.0.0, we can conclude that the requirements are unsatisfiable.
410+
And because you require package-a==1.0.0, we can conclude that your requirements are unsatisfiable.
411411
"###
412412
);
413413

0 commit comments

Comments
 (0)