![]() |
Qucs-S S-parameter Viewer & RF Synthesis Tools
|


Public Member Functions | |
| None | __init__ (self, BaseCandidate base, FrozenSet[str] extras, *Optional[InstallRequirement] comes_from=None) |
| str | __str__ (self) |
| str | __repr__ (self) |
| int | __hash__ (self) |
| bool | __eq__ (self, Any other) |
| NormalizedName | project_name (self) |
| str | name (self) |
| CandidateVersion | version (self) |
| str | format_for_error (self) |
| bool | is_installed (self) |
| bool | is_editable (self) |
| Optional[Link] | source_link (self) |
| Iterable[Optional[Requirement]] | iter_dependencies (self, bool with_requires) |
| Optional[InstallRequirement] | get_install_requirement (self) |
Public Attributes | |
| base | |
| extras | |
| version | |
Protected Member Functions | |
| None | _warn_invalid_extras (self, FrozenSet[str] requested, FrozenSet[str] valid) |
| FrozenSet[str] | _calculate_valid_requested_extras (self) |
Protected Attributes | |
| _unnormalized_extras | |
| _comes_from | |
A candidate that has 'extras', indicating additional dependencies.
Requirements can be for a project with dependencies, something like
foo[extra]. The extras don't affect the project/version being installed
directly, but indicate that we need additional dependencies. We model that
by having an artificial ExtrasCandidate that wraps the "base" candidate.
The ExtrasCandidate differs from the base in the following ways:
1. It has a unique name, of the form foo[extra]. This causes the resolver
to treat it as a separate node in the dependency graph.
2. When we're getting the candidate's dependencies,
a) We specify that we want the extra dependencies as well.
b) We add a dependency on the base candidate.
See below for why this is needed.
3. We return None for the underlying InstallRequirement, as the base
candidate will provide it, and we don't want to end up with duplicates.
The dependency on the base candidate is needed so that the resolver can't
decide that it should recommend foo[extra1] version 1.0 and foo[extra2]
version 2.0. Having those candidates depend on foo=1.0 and foo=2.0
respectively forces the resolver to recognise that this is a conflict.
| None pip._internal.resolution.resolvelib.candidates.ExtrasCandidate.__init__ | ( | self, | |
| BaseCandidate | base, | ||
| FrozenSet[str] | extras, | ||
| *Optional[InstallRequirement] | comes_from = None |
||
| ) |
:param comes_from: the InstallRequirement that led to this candidate if it
differs from the base's InstallRequirement. This will often be the
case in the sense that this candidate's requirement has the extras
while the base's does not. Unlike the InstallRequirement backed
candidates, this requirement is used solely for reporting purposes,
it does not do any leg work.
|
protected |
Get a list of valid extras requested by this candidate. The user (or upstream dependant) may have specified extras that the candidate doesn't support. Any unsupported extras are dropped, and each cause a warning to be logged here.
|
protected |
Emit warnings for invalid extras being requested. This emits a warning for each requested extra that is not in the candidate's ``Provides-Extra`` list.
| str pip._internal.resolution.resolvelib.candidates.ExtrasCandidate.format_for_error | ( | self | ) |
Reimplemented from pip._internal.resolution.resolvelib.base.Candidate.
| Optional[InstallRequirement] pip._internal.resolution.resolvelib.candidates.ExtrasCandidate.get_install_requirement | ( | self | ) |
Reimplemented from pip._internal.resolution.resolvelib.base.Candidate.
| bool pip._internal.resolution.resolvelib.candidates.ExtrasCandidate.is_editable | ( | self | ) |
Reimplemented from pip._internal.resolution.resolvelib.base.Candidate.
| bool pip._internal.resolution.resolvelib.candidates.ExtrasCandidate.is_installed | ( | self | ) |
Reimplemented from pip._internal.resolution.resolvelib.base.Candidate.
| Iterable[Optional[Requirement]] pip._internal.resolution.resolvelib.candidates.ExtrasCandidate.iter_dependencies | ( | self, | |
| bool | with_requires | ||
| ) |
Reimplemented from pip._internal.resolution.resolvelib.base.Candidate.
| str pip._internal.resolution.resolvelib.candidates.ExtrasCandidate.name | ( | self | ) |
The normalised name of the project the candidate refers to
Reimplemented from pip._internal.resolution.resolvelib.base.Candidate.
| NormalizedName pip._internal.resolution.resolvelib.candidates.ExtrasCandidate.project_name | ( | self | ) |
The "project name" of the candidate. This is different from ``name`` if this candidate contains extras, in which case ``name`` would contain the ``[...]`` part, while this refers to the name of the project.
Reimplemented from pip._internal.resolution.resolvelib.base.Candidate.
| Optional[Link] pip._internal.resolution.resolvelib.candidates.ExtrasCandidate.source_link | ( | self | ) |
Reimplemented from pip._internal.resolution.resolvelib.base.Candidate.
| CandidateVersion pip._internal.resolution.resolvelib.candidates.ExtrasCandidate.version | ( | self | ) |
Reimplemented from pip._internal.resolution.resolvelib.base.Candidate.