mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-17 02:52:45 +00:00
Make invlaid core-metadata tag non-fatal (#7046)
## Summary One of the indexes we test against is using a non-compliant value (the actual URL).
This commit is contained in:
parent
5ca3ded53b
commit
1c25c76be6
1 changed files with 8 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
use tl::HTMLTag;
|
use tl::HTMLTag;
|
||||||
use tracing::instrument;
|
use tracing::{instrument, warn};
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
use pep440_rs::VersionSpecifiers;
|
use pep440_rs::VersionSpecifiers;
|
||||||
|
|
@ -136,7 +136,13 @@ impl SimpleHtml {
|
||||||
match dist_info_metadata.as_ref() {
|
match dist_info_metadata.as_ref() {
|
||||||
"true" => Some(CoreMetadata::Bool(true)),
|
"true" => Some(CoreMetadata::Bool(true)),
|
||||||
"false" => Some(CoreMetadata::Bool(false)),
|
"false" => Some(CoreMetadata::Bool(false)),
|
||||||
fragment => Some(CoreMetadata::Hashes(Hashes::parse_fragment(fragment)?)),
|
fragment => match Hashes::parse_fragment(fragment) {
|
||||||
|
Ok(hash) => Some(CoreMetadata::Hashes(hash)),
|
||||||
|
Err(err) => {
|
||||||
|
warn!("Failed to parse core metadata value `{fragment}`: {err}");
|
||||||
|
None
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue