Fix regression where `--require-hashes` applied to build dependencies in `uv pip install` (#15153)

Closes https://github.com/astral-sh/uv/issues/15146
This commit is contained in:
Zanie Blue 2025-08-07 16:43:24 -05:00 committed by GitHub
parent e5eec05783
commit 9425350478
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 7 deletions

View File

@ -582,7 +582,7 @@ pub(crate) async fn pip_install(
extra_build_variables, extra_build_variables,
link_mode, link_mode,
&build_options, &build_options,
&hasher, &build_hasher,
exclude_newer.clone(), exclude_newer.clone(),
sources, sources,
WorkspaceCache::default(), WorkspaceCache::default(),

View File

@ -6693,16 +6693,17 @@ fn require_hashes_build_dependencies() -> Result<()> {
.arg("-r") .arg("-r")
.arg("requirements.txt") .arg("requirements.txt")
.arg("--require-hashes"), @r" .arg("--require-hashes"), @r"
success: false success: true
exit_code: 1 exit_code: 0
----- stdout ----- ----- stdout -----
----- stderr ----- ----- stderr -----
Resolved 3 packages in [TIME] Resolved 3 packages in [TIME]
× Failed to download and build `idna==3.6` Prepared 3 packages in [TIME]
Failed to resolve requirements from `build-system.requires` Installed 3 packages in [TIME]
No solution found when resolving: `flit-core>=3.2, <4` + anyio==4.0.0
In `--require-hashes` mode, all requirements must be pinned upfront with `==`, but found: `flit-core` + idna==3.6
+ sniffio==1.3.1
" "
); );