uv/tests: only consider dependency specification for fork matching marker
The test in this case has this comment:
```
/// If a dependency requests a prerelease version with an overlapping marker expression,
/// we should prefer the prerelease version in both forks.
```
With this setup:
```
let pyproject_toml = context.temp_dir.child("pyproject.toml");
pyproject_toml.write_str(indoc! {r#"
[project]
name = "example"
version = "0.0.0"
dependencies = [
"cffi >= 1.17.0rc1 ; os_name == 'Linux'"
]
requires-python = ">=3.11"
"#})?;
let requirements_in = context.temp_dir.child("requirements.in");
requirements_in.write_str(indoc! {"
cffi
.
"})?;
```
The change in this commit _seems_ more correct that what we had,
although it does seem to contradict the comment. Namely, in the `os_name
!= "Linux"` fork, we don't prefer the pre-release version since the
`cffi >= 1.17.0rc1` bound doesn't apply.
It's not quite clear what to do in this instance.
This commit is contained in:
committed by
Andrew Gallant
parent
65be566846
commit
90bcd9f48c
@@ -7730,13 +7730,15 @@ fn universal_disjoint_prereleases_allow() -> Result<()> {
|
||||
----- stdout -----
|
||||
# This file was autogenerated by uv via the following command:
|
||||
# uv pip compile --cache-dir [CACHE_DIR] requirements.in --universal --prerelease allow
|
||||
cffi==1.16.0rc2
|
||||
cffi==1.16.0rc2 ; os_name != 'linux'
|
||||
# via -r requirements.in
|
||||
cffi==1.16.0 ; os_name == 'linux'
|
||||
# via -r requirements.in
|
||||
pycparser==2.22
|
||||
# via cffi
|
||||
|
||||
----- stderr -----
|
||||
Resolved 2 packages in [TIME]
|
||||
Resolved 3 packages in [TIME]
|
||||
"###
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user