mirror of
https://github.com/astral-sh/uv.git
synced 2025-09-26 12:09:12 +00:00
Add hashes to pip-compile
output (#894)
## Summary Adds hashes to `pip-compile` output, though we don't actually check those hashes in `pip-sync` yet. Closes https://github.com/astral-sh/puffin/issues/131.
This commit is contained in:
parent
1629141d67
commit
06039e1293
9 changed files with 281 additions and 37 deletions
|
@ -85,8 +85,14 @@ impl Yanked {
|
|||
///
|
||||
/// PEP 691 says multiple hashes can be included and the interpretation is left to the client, we
|
||||
/// only support SHA 256 atm.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Serialize, Deserialize)]
|
||||
pub struct Hashes {
|
||||
// TODO(charlie): Hashes should be optional.
|
||||
pub sha256: String,
|
||||
}
|
||||
|
||||
impl std::fmt::Display for Hashes {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "sha256:{}", self.sha256)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue