|
|
None | __init__ (self, Factory factory, Dict[str, Constraint] constraints, bool ignore_dependencies, str upgrade_strategy, Dict[str, int] user_requested) |
| |
|
str | identify (self, Union[Requirement, Candidate] requirement_or_candidate) |
| |
| "Preference" | get_preference (self, str identifier, Mapping[str, Candidate] resolutions, Mapping[str, Iterator[Candidate]] candidates, Mapping[str, Iterable["PreferenceInformation"]] information, Sequence["PreferenceInformation"] backtrack_causes) |
| |
|
Iterable[Candidate] | find_matches (self, str identifier, Mapping[str, Iterator[Requirement]] requirements, Mapping[str, Iterator[Candidate]] incompatibilities) |
| |
|
bool | is_satisfied_by (self, Requirement requirement, Candidate candidate) |
| |
|
Sequence[Requirement] | get_dependencies (self, Candidate candidate) |
| |
Pip's provider implementation for resolvelib.
:params constraints: A mapping of constraints specified by the user. Keys
are canonicalized project names.
:params ignore_dependencies: Whether the user specified ``--no-deps``.
:params upgrade_strategy: The user-specified upgrade strategy.
:params user_requested: A set of canonicalized package names that the user
supplied for pip to install/upgrade.
| "Preference" pip._internal.resolution.resolvelib.provider.PipProvider.get_preference |
( |
|
self, |
|
|
str |
identifier, |
|
|
Mapping[str, Candidate] |
resolutions, |
|
|
Mapping[str, Iterator[Candidate]] |
candidates, |
|
|
Mapping[str, Iterable["PreferenceInformation"]] |
information, |
|
|
Sequence["PreferenceInformation"] |
backtrack_causes |
|
) |
| |
Produce a sort key for given requirement based on preference.
The lower the return value is, the more preferred this group of
arguments is.
Currently pip considers the following in order:
* Prefer if any of the known requirements is "direct", e.g. points to an
explicit URL.
* If equal, prefer if any requirement is "pinned", i.e. contains
operator ``===`` or ``==``.
* If equal, calculate an approximate "depth" and resolve requirements
closer to the user-specified requirements first. If the depth cannot
by determined (eg: due to no matching parents), it is considered
infinite.
* Order user-specified requirements by the order they are specified.
* If equal, prefers "non-free" requirements, i.e. contains at least one
operator, such as ``>=`` or ``<``.
* If equal, order alphabetically for consistency (helps debuggability).