403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.7/site-packages/pip/_vendor/resolvelib/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.7/site-packages/pip/_vendor/resolvelib/__pycache__/resolvers.cpython-37.pyc
B

�N�a�D�@s�ddlZddlZddlmZddlmZmZmZe�dddg�Z	Gdd	�d	e
�ZGd
d�de�ZGdd
�d
e�Z
Gdd�de�ZGdd�de�ZGdd�de�ZGdd�de�Ze�dd�ZGdd�de�Zdd�Ze�dd�Zdd�ZGd d!�d!e�ZdS)"�N�)�AbstractResolver)�
DirectedGraph�IteratorMapping�build_iter_view�RequirementInformation�requirement�parentc@seZdZdZdS)�ResolverExceptionz�A base class for all exceptions raised by this module.

    Exceptions derived by this class should all be handled in this module. Any
    bubbling pass the resolver should be treated as a bug.
    N)�__name__�
__module__�__qualname__�__doc__�rr�D/usr/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.pyr

sr
cs$eZdZ�fdd�Zdd�Z�ZS)�RequirementsConflictedcstt|��|�||_dS)N)�superr�__init__�	criterion)�selfr)�	__class__rrrszRequirementsConflicted.__init__cCs d�d�dd�|j��D���S)NzRequirements conflict: {}z, css|]}t|�VqdS)N)�repr)�.0�rrrr�	<genexpr>sz1RequirementsConflicted.__str__.<locals>.<genexpr>)�format�joinr�iter_requirement)rrrr�__str__szRequirementsConflicted.__str__)rrr
rr�
__classcell__rr)rrrsrcs$eZdZ�fdd�Zdd�Z�ZS)�InconsistentCandidatecs"tt|��||�||_||_dS)N)rr r�	candidater)rr!r)rrrr!szInconsistentCandidate.__init__cCs$d�|jd�dd�|j��D���S)Nz+Provided candidate {!r} does not satisfy {}z, css|]}t|�VqdS)N)r)rrrrrr)sz0InconsistentCandidate.__str__.<locals>.<genexpr>)rr!rrr)rrrrr&szInconsistentCandidate.__str__)rrr
rrrrr)rrr  sr c@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�	CriterionaQRepresentation of possible resolution results of a package.

    This holds three attributes:

    * `information` is a collection of `RequirementInformation` pairs.
      Each pair is a requirement contributing to this criterion, and the
      candidate that provides the requirement.
    * `incompatibilities` is a collection of all known not-to-work candidates
      to exclude from consideration.
    * `candidates` is a collection containing all possible candidates deducted
      from the union of contributing requirements and known incompatibilities.
      It should never be empty, except when the criterion is an attribute of a
      raised `RequirementsConflicted` (in which case it is always empty).

    .. note::
        This class is intended to be externally immutable. **Do not** mutate
        any of its attribute containers.
    cCs||_||_||_dS)N)�
candidates�information�incompatibilities)rr#r$r%rrrrAszCriterion.__init__cCs d�dd�|jD��}d�|�S)Nz, css|]\}}d�||�VqdS)z({!r}, via={!r})N)r)rZreqr	rrrrHsz%Criterion.__repr__.<locals>.<genexpr>z
Criterion({}))rr$r)r�requirementsrrr�__repr__FszCriterion.__repr__cCsdd�|jD�S)Ncss|]}|jVqdS)N)r)r�irrrrNsz-Criterion.iter_requirement.<locals>.<genexpr>)r$)rrrrrMszCriterion.iter_requirementcCsdd�|jD�S)Ncss|]}|jVqdS)N)r	)rr(rrrrQsz(Criterion.iter_parent.<locals>.<genexpr>)r$)rrrr�iter_parentPszCriterion.iter_parentN)rrr
rrr'rr)rrrrr"-s
r"c@seZdZdS)�ResolutionErrorN)rrr
rrrrr*Tsr*cseZdZ�fdd�Z�ZS)�ResolutionImpossiblecstt|��|�||_dS)N)rr+r�causes)rr,)rrrrYszResolutionImpossible.__init__)rrr
rrrr)rrr+Xsr+cseZdZ�fdd�Z�ZS)�ResolutionTooDeepcstt|��|�||_dS)N)rr-r�round_count)rr.)rrrr`szResolutionTooDeep.__init__)rrr
rrrr)rrr-_sr-�Statez!mapping criteria backtrack_causesc@sdeZdZdZdd�Zedd��Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�ZdS)�
Resolutionz�Stateful resolution object.

    This is designed as a one-off object that holds information to kick start
    the resolution process, and holds the results afterwards.
    cCs||_||_g|_dS)N)�_p�_r�_states)r�provider�reporterrrrrpszResolution.__init__cCs,y
|jdStk
r&td��YnXdS)N����state)r3�
IndexError�AttributeError)rrrrr7us
zResolution.statecCs>|jd}t|j��|j��|jdd�d�}|j�|�dS)z�Push a new state into history.

        This new state will be used to hold resolution results of the next
        coming round.
        r6N)�mapping�criteria�backtrack_causes)r3r/r:�copyr;r<�append)r�baser7rrr�_push_new_state|s
zResolution._push_new_statec	Cs�|jj||d�|jj|d�}|�|�}|r8t|j�}ng}|jj|t|t	�
d�||gi�t|t	�d�||i�d�}|r�t|j�}|�
t||��nt||�g}tt|�||d�}|js�t|��|||<dS)N)rr	)Zrequirement_or_candidaterr%)�
identifierr&r%)r#r$r%)r2Zadding_requirementr1Zidentify�get�listr%�find_matchesr�operator�methodcaller�
attrgetterr$r>rr"rr#r)	rr;rr	rArr%�matchesr$rrr�_add_to_criteria�s6


zResolution._add_to_criteriac	Cs>|jj||jjt|jjt�d��t|jjt�d��|jjd�S)Nr#r$)rAZresolutionsr#r$r<)	r1Zget_preferencer7r:rr;rErGr<)r�namerrr�_get_preference�s

zResolution._get_preferencecsBy�jj|�Wntk
r$dSXt��fdd�|��D��S)NFc3s|]}�jj|�d�VqdS))rr!N)r1�is_satisfied_by)rr)�current_pinrrrr�sz8Resolution._is_current_pin_satisfying.<locals>.<genexpr>)r7r:�KeyError�allr)rrJrr)rMrr�_is_current_pin_satisfying�sz%Resolution._is_current_pin_satisfyingcCs8|jj��}x&|jj|d�D]}|j|||d�qW|S)N)r!)r	)r7r;r=r1Zget_dependenciesrI)rr!r;rrrr�_get_updated_criteria�sz Resolution._get_updated_criteriacs��jj|}g}x�|jD]��y����}Wn0tk
rZ}z|�|j�wWdd}~XYnXt��fdd�|��D��}|s�t	�|���j
j�d��jj�|��jj
�|d���jj
|<gSW|S)Nc3s|]}�jj|�d�VqdS))rr!N)r1rL)rr)r!rrrr�sz7Resolution._attempt_to_pin_criterion.<locals>.<genexpr>)r!)r7r;r#rQrr>rrOrr r2Zpinning�updater:�pop)rrJrr,r;�eZ	satisfiedr)r!rr�_attempt_to_pin_criterion�s&
z$Resolution._attempt_to_pin_criterioncs�x�t�j�dkr��jd=�j��}|j��\}}dd�|j��D����||gf��jj	|d���fdd�}��
�|�}|rdSqWd	S)
a�Perform backtracking.

        When we enter here, the stack is like this::

            [ state Z ]
            [ state Y ]
            [ state X ]
            .... earlier states are irrelevant.

        1. No pins worked for Z, so it does not have a pin.
        2. We want to reset state Y to unpinned, and pin another candidate.
        3. State X holds what state Y was before the pin, but does not
           have the incompatibility information gathered in state Y.

        Each iteration of the loop will:

        1.  Discard Z.
        2.  Discard Y but remember its incompatibility information gathered
            previously, and the failure we're dealing with right now.
        3.  Push a new state Y' based on X, and apply the incompatibility
            information from Y to Y'.
        4a. If this causes Y' to conflict, we need to backtrack again. Make Y'
            the new Z and go back to step 2.
        4b. If the incompatibilities apply cleanly, end backtracking.
        �r6cSsg|]\}}|t|j�f�qSr)rCr%)r�k�vrrr�
<listcomp>sz)Resolution._backtrack.<locals>.<listcomp>)r!c	s�x��D]�\}}|sqy�jj|}Wntk
r:wYnX�jj|t�jjt�d��t�jjt�d�||i�d�}t	|�}|s�dS|�
|j�t|t
|j�|d��jj|<qWdS)Nrr%)rAr&r%F)r#r$r%T)r7r;rNr1rDrrErFrGr�extendr%r"rCr$)rWr%rrHr#)�incompatibilities_from_brokenrrr�_patch_criteria!s2
z.Resolution._backtrack.<locals>._patch_criteriaTF)�lenr3rSr:�popitemr;�itemsr>r2Zbacktrackingr@)rZbroken_staterJr!r\�successr)r[rr�
_backtrack�s
zResolution._backtrackc
sZ�jrtd���j��tt��igd�g�_xT|D]L}y�j�jj	|dd�Wq4t
k
r~}zt|jj
��Wdd}~XYq4Xq4W���x�t|�D]�}�jj|d��fdd��jj	��D�}|s܈jj�jd��jSt|�jd�}��|�}|�r0���}	d	d�|D��jjdd�<|	�s8t�jj��n����jj|�jd
�q�Wt|��dS)Nzalready resolved)r:r;r<)r	)�indexcs g|]\}}��||�s|�qSr)rP)r�keyr)rrrrYjsz&Resolution.resolve.<locals>.<listcomp>)r7)rccSsg|]}|jD]}|�qqSr)r$)r�cr(rrrrY}s)rbr7)r3�RuntimeErrorr2Zstartingr/�collections�OrderedDictrIr7r;rr+rr$r@�rangeZstarting_roundr_Zending�minrKrUrar<Zending_roundr-)
rr&�
max_roundsrrTZround_indexZunsatisfied_namesrJZfailure_causesr`r)rr�resolveMs<

"

zResolution.resolveN)rrr
rr�propertyr7r@rIrKrPrQrUrarkrrrrr0is'
$Yr0c	Cs�||krdS||krdSxn||��D]^}y|t|�}Wntk
rPw&YnX||krh|�|�dSt||||�r&|�|�dSq&WdS)NTF)r)�idrN�add�_has_route_to_root)r;rc�all_keys�	connected�p�pkeyrrrro�s 

ro�Resultzmapping graph criteriac
s�|j}dd�|��D�}d|td�<t�}|�d�dh�x�|j��D]�\}}t|j||��s`qF||krr|�|�xV|��D]J}y|t|�}Wntk
r�w|YnX||kr�|�|�|�	||�q|WqFWt
�fdd�|��D�||jd�S)NcSsi|]\}}|t|��qSr)rm)rrWrXrrr�
<dictcomp>�sz!_build_result.<locals>.<dictcomp>csi|]\}}|�kr||�qSrr)rrWrX)rqrrru�s)r:�graphr;)r:r_rmrrnr;ror)rNZconnectrt)r7r:rprvrcrrrrsr)rqr�
_build_result�s.


rwc@seZdZdZeZddd�ZdS)�Resolverz3The thing that performs the actual resolution work.�dcCs$t|j|j�}|j||d�}t|�S)aTake a collection of constraints, spit out the resolution result.

        The return value is a representation to the final resolution result. It
        is a tuple subclass with three public members:

        * `mapping`: A dict of resolved candidates. Each key is an identifier
            of a requirement (as returned by the provider's `identify` method),
            and the value is the resolved candidate.
        * `graph`: A `DirectedGraph` instance representing the dependency tree.
            The vertices are keys of `mapping`, and each edge represents *why*
            a particular package is included. A special vertex `None` is
            included to represent parents of user-supplied requirements.
        * `criteria`: A dict of "criteria" that hold detailed information on
            how edges in the graph are derived. Each key is an identifier of a
            requirement, and the value is a `Criterion` instance.

        The following exceptions may be raised if a resolution cannot be found:

        * `ResolutionImpossible`: A resolution cannot be found for the given
            combination of requirements. The `causes` attribute of the
            exception is a list of (requirement, parent), giving the
            requirements that could not be satisfied.
        * `ResolutionTooDeep`: The dependency tree is too deeply nested and
            the resolver gave up. This is usually caused by a circular
            dependency, but you can try to resolve this by increasing the
            `max_rounds` argument.
        )rj)r0r4r5rkrw)rr&rjZ
resolutionr7rrrrk�szResolver.resolveN)ry)rrr
rr
Zbase_exceptionrkrrrrrx�srx)rfrEZ	providersrZstructsrrr�
namedtupler�	Exceptionr
rr �objectr"r*r+r-r/r0rortrwrxrrrr�<module>s(
'%

Youez - 2016 - github.com/yon3zu
LinuXploit