U
ʗReD @ s d dl Z d dlZddlmZ ddlmZmZmZ e dddgZ G dd d e
ZG d
d deZG dd
d
eZ
G dd deZG dd deZG dd deZG dd deZe ddZG dd deZdd Ze ddZdd ZG d d! d!eZdS )" N )AbstractResolver)
DirectedGraphIteratorMappingbuild_iter_viewRequirementInformationrequirementparentc @ s e Zd ZdZdS )ResolverExceptionzA 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__ r r /builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.pyr
s r
c s$ e Zd Z fddZdd Z ZS )RequirementsConflictedc s t t| | || _d S N)superr __init__ criterion)selfr __class__r r r s zRequirementsConflicted.__init__c C s d ddd | j D S )NzRequirements conflict: {}, c s s | ]}t |V qd S r repr.0rr r r s z1RequirementsConflicted.__str__..)formatjoinr iter_requirementr r r r __str__ s zRequirementsConflicted.__str__r r r
r r$
__classcell__r r r r r s r c s$ e Zd Z fddZdd Z ZS )InconsistentCandidatec s" t t| || || _|| _d S r )r r' r candidater )r r( r r r r r s zInconsistentCandidate.__init__c C s$ d | jddd | j D S )Nz+Provided candidate {!r} does not satisfy {}r c s s | ]}t |V qd S r r r r r r r ( s z0InconsistentCandidate.__str__..)r r( r! r r" r# r r r r$ % s zInconsistentCandidate.__str__r% r r r r r' s r' c @ s0 e Zd ZdZdd Zdd Zdd Zdd Zd
S ) CriterionaQ Representation 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.
c C s || _ || _|| _d S r
candidatesinformationincompatibilities)r r+ r, r- r r r r @ s zCriterion.__init__c C s d dd | jD }d|S )Nr c s s | ]\}}d ||V qdS )z({!r}, via={!r})N)r )r reqr r r r r F s z%Criterion.__repr__..z
Criterion({}))r! r, r )r requirementsr r r __repr__E s
zCriterion.__repr__c C s dd | j D S )Nc s s | ]}|j V qd S r )r r ir r r r M s z-Criterion.iter_requirement..r, r# r r r r" L s zCriterion.iter_requirementc C s dd | j D S )Nc s s | ]}|j V qd S r r r1 r r r r P s z(Criterion.iter_parent..r3 r# r r r iter_parentO s zCriterion.iter_parentN)r r r
r r r0 r" r5 r r r r r) , s
r) c @ s e Zd ZdS )ResolutionErrorN)r r r
r r r r r6 S s r6 c s e Zd Z fddZ ZS )ResolutionImpossiblec s t t| | || _d S r )r r7 r causes)r r8 r r r r X s zResolutionImpossible.__init__r r r
r r&