Skip to content

Commit 2e7ed46

Browse files
committed
fix: remove index_url key
Signed-off-by: Frost Ming <[email protected]>
1 parent 8058807 commit 2e7ed46

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/pdm/models/candidates.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import dataclasses
44
import hashlib
55
import os
6-
import posixpath
76
import re
87
import warnings
98
from functools import cached_property
@@ -402,14 +401,8 @@ def provenance_url(self) -> dict[str, Any] | None:
402401
if not isinstance(req, NamedRequirement):
403402
return None
404403
assert self.link is not None
405-
comes_from = self.link.comes_from # e.g. https://pypi.org/simple/requests/
406-
if comes_from is None: # can't determine the index_url
407-
return None
408-
# FIXME: what about find-links source?
409-
index_url = posixpath.dirname(comes_from.rstrip("/")) + "/"
410404
return {
411405
"url": self.link.url_without_fragment,
412-
"index_url": index_url,
413406
"archive_info": {
414407
"hashes": {
415408
name: hashes[0] for name, hashes in (self.link.hash_option or {}).items() if name in ALLOWED_HASHES

0 commit comments

Comments
 (0)