Edit File: found_candidates.cpython-311.pyc
� p�Fhp � �Z � d Z ddlZddlmZ ddlmZmZmZmZm Z m Z ddlmZ ddl mZ ddlmZ ej e� � Ze eeg ee f f Zd ee d ee fd�Zded ee d ee fd �Zded ee d ee fd�Z G d� dee � � ZdS )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 # �4 K � t � � }| D ]�\ }}||v r� |� � }|��|V � |� |� � �2# t $ rF}t � d||j j |� � |� |� � Y d}~�}d}~ww xY wdS )z�Iterator 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 ��/builddir/build/BUILD/imunify360-venv-2.5.3/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py�_iter_builtr s� � � � � ),���N�� (� (� ����n�$�$�� (�����I� � ���O�O�O����w�'�'�'�'��! � (� (� (��N�N�G� ����� � � � ���w�'�'�'�'�'�'�'�'����� (����(� (s � A� B�<B�B� installedc # � K � | V � | j h}|D ]0\ }}||v r� |� � }|��|V � |� |� � �1dS )aK 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 s{ � � � � �O�O�O�)2�):�(;�N�� $� $� ����n�$�$���D�F�F� �����������7�#�#�#�#�$� $� c # � K � t � � }|D ]Y\ }}||v r� | j |k r| V � |� | j � � |� � }|��@|V � |� |� � �Z| j |vr| V � dS dS )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�� $� $� ����n�$�$�����'�'��O�O�O����y�0�1�1�1��D�F�F� �����������7�#�#�#�#� ���.�.������� /�.r"