Let us walk on the 3-isogeny graph
|
Data Structures | |
class | BestCandidateResult |
class | CandidateEvaluator |
class | CandidatePreferences |
class | LinkEvaluator |
class | LinkType |
class | PackageFinder |
Functions | |
bool | _check_link_requires_python (Link link, Tuple[int, int, int] version_info, bool ignore_requires_python=False) |
List[InstallationCandidate] | filter_unallowed_hashes (List[InstallationCandidate] candidates, Optional[Hashes] hashes, str project_name) |
int | _find_name_version_sep (str fragment, str canonical_name) |
Optional[str] | _extract_version_from_fragment (str fragment, str canonical_name) |
Variables | |
logger = getLogger(__name__) | |
BuildTag = Union[Tuple[()], Tuple[int, str]] | |
CandidateSortingKey = Tuple[int, int, int, _BaseVersion, Optional[int], BuildTag] | |
Routines related to PyPI, indexes
|
protected |
Return whether the given Python version is compatible with a link's "Requires-Python" value. :param version_info: A 3-tuple of ints representing the Python major-minor-micro version to check. :param ignore_requires_python: Whether to ignore the "Requires-Python" value if the given Python version isn't compatible.
Definition at line 51 of file package_finder.py.
References i.
Referenced by LinkEvaluator.evaluate_link().
|
protected |
Parse the version string from a <package>+<version> filename "fragment" (stem) or egg fragment. :param fragment: The string to parse. E.g. foo-2.1 :param canonical_name: The canonicalized name of the package this belongs to.
Definition at line 1014 of file package_finder.py.
References pip._internal.index.package_finder._find_name_version_sep().
Referenced by LinkEvaluator.evaluate_link().
|
protected |
Find the separator's index based on the package's canonical name. :param fragment: A <package>+<version> filename "fragment" (stem) or egg fragment. :param canonical_name: The package's canonical name. This function is needed since the canonicalized name does not necessarily have the same length as the egg info's name part. An example:: >>> fragment = 'foo__bar-1.0' >>> canonical_name = 'foo-bar' >>> _find_name_version_sep(fragment, canonical_name) 8
Definition at line 988 of file package_finder.py.
References i.
Referenced by pip._internal.index.package_finder._extract_version_from_fragment().
List[InstallationCandidate] filter_unallowed_hashes | ( | List[InstallationCandidate] | candidates, |
Optional[Hashes] | hashes, | ||
str | project_name | ||
) |
Filter out candidates whose hashes aren't allowed, and return a new list of candidates. If at least one candidate has an allowed hash, then all candidates with either an allowed hash or no hash specified are returned. Otherwise, the given candidates are returned. Including the candidates with no hash specified when there is a match allows a warning to be logged if there is a more preferred candidate with no hash specified. Returning all candidates in the case of no matches lets pip report the hash of the candidate that would otherwise have been installed (e.g. permitting the user to more easily update their requirements file with the desired hash).
Definition at line 252 of file package_finder.py.
References i.
Referenced by CandidateEvaluator.get_applicable_candidates().
BuildTag = Union[Tuple[()], Tuple[int, str]] |
Definition at line 47 of file package_finder.py.
CandidateSortingKey = Tuple[int, int, int, _BaseVersion, Optional[int], BuildTag] |
Definition at line 48 of file package_finder.py.
logger = getLogger(__name__) |
Definition at line 45 of file package_finder.py.