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.9/site-packages/pip/_vendor/resolvelib/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/pip/_vendor/resolvelib/__pycache__/resolvers.cpython-39.pyc
a

X��eP�@sddlZddlZddlZddlmZddlmZmZmZe�	dddg�Z
Gdd	�d	e�ZGd
d�de�Z
Gdd
�d
e�ZGdd�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.9/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: {}�, css|]}t|�VqdSr��repr��.0�rrrr�	<genexpr>�z1RequirementsConflicted.__str__.<locals>.<genexpr>)�format�joinr�iter_requirement�rrrr�__str__s�zRequirementsConflicted.__str__�rrr
rr%�
__classcell__rrrrrsrcs$eZdZ�fdd�Zdd�Z�ZS)�InconsistentCandidatecs"tt|��||�||_||_dSr)rr(r�	candidater)rr)rrrrr!szInconsistentCandidate.__init__cCs$d�|jd�dd�|j��D���S)Nz+Provided candidate {!r} does not satisfy {}rcss|]}t|�VqdSrrrrrrr)r z0InconsistentCandidate.__str__.<locals>.<genexpr>)r!r)r"rr#r$rrrr%&s�zInconsistentCandidate.__str__r&rrrrr( 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||_||_||_dSr��
candidates�information�incompatibilities)rr,r-r.rrrrAszCriterion.__init__cCs d�dd�|jD��}d�|�S)Nrcss|]\}}d�||�VqdS)z({!r}, via={!r})N)r!)rZreqr	rrrrGs�z%Criterion.__repr__.<locals>.<genexpr>z
Criterion({}))r"r-r!)r�requirementsrrr�__repr__Fs
�zCriterion.__repr__cCsdd�|jD�S)Ncss|]}|jVqdSr�r�r�irrrrNr z-Criterion.iter_requirement.<locals>.<genexpr>�r-r$rrrr#MszCriterion.iter_requirementcCsdd�|jD�S)Ncss|]}|jVqdSr�r	r2rrrrQr z(Criterion.iter_parent.<locals>.<genexpr>r4r$rrr�iter_parentPszCriterion.iter_parentN)rrr
rrr0r#r6rrrrr*-s
r*c@seZdZdS)�ResolutionErrorN)rrr
rrrrr7Tsr7cseZdZ�fdd�Z�ZS)�ResolutionImpossiblecstt|��|�||_dSr)rr8r�causes)rr9rrrrYszResolutionImpossible.__init__�rrr
rr'rrrrr8Xsr8cseZdZ�fdd�Z�ZS)�ResolutionTooDeepcstt|��|�||_dSr)rr;r�round_count)rr<rrrr`szResolutionTooDeep.__init__r:rrrrr;_sr;�Statez!mapping criteria backtrack_causesc@sleZdZdZdd�Zedd��Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�Zdd�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|_dSr)�_p�_r�_states)r�provider�reporterrrrrpszResolution.__init__cCs,z|jdWSty&td��Yn0dS)N����state)rA�
IndexError�AttributeErrorr$rrrrEus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.
        rDN��mapping�criteria�backtrack_causes)rAr=rI�copyrJrK�append)r�baserErrr�_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_candidater#r.��
identifierr/r.r+)r@Zadding_requirementr?�identify�get�listr.�find_matchesr�operator�methodcaller�
attrgetterr-rMrr*rr,r)	rrJrr	rQrr.�matchesr-rrr�_add_to_criteria�s>
���
�zResolution._add_to_criteriacsD�sdS|��D].\}}t|j��fdd�|jD�|j�||<qdS)aWRemove information from parents of criteria.

        Concretely, removes all values from each criterion's ``information``
        field that have one of ``parents`` as provider of the requirement.

        :param criteria: The criteria to update.
        :param parents: Identifiers for which to remove information from all criteria.
        Ncs,g|]$}|jdus$�j�|j��vr|�qSr)r	r?rR)rr-��parentsrrr�
