Remove base from RegistryBuiltDist and RegistrySourceDist (#919)

Follow-up to https://github.com/astral-sh/puffin/pull/917 i found
rebasing the find-links PRs, this field became unused through the
absolute URLs.
This commit is contained in:
konsti 2024-01-14 18:46:16 +01:00 committed by GitHub
parent 0374000ec0
commit a53bdeba4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 25 deletions

View file

@ -53,7 +53,7 @@ impl<'a> DistFinder<'a> {
match requirement.version_or_url.as_ref() {
None | Some(VersionOrUrl::VersionSpecifier(_)) => {
// Query the index(es) (cached) to get the URLs for the available files.
let (index, base, metadata) = self.client.simple(&requirement.name).await?;
let (index, metadata) = self.client.simple(&requirement.name).await?;
// Pick a version that satisfies the requirement.
let Some(ParsedFile {
@ -64,7 +64,7 @@ impl<'a> DistFinder<'a> {
else {
return Err(ResolveError::NotFound(requirement.clone()));
};
let distribution = Dist::from_registry(name, version, file, index, base);
let distribution = Dist::from_registry(name, version, file, index);
if let Some(reporter) = self.reporter.as_ref() {
reporter.on_progress(&distribution);

View file

@ -82,12 +82,11 @@ impl<'a, Context: BuildContext + Send + Sync> ResolverProvider
) -> impl Future<Output = VersionMapResponse> + Send + 'io {
self.client
.simple(package_name)
.map_ok(move |(index, base, metadata)| {
.map_ok(move |(index, metadata)| {
VersionMap::from_metadata(
metadata,
package_name,
&index,
&base,
self.tags,
&self.python_requirement,
&self.allowed_yanks,

View file

@ -11,7 +11,7 @@ use platform_tags::{TagPriority, Tags};
use puffin_client::SimpleMetadata;
use puffin_normalize::PackageName;
use puffin_warnings::warn_user_once;
use pypi_types::{BaseUrl, Hashes, Yanked};
use pypi_types::{Hashes, Yanked};
use crate::pubgrub::PubGrubVersion;
use crate::python_requirement::PythonRequirement;
@ -29,7 +29,6 @@ impl VersionMap {
metadata: SimpleMetadata,
package_name: &PackageName,
index: &IndexUrl,
base: &BaseUrl,
tags: &Tags,
python_requirement: &PythonRequirement,
allowed_yanks: &AllowedYanks,
@ -87,7 +86,6 @@ impl VersionMap {
filename.version.clone(),
file,
index.clone(),
base.clone(),
);
match version_map.entry(version.clone().into()) {
Entry::Occupied(mut entry) => {
@ -111,7 +109,6 @@ impl VersionMap {
filename.version.clone(),
file,
index.clone(),
base.clone(),
);
match version_map.entry(version.clone().into()) {
Entry::Occupied(mut entry) => {