From a749f88735a7a2ad93e13042051cd61c3cbadb5c Mon Sep 17 00:00:00 2001 From: Frost Ming Date: Tue, 30 Jul 2024 17:01:37 +0800 Subject: [PATCH] fix: remove index_url key Signed-off-by: Frost Ming --- src/pdm/models/candidates.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/pdm/models/candidates.py b/src/pdm/models/candidates.py index a2b7a54c31..d46e848efc 100644 --- a/src/pdm/models/candidates.py +++ b/src/pdm/models/candidates.py @@ -3,7 +3,6 @@ import dataclasses import hashlib import os -import posixpath import re import warnings from functools import cached_property @@ -405,11 +404,8 @@ def provenance_url(self) -> dict[str, Any] | None: comes_from = self.link.comes_from # e.g. https://pypi.org/simple/requests/ if comes_from is None: # can't determine the index_url return None - # FIXME: what about find-links source? - index_url = posixpath.dirname(comes_from.rstrip("/")) + "/" return { "url": self.link.url_without_fragment, - "index_url": index_url, "archive_info": { "hashes": { name: hashes[0] for name, hashes in (self.link.hash_option or {}).items() if name in ALLOWED_HASHES