HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/pip/_internal/resolution/resolvelib/__pycache__/base.cpython-310.pyc
o

@%Ned�@s�ddlmZmZmZmZmZddlmZddlm	Z	m
Z
ddlmZm
Z
ddlmZmZddlmZddlmZeedeefZeee
fZd	ed
eedefdd
�ZGdd�d�ZGdd�d�Zdedddefdd�ZGdd�d�ZdS)�)�	FrozenSet�Iterable�Optional�Tuple�Union)�SpecifierSet)�NormalizedName�canonicalize_name)�
LegacyVersion�Version)�Link�links_equivalent)�InstallRequirement)�Hashes�	Candidate�project�extras�returncCs,|s|Stdd�|D��}d�|d�|��S)Ncss�|]}t|�VqdS�N)r	)�.0�e�r�J/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/base.py�	<genexpr>s�zformat_name.<locals>.<genexpr>z{}[{}]�,)�sorted�format�join)rr�canonical_extrasrrr�format_namesrc@s�eZdZdededeeddfdd�Zeddd	��Z	ed
e
ddfdd��Zdefd
d�Z
de
ddfdd�Zdddefdd�ZdS)�
Constraint�	specifier�hashes�linksrNcCs||_||_||_dSr)r!r"r#)�selfr!r"r#rrr�__init__s
zConstraint.__init__cCstt�t�t��Sr)r rr�	frozenset)�clsrrr�emptyszConstraint.empty�ireqcCs.|jr	t|jg�nt�}t|j|jdd�|�S�NF)�trust_internet)�linkr&r r!r")r'r)r#rrr�	from_ireq"szConstraint.from_ireqcCst|j�pt|j�pt|j�Sr)�boolr!r"r#�r$rrr�__bool__'szConstraint.__bool__�othercCsRt|t�stS|j|j@}|j|jdd�@}|j}|jr#|�|jg�}t|||�Sr*)	�
isinstancer�NotImplementedr!r"r#r,�unionr )r$r1r!r"r#rrr�__and__*s
zConstraint.__and__�	candidatercs4|jrt�fdd�|jD��sdS|jj�jdd�S)Nc3s�|]}t|��VqdSr)�_match_link)rr,�r6rrr6s�z-Constraint.is_satisfied_by.<locals>.<genexpr>FT)�prereleases)r#�allr!�contains�version�r$r6rr8r�is_satisfied_by4szConstraint.is_satisfied_by)rr )�__name__�
__module__�__qualname__rrrrr%�classmethodr(rr-r.r0r5r>rrrrr s"���
�
r c@s^eZdZedefdd��Zedefdd��Zdddefdd	�Z	de
fd
d�Zdefdd
�ZdS)�RequirementrcC�td��)z�The "project name" of a requirement.

        This is different from ``name`` if this requirement contains extras,
        in which case ``name`` would contain the ``[...]`` part, while this
        refers to the name of the project.
        �Subclass should override��NotImplementedErrorr/rrr�project_name?�zRequirement.project_namecCrD)z�The name identifying this requirement in the resolver.

        This is different from ``project_name`` if this requirement contains
        extras, where ``project_name`` would not contain the ``[...]`` part.
        rErFr/rrr�nameI�zRequirement.namer6rcCsdS�NFrr=rrrr>RszRequirement.is_satisfied_bycCrD�NrErFr/rrr�get_candidate_lookupU�z Requirement.get_candidate_lookupcCrDrMrFr/rrr�format_for_errorXrOzRequirement.format_for_errorN)
r?r@rA�propertyrrH�strrJr.r>�CandidateLookuprNrPrrrrrC>s	rCr,r6cCs|jr	t||j�SdSrL)�source_linkr
)r,r6rrrr7\sr7c@s�eZdZedefdd��Zedefdd��Zedefdd��Z	ede
fdd	��Zede
fd
d��Zede
efdd
��Zde
dee
efdd�Zde
efdd�Zdefdd�ZdS)rrcCrD)z�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.
        �Override in subclassrFr/rrrrHcrIzCandidate.project_namecCrD)z�The name identifying this candidate in the resolver.

        This is different from ``project_name`` if this candidate contains
        extras, where ``project_name`` would not contain the ``[...]`` part.
        rUrFr/rrrrJmrKzCandidate.namecCrD�NrUrFr/rrrr<v�zCandidate.versioncCrDrVrFr/rrr�is_installedzrWzCandidate.is_installedcCrDrVrFr/rrr�is_editable~rWzCandidate.is_editablecCrDrVrFr/rrrrT�rWzCandidate.source_link�
with_requirescCrDrVrF)r$rZrrr�iter_dependencies�rOzCandidate.iter_dependenciescCrDrVrFr/rrr�get_install_requirement�rOz!Candidate.get_install_requirementcCrDrMrFr/rrrrP�rOzCandidate.format_for_errorN)r?r@rArQrrHrRrJ�CandidateVersionr<r.rXrYrrrTrrCr[rr\rPrrrrrbs 	N)�typingrrrrr� pip._vendor.packaging.specifiersr�pip._vendor.packaging.utilsrr	�pip._vendor.packaging.versionr
r�pip._internal.models.linkrr
�pip._internal.req.req_installr�pip._internal.utils.hashesrrSr]rRrr rCr.r7rrrrr�<module>s(