<listcomp>�s
�z@Resolution._remove_information_from_criteria.<locals>.<listcomp>)�itemsr*r,r-r.)rrJr\�keyrrr[r�!_remove_information_from_criteria�s	��z,Resolution._remove_information_from_criteriac	Cs>|jj||jjt|jjt�d��t|jjt�d��|jjd�S)Nr,r-)rQZresolutionsr,r-rK)	r?Zget_preferencerErIrrJrVrXrK)r�namerrr�_get_preference�s���zResolution._get_preferencecsBz�jj|�Wnty$YdS0t��fdd�|��D��S)NFc3s|]}�jj|�d�VqdS�)rr)N�r?Zis_satisfied_byr�Zcurrent_pinrrrr�s�z8Resolution._is_current_pin_satisfying.<locals>.<genexpr>)rErI�KeyError�allr#)rrarrrer�_is_current_pin_satisfying�s�z%Resolution._is_current_pin_satisfyingcCs4|jj��}|jj|d�D]}|j|||d�q|S)N�r)r5)rErJrLr?�get_dependenciesrZ)rr)rJrrrr�_get_updated_criteria�sz Resolution._get_updated_criteriacs��jj|}g}|jD]ȉz����}WnLtyt}z4�j�|j��|�|j�WYd}~qWYd}~n
d}~00t	��fdd�|�
�D��}|s�t�|���jj�d��jj�
|��jj�|d���jj|<gS|S)Nc3s|]}�jj|�d�VqdSrcrdr�r)rrrr�s�z7Resolution._attempt_to_pin_criterion.<locals>.<genexpr>ri)rErJr,rkrr@Zrejecting_candidaterrMrgr#r(Zpinning�updaterI�pop)rrarr9rJ�eZ	satisfiedrrlr�_attempt_to_pin_criterion�s(
"�
z$Resolution._attempt_to_pin_criterionc	st�dd�|D�dd�|D��}�fdd�|D�}t�j�dkr��jd=d}|s�z�j��}|j��\}}Wnttfy�t	|��Yn0�fd	d��j
�|�D�}|�|�}qLd
d�|j
��D����||gf���fdd
�}	���|	�}
|
r2dSq2dS)a2Perform backjumping.

        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.  Identify Z. The incompatibility is not always caused by the latest
            state. For example, given three requirements A, B and C, with
            dependencies A1, B1 and C1, where A1 and B1 are incompatible: the
            last state might be related to C, so we want to discard the
            previous state.
        2.  Discard Z.
        3.  Discard Y but remember its incompatibility information gathered
            previously, and the failure we're dealing with right now.
        4.  Push a new state Y' based on X, and apply the incompatibility
            information from Y to Y'.
        5a. If this causes Y' to conflict, we need to backtrack again. Make Y'
            the new Z and go back to step 2.
        5b. If the incompatibilities apply cleanly, end backtracking.
        css|]}|jdur|jVqdSrr5�r�crrrr.r z'Resolution._backjump.<locals>.<genexpr>css|]}|jVqdSrr1rqrrrr/r csh|]}�j�|��qSr�r?rRrr$rr�	<setcomp>1r z'Resolution._backjump.<locals>.<setcomp>�rDFcsh|]}�j�|��qSrrs)r�dr$rrrt?s�cSsg|]\}}|t|j�f�qSr)rTr.�r�k�vrrrr]Gs�z(Resolution._backjump.<locals>.<listcomp>c	s��D]�\}}|sqz�jj|}Wnty8YqYn0�jj|t�jjt�d��t�jjt�d�||i�d�}t	|�}|s�dS|�
|j�t|t
|j�|d��jj|<qdS)Nr#r.rPFr+T)rErJrfr?rUrrVrWrXr�extendr.r*rTr-)rxr.rrYr,�Zincompatibilities_from_brokenrrr�_patch_criteriaQs:
����z-Resolution._backjump.<locals>._patch_criteriaT)�	itertools�chain�lenrArnrI�popitemrFrfr8r?rj�
isdisjointrJr^rMrO)rr9Zincompatible_reqsZincompatible_depsZincompatible_stateZbroken_staterar)Zcurrent_dependenciesr|�successrr{r�	_backjumps<�


���zResolution._backjumpcs��jrtd���j��tt��igd�g�_|D]N}z�j�jj	|dd�Wq2t
y~}zt|jj
��WYd}~q2d}~00q2���t|�D�]}�jj|d��fdd��jj	��D�}|sވjj�jd��jSt�jj	���t|��t|�jd�}��|�}|�r^d	d�|D�}	�jj|	d
���|	�}
|	�jjdd�<|
�s�t�jj��n4��fdd��jj	��D�}���jj	|�����jj|�jd
�q�t|��dS)Nzalready resolvedrHr5)�indexcs g|]\}}��||�s|�qSr�rh�rr_rr$rrr]�s�z&Resolution.resolve.<locals>.<listcomp>)rE)r_cSsg|]}|jD]}|�qqSrr4)rrrr3rrrr]�r )r9cs(h|] \}}|�vr��||�s|�qSrr�r��Zsatisfied_namesrrrrt�s�z%Resolution.resolve.<locals>.<setcomp>)r�rE)rA�RuntimeErrorr@Zstartingr=�collections�OrderedDictrZrErJrr8rr-rO�rangeZstarting_roundr^Zending�set�keys�minrbrpZresolving_conflictsr�rKr`Zending_roundr;)rr/�
max_roundsrroZround_indexZunsatisfied_namesraZfailure_causesr9r�Znewly_unsatisfied_namesrr�r�resolve}sX
��$

�
�


��zResolution.resolveN)rrr
rr�propertyrErOrZr`rbrhrkrpr�r�rrrrr>is
'
%or>c	Cs�||vrdS||vrdS||��D]b}z|t|�}WntyNYq$Yn0||vrh|�|�dSt||||�r$|�|�dSq$dS)NTF)r6�idrf�add�_has_route_to_root)rJr_�all_keys�	connected�p�pkeyrrrr��s 


r��Resultzmapping graph criteriac
s�|j}dd�|��D�}d|td�<t�}|�d�dh�|j��D]�\}}t|j||��s^qD||vrp|�|�|��D]J}z|t|�}Wnty�YqxYn0||vr�|�|�|�	||�qxqDt
�fdd�|��D�||jd�S)NcSsi|]\}}t|�|�qSr)r�rwrrr�
<dictcomp>�r z!_build_result.<locals>.<dictcomp>csi|]\}}|�vr||�qSrrrw�r�rrr��r )rI�graphrJ)rIr^r�rr�rJr�r6rfZconnectr�)rErIr�r�r_rr�r�rr�r�
_build_result�s0



�r�c@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.
        )r�)r>rBrCr�r�)rr/r�Z
resolutionrErrrr�szResolver.resolveN)r�)rrr
rr
Zbase_exceptionr�rrrrr�sr�)r�r}rVZ	providersrZstructsrrr�
namedtupler�	Exceptionr
rr(�objectr*r7r8r;r=r>r�r�r�r�rrrr�<module>s,�
'e

Youez - 2016 - github.com/yon3zu
LinuXploit