
    q"hp                         S r SSKrSSKJr  SSKJrJrJrJrJ	r	J
r
  SSKJr  SSKJr  SSKJr  \R"                  " \5      r\
\\/ \\   4   4   rS	\\   S
\\   4S jrS\S	\\   S
\\   4S jrS\S	\\   S
\\   4S jr " S S\\   5      rg)a  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.
    N)Sequence)AnyCallableIteratorOptionalSetTuple)_BaseVersion)MetadataInvalid   )	Candidateinfosreturnc              #   2  #    [        5       nU  H.  u  p#X!;   a  M   U" 5       nUc  M  Uv   UR                  U5        M0     g! [         aH  n[        R	                  SUUR
                  R                  U5        UR                  U5         SnAM  SnAff = f7f)zIterator for ``FoundCandidates``.

This iterator is used when the package is not already installed. Candidates
from index come later in their normal ordering.
NzpIgnoring version %s of %s since it has invalid metadata:
%s
Please use pip<24.1 if you need to use this version.)setaddr   loggerwarningireqname)r   versions_foundversionfunc	candidatees         f/var/www/html/env/lib/python3.13/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py_iter_builtr      s      ),N$	(I  Ow'+ 
  	(NNG  w''	(s-   BAB
B=B	BBB	installedc              #      #    U v   U R                   1nU H-  u  p4X2;   a  M  U" 5       nUc  M  Uv   UR                  U5        M/     g7f)a7  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.
N)r   r   r   r   r   r   r   r   s         r   _iter_built_with_prependedr!   9   sR      O)2):):(;N$F	7# s   AAc              #     #    [        5       nU H\  u  p4X2;   a  M  U R                  U:  a  U v   UR                  U R                  5        U" 5       nUc  MG  Uv   UR                  U5        M^     U R                  U;  a  U v   gg7f)a  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.
N)r   r   r   r    s         r   _iter_built_with_insertedr#   O   s      ),N$'Oy001F	7#  . /s   BBc            	           \ rS rSrSrS\/ \\   4   S\\	   S\
S\\   4S jrS\S	\4S
 jrS	\\	   4S jrS	\4S jrS	\
4S jrSrg)FoundCandidateso   aO  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.
	get_infosr   prefers_installedincompatible_idsc                 B    Xl         X l        X0l        X@l        S U l        g N)
_get_infos
_installed_prefers_installed_incompatible_ids_bool)selfr'   r   r(   r)   s        r   __init__FoundCandidates.__init__x   s!     $#"3!1%)
    indexr   c                     [        S5      eNzdon't do thisNotImplementedError)r1   r5   s     r   __getitem__FoundCandidates.__getitem__        "/22r4   c                    ^  T R                  5       nT R                  (       d  [        U5      nO>T R                  (       a  [	        T R                  U5      nO[        T R                  U5      nU 4S jU 5       $ )Nc              3   ^   >#    U  H"  n[        U5      TR                  ;  d  M  Uv   M$     g 7fr+   )idr/   ).0cr1   s     r   	<genexpr>+FoundCandidates.__iter__.<locals>.<genexpr>   s$     K8ar!uD4J4J'J8s   -	-)r,   r-   r   r.   r!   r#   )r1   r   iterators   `  r   __iter__FoundCandidates.__iter__   sT    !"5)H$$1$//5IH0%HHK8KKr4   c                     [        S5      er7   r8   r1   s    r   __len__FoundCandidates.__len__   r<   r4   c                     U R                   b  U R                   $ U R                  (       a  U R                  (       a  SU l         g[        U 5      U l         U R                   $ )NT)r0   r.   r-   anyrH   s    r   __bool__FoundCandidates.__bool__   sD    ::!::""tDJY
zzr4   )r0   r,   r/   r-   r.   N)__name__
__module____qualname____firstlineno____doc__r   r   IndexCandidateInfor   r   boolr   intr2   r   r:   rE   rI   rM   __static_attributes__ r4   r   r%   r%   o   s    *B); <<=* I&*  	*
 c(*3 3 3L(9- L3 3	$ 	r4   r%   )rS   loggingcollections.abcr   typingr   r   r   r   r   r	   pip._vendor.packaging.versionr
   pip._internal.exceptionsr   baser   	getLoggerrO   r   rT   r   r!   r#   r%   rX   r4   r   <module>r`      s     $ @ @ 6 4 			8	$<"hy6I2I)JJK (x 23 (8K (>$$!)*<!=$i$,!)*<!=i@5hy) 5r4   