Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Classes | Functions | Variables
pip._internal.resolution.resolvelib.found_candidates Namespace Reference

Classes

class  FoundCandidates
 

Functions

Iterator[Candidate_iter_built (Iterator[IndexCandidateInfo] infos)
 
Iterator[Candidate_iter_built_with_prepended (Candidate installed, Iterator[IndexCandidateInfo] infos)
 
Iterator[Candidate_iter_built_with_inserted (Candidate installed, Iterator[IndexCandidateInfo] infos)
 

Variables

 IndexCandidateInfo = Tuple[_BaseVersion, Callable[[], Optional[Candidate]]]
 
 SequenceCandidate = Sequence[Candidate]
 

Detailed Description

Utilities to lazily create and visit candidates found.

Creating and visiting a candidate is a *very* costly operation. It involves
fetching, extracting, potentially building modules from source, and verifying
distribution metadata. It is therefore crucial for performance to keep
everything here lazy all the way down, so we only touch candidates that we
absolutely need, and not "download the world" when we only need one version of
something.

Function Documentation

◆ _iter_built()

Iterator[Candidate] pip._internal.resolution.resolvelib.found_candidates._iter_built ( Iterator[IndexCandidateInfo]  infos)
protected
Iterator for ``FoundCandidates``.

This iterator is used when the package is not already installed. Candidates
from index come later in their normal ordering.

◆ _iter_built_with_inserted()

Iterator[Candidate] pip._internal.resolution.resolvelib.found_candidates._iter_built_with_inserted ( Candidate  installed,
Iterator[IndexCandidateInfo]   infos 
)
protected
Iterator for ``FoundCandidates``.

This iterator is used when the resolver prefers to upgrade an
already-installed package. Candidates from index are returned in their
normal ordering, except replaced when the version is already installed.

The implementation iterates through and yields other candidates, inserting
the installed candidate exactly once before we start yielding older or
equivalent candidates, or after all other candidates if they are all newer.

◆ _iter_built_with_prepended()

Iterator[Candidate] pip._internal.resolution.resolvelib.found_candidates._iter_built_with_prepended ( Candidate  installed,
Iterator[IndexCandidateInfo]   infos 
)
protected
Iterator for ``FoundCandidates``.

This iterator is used when the resolver prefers the already-installed
candidate and NOT to upgrade. The installed candidate is therefore
always yielded first, and candidates from index come later in their
normal ordering, except skipped when the version is already installed.