Use consistent PyPI cache bucket (#7443)

## Summary

All the registry wheels were getting cached under
`index/b2a7eb67d4c26b82` rather than `pypi`, because we used
`IndexUrl::Url` rather than `IndexUrl::from`.
This commit is contained in:
Charlie Marsh 2024-09-16 19:33:32 -04:00 committed by GitHub
parent 9f7d9da449
commit 424ee439d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 18 deletions

View file

@ -1863,7 +1863,7 @@ impl Package {
url: FileLocation::AbsoluteUrl(file_url.clone()),
yanked: None,
});
let index = IndexUrl::Url(VerbatimUrl::from_url(url.to_url()));
let index = IndexUrl::from(VerbatimUrl::from_url(url.to_url()));
let reg_dist = RegistrySourceDist {
name: self.id.name.clone(),
@ -1905,7 +1905,7 @@ impl Package {
url: FileLocation::AbsoluteUrl(UrlString::from(file_url)),
yanked: None,
});
let index = IndexUrl::Path(
let index = IndexUrl::from(
VerbatimUrl::from_absolute_path(workspace_root.join(path))
.map_err(LockErrorKind::RegistryVerbatimUrl)?,
);
@ -3284,7 +3284,7 @@ impl Wheel {
url: FileLocation::AbsoluteUrl(file_url.clone()),
yanked: None,
});
let index = IndexUrl::Url(VerbatimUrl::from_url(index_url.to_url()));
let index = IndexUrl::from(VerbatimUrl::from_url(index_url.to_url()));
Ok(RegistryBuiltWheel {
filename,
file,
@ -3314,7 +3314,7 @@ impl Wheel {
url: FileLocation::AbsoluteUrl(UrlString::from(file_url)),
yanked: None,
});
let index = IndexUrl::Path(
let index = IndexUrl::from(
VerbatimUrl::from_absolute_path(root.join(index_path))
.map_err(LockErrorKind::RegistryVerbatimUrl)?,
);