mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Backtrack on distributions with invalid metadata (#2834)
## Summary Closes https://github.com/astral-sh/uv/issues/2821.
This commit is contained in:
parent
f0b0e1943c
commit
00934044aa
15 changed files with 229 additions and 73 deletions
|
@ -132,7 +132,7 @@ pub enum ErrorKind {
|
|||
|
||||
/// Dist-info error
|
||||
#[error(transparent)]
|
||||
InstallWheel(#[from] install_wheel_rs::Error),
|
||||
DistInfo(#[from] install_wheel_rs::Error),
|
||||
|
||||
#[error("{0} isn't available locally, but making network requests to registries was banned.")]
|
||||
NoIndex(String),
|
||||
|
|
|
@ -632,7 +632,7 @@ async fn read_metadata_async_seek(
|
|||
.enumerate()
|
||||
.filter_map(|(index, entry)| Some((index, entry.filename().as_str().ok()?))),
|
||||
)
|
||||
.map_err(ErrorKind::InstallWheel)?;
|
||||
.map_err(ErrorKind::DistInfo)?;
|
||||
|
||||
// Read the contents of the `METADATA` file.
|
||||
let mut contents = Vec::new();
|
||||
|
|
|
@ -75,7 +75,7 @@ pub(crate) async fn wheel_metadata_from_remote_zip(
|
|||
.enumerate()
|
||||
.filter_map(|(idx, e)| Some(((idx, e), e.filename().as_str().ok()?))),
|
||||
)
|
||||
.map_err(ErrorKind::InstallWheel)?;
|
||||
.map_err(ErrorKind::DistInfo)?;
|
||||
|
||||
let offset = metadata_entry.header_offset();
|
||||
let size = metadata_entry.compressed_size()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue