관리-도구
편집 파일: found_candidates.pyc
� �Rec @ s� d d l Z d d l Z d d l m Z d d l m Z d d l m Z e r� d d l m Z m Z m Z m Z d d l m Z d d l m Z n d � Z d � Z d e j f d � � YZ d S( i����N( t collections_abc( t lru_cache( t MYPY_CHECK_RUNNING( t Callablet Iteratort Optionalt Set( t _BaseVersioni ( t Candidatec c sH t � } x8 | D]0 } | j | k r+ q n | j | j � | Vq Wd S( N( t sett versiont add( t candidatest returnedt candidate( ( s� /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/found_candidates.pyt _deduplicated_by_version s c C s: t t j | g | � d t j d � d t �} t | � S( sz 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. Since candidates from index are already sorted by reverse version order, `sorted()` here would keep the ordering mostly intact, only shuffling the already-installed candidate into the correct position. We put the already- installed candidate in front of those from the index, so it's put in front after sorting due to Python sorting's stableness guarentee. t keyR t reverse( t sortedt itertoolst chaint operatort attrgettert Truet iter( t installedt othersR ( ( s� /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/found_candidates.pyt _insert_installed s t FoundCandidatesc B sP e Z d Z d � Z d � Z d � Z d � Z e d d � d � � Z e Z RS( sc A lazy sequence to provide candidates to the resolver. The intended usage is to return this from `find_matches()` so the resolver can iterate through the sequence multiple times, but only access the index page when remote packages are actually needed. This improve performances when suitable candidates are already installed on disk. c C s | | _ | | _ | | _ d S( N( t _get_otherst _installedt _prefers_installed( t selft get_othersR t prefers_installed( ( s� /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/found_candidates.pyt __init__9 s c C s t d � � d S( Ns don't do this( t NotImplementedError( R t index( ( s� /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/found_candidates.pyt __getitem__C s c C sd | j s | j � } nB | j rB t j | j g | j � � } n t | j | j � � } t | � S( N( R R R R R R R ( R R ( ( s� /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/found_candidates.pyt __iter__J s !c C s t d � � d S( Ns don't do this( R$ ( R ( ( s� /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/found_candidates.pyt __len__T s t maxsizei c C s | j r | j r t St | � S( N( R R R t any( R ( ( s� /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/resolution/resolvelib/found_candidates.pyt __bool__[ s ( t __name__t __module__t __doc__R# R&