mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 10:58:28 +00:00
Avoid 403 error hint for PyTorch URLs (#9750)
## Summary Closes https://github.com/astral-sh/uv/issues/9746.
This commit is contained in:
parent
3992295e9a
commit
25045cb3e8
3 changed files with 6 additions and 4 deletions
|
@ -793,6 +793,12 @@ impl PubGrubReportFormatter<'_> {
|
|||
});
|
||||
}
|
||||
if index_capabilities.forbidden(&index.url) {
|
||||
// If the index is a PyTorch index (e.g., `https://download.pytorch.org/whl/cu118`),
|
||||
// avoid noting the lack of credentials. PyTorch returns a 403 (Forbidden) status
|
||||
// code for any package that does not exist.
|
||||
if index.url.url().host_str() == Some("download.pytorch.org") {
|
||||
continue;
|
||||
}
|
||||
hints.insert(PubGrubHint::ForbiddenIndex {
|
||||
index: index.url.clone(),
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue