2biPSSKrSSKrSSKrSSKJr SSKJrJrJr \R"SSS/5r "SS \ 5r "S S \ 5r "S S \ 5r"SS\5r"SS\ 5r"SS\5r"SS\5r\R"SS5r"SS\5rSr\R"SS5rSr"SS\5rg) N)AbstractResolver) DirectedGraphIteratorMappingbuild_iter_viewRequirementInformation requirementparentc\rSrSrSrSrg)ResolverException zA 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____firstlineno____doc____static_attributes__rڒ/builddir/build/BUILDROOT/alt-python313-pip-23.3.1-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/pip/_vendor/resolvelib/resolvers.pyr r srr c.^\rSrSrU4SjrSrSrU=r$)RequirementsConflictedc8>[[U] U5 XlgN)superr__init__ criterion)selfr __class__s rrRequirementsConflicted.__init__s $d4Y?"rcSRSRSURR5555$)NzRequirements conflict: {}, c38# UHn[U5v M g7frrepr.0rs r 1RequirementsConflicted.__str__..I'H!d1gg'H)formatjoinriter_requirementrs r__str__RequirementsConflicted.__str__s4*11 IIIt~~'F'F'HI I  r)rrrrrrr2r __classcell__r s@rrrs#  rrc.^\rSrSrU4SjrSrSrU=r$)InconsistentCandidate cD>[[U] X5 XlX lgr)rr8r candidater)rr;rr s rrInconsistentCandidate.__init__!s #T3II""rcSRURSRSURR 5555$)Nz+Provided candidate {!r} does not satisfy {}r#c38# UHn[U5v M g7frr%r's rr*0InconsistentCandidate.__str__..)r,r-)r.r;r/rr0r1s rr2InconsistentCandidate.__str__&s;<CC NN IIIt~~'F'F'HI I  r)r;rr4r6s@rr8r8 s#   rr8c0\rSrSrSrSrSrSrSrSr g) Criterion-aRepresentation 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(XlX lX0lgr candidates informationincompatibilities)rrFrGrHs rrCriterion.__init__As$&!2rchSRSUR55nSRU5$)Nr#c3H# UHupSRX5v M g7f)z({!r}, via={!r})N)r.)r(reqr s rr*%Criterion.__repr__..Gs'! /   % %c 2 2/s "z Criterion({}))r/rGr.)r requirementss r__repr__Criterion.__repr__Fs6yy! #//!  %%l33rc(SUR5$)Nc38# UHoRv M g7frr r(is rr*-Criterion.iter_requirement..Ns8'7! '7r-rGr1s rr0Criterion.iter_requirementMs8t'7'788rc(SUR5$)Nc38# UHoRv M g7frr rTs rr*(Criterion.iter_parent..Qs3"2Q"2r-rWr1s r iter_parentCriterion.iter_parentPs3$"2"233r)rFrHrGN) rrrrrrrOr0r]rrrrrBrB-s&3 494rrBc\rSrSrSrg)ResolutionErrorTrN)rrrrrrrrr`r`Tsrr`c(^\rSrSrU4SjrSrU=r$)ResolutionImpossibleXc8>[[U] U5 Xlgr)rrcrcauses)rrfr s rrResolutionImpossible.__init__Ys "D26: rrfrrrrrrr5r6s@rrcrcXs rrcc(^\rSrSrU4SjrSrU=r$)ResolutionTooDeep_c8>[[U] U5 Xlgr)rrkr round_count)rrnr s rrResolutionTooDeep.__init__`s / <&r)rnrir6s@rrkrk_s ''rrkStatez!mapping criteria backtrack_causescd\rSrSrSrSr\S5rSrSr Sr Sr S r S r S rS rS rSrg) ResolutionizStateful resolution object. This is designed as a one-off object that holds information to kick start the resolution process, and holds the results afterwards. c*XlX l/Ulgr_p_r_states)rproviderreporters rrResolution.__init__ps rcTURS$![a [S5ef=f)Nstate)rx IndexErrorAttributeErrorr1s rr~Resolution.stateus0 *<<# # * ) ) *s'cURSn[URR5URR5UR SSS9nURR U5 g)zqPush a new state into history. This new state will be used to hold resolution results of the next coming round. r}Nmappingcriteriabacktrack_causes)rxrprcopyrrappend)rbaser~s r_push_new_stateResolution._push_new_state|s^ ||BLL%%']]'')!2215  E"rc nURRX#S9 URRUS9nUR U5nU(a[ UR 5nO/nURRU[U[R"S5XB/05[U[R"S5XF05S9nU(a0[ UR5nUR[X#55 O [X#5/n[[!U5UUS9nUR"(d [%U5eXQU'g)N)r r )requirement_or_candidater0rH identifierrNrHrE)rwadding_requirementrvidentifygetlistrH find_matchesroperator methodcaller attrgetterrGrrrBrrFr) rrr r rrrHmatchesrGs r_add_to_criteriaResolution._add_to_criterias" ""{"JWW%%{%K LL,  $Y%@%@ A  " ''&&!(%%&89]+ .##$78/'   y445K   5kJ K1+FGK&w/#/ ##(3 3(rc <U(dgUR5H{up4[URURVs/sH=nURb+UR R UR5U;dM;UPM? snUR5X'M} gs snf)a/Remove 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. N)itemsrBrFrGr rvrrH)rrparentskeyrrGs r!_remove_information_from_criteria,Resolution._remove_information_from_criterias &nn.NC%$$(1'<'<'< #**277++K,>,>?wN  '<++ HM/s :B :B c TURRUURR[ URR [ R"S55[ URR [ R"S55URRS9$)NrFrG)r resolutionsrFrGr) rvget_preferencer~rrrrrr)rnames r_get_preferenceResolution._get_preferencesww%% **& ####L1( ####M2"ZZ88&  rc^^TRRUm[UU4SjUR 555$![a gf=f)NFc3X># UHnTRRUTS9v M! g7f)r r;Nrvis_satisfied_by)r(r) current_pinrs rr*8Resolution._is_current_pin_satisfying..s, 1 GG # #[ # I1'*)r~rKeyErrorallr0)rrrrs` @r_is_current_pin_satisfying%Resolution._is_current_pin_satisfyingsU **,,T2K //1     sA A AcURRR5nURR US9HnUR X#US9 M U$)Nr;r[)r~rrrvget_dependenciesr)rr;rr s r_get_updated_criteria Resolution._get_updated_criteriasO::&&++-7733i3HK  ! !( ! JIrc^^TRRUn/nURHmTRT5n[UU4SjUR555nU(d [TU5eTR RTS9 TRRRU5 TRRRUS5 TTRRU'/s $ U$![aMnTR R URT5 URUR5 SnAGM#SnAff=f)Nc3X># UHnTRRUTS9v M! g7frr)r(r)r;rs rr*7Resolution._attempt_to_pin_criterion..s,5A''A'K5rr)r~rrFrrrwrejecting_candidaterrrr0r8pinningupdaterpop)rrrrfre satisfiedr;s` @r_attempt_to_pin_criterion$Resolution._attempt_to_pin_criterionsJJ''- "--I 55i@"335I+IyAA GGOOiO 0 JJ   & &x 0 JJ   " "4 .'0DJJ  t $I7.> 9* ++AKKC akk* sC;; EAE  Ec^^[R"SU5SU55nUVs1sHnTRRU5iM nn[ TR 5S:GaJTR S SnU(dTR R 5nURR5upxTRRU5V s1sHn TRRU 5iM n n U RU5(+nU(dMWRR5V V s/sHupU [!U R"54PM sn n mTR%WW/45 UU4Sjn TR'5 U "5nU(ag[ TR 5S:aGMJgs snf![[4a [U5ef=fs sn fs sn n f)arPerform 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. c3V# UHoRcMURv M! g7frr[r(cs rr*'Resolution._backjump...s >v!XQXXvs))c38# UHoRv M g7frrSrs rr*r/s +Fq]]Fr-r}Fc T>TGHupU(dMTRRUnTRR U[ TRR[ R"S55[ TRR[ R"S5X05S9n[U5nU(d gURUR5 [U[UR5US9TRRU'GM g![a GM"f=f)Nr0rHrFrET)r~rrrvrrrrrrextendrHrBrrG)krHrrrFincompatibilities_from_brokenrs r_patch_criteria-Resolution._backjump.._patch_criteriaQs ,I(A, !$(JJ$7$7$: #gg22#$%4 JJ//$112DE&+: JJ//$//0CD2+ 3 G"1!9J%$%,,Y-H-HI-6#-$()>)>$?*;.DJJ''*/-J8/$! !sD D'&D'T) itertoolschainrvrlenrxrrpopitemrrrcr isdisjointrrrrHrr)rrfincompatible_reqsr)incompatible_depsincompatible_state broken_staterr;dcurrent_dependenciesrvrsuccessrs` @r _backjumpResolution._backjumps>&OO >v > +F + ;LL:KQTWW--a0:KL$,,1$ R "' (7#'<<#3#3#5L&2&:&:&B&B&DOD "WW55i@(@GG$$Q'@%(*>)H)H%*&")(")11779-9DAD,,-.9- ) * 0 0$ 1D E >  "%'GG$,,1$RUM#H-7.v667(-s%F86F=%G:#G!=Gc UR(a [S5eURR5 [ [ R "50/S9/UlUH)nURURRUSS9 M+ UR5 [U5GHHnURR!US9 URRR#5VVs/sHupgUR%Xg5(aMUPM! nnnU(d1URR'URS9 URs $[)URRR+55[)U5- n [-XR.S9n UR1U 5n U (aU V V s/sHoRHoPM M nn n URR3US9 UR5U5nXRR6SS&U(d[URR65eOURRR#5VVs1sH&upgXi;dM UR%Xg5(aM$UiM( nnnUR9URRU5 UR5 URR;XPRS9 GMK [=U5e![a$n[URR5eSnAff=fs snnfs sn n fs snnf) Nzalready resolvedrr[)index)r~)rrh)rr~)rx RuntimeErrorrwstartingrp collections OrderedDictrr~rrrcrrGrrangestarting_roundrrendingsetkeysminrrresolving_conflictsrrr ending_roundrk)rrN max_roundsr)r round_indexrrunsatisfied_namessatisfied_namesrfailure_causesrrUrfrnewly_unsatisfied_namess rresolveResolution.resolve}s <<12 2  #//1!#   A D%%djj&9&91T%J  ,K GG " " " 5'+jj&9&9&?&?&A!&ANC66sF&A !%TZZ0zz!"$**"5"5":":"<=!AO (.B.BCD!;;DAN%3K^]]!]!^K++6+:..017 ++A..tzz/J/JKK+/***=*=*C*C*E+*E-!;;CK*E(+ 66JJ'')@$$& GG {** Ec-f ++w* D*1;;+B+BCC D!*L+s<!%K=)L. L.3L4$ L:3L: L:= L+L&&L+ruN)rrrrrrpropertyr~rrrrrrrrrrrrrrrrrisR  ** #%)N2    #Jm^L,rrrcX;agX;agXR5HNnU[U5nXS;aURU5 g[ XX#5(dM=URU5 g g![a M`f=f)NTF)r]idradd_has_route_to_root)rrall_keys connectedppkeys rrrs   ] & & ( BqE?D   MM#  hh B B MM# )    sA22 B?BResultzmapping graph criteriacURnUR5VVs0sHup#[U5U_M nnnSU[S5'[5nUR S5 S1nUR R5Hupx[ UR XtU5(dM#Xu;aUR U5 UR5H9n U[U 5n X;aUR U 5 URX5 M; M [UR5VVs0sHup#X&;dM X#_M snnUUR S9$s snnf![a Mf=fs snnf)N)rgraphr) rrrrrrrr]rconnectr) r~rrrrrrrrrrs r _build_resultrs3mmG%,]]_5_TQ1q_H5HRX OE IIdOI....0!%..#KK    IIcN&&(A 1  $ MM$ $) 1 ")--/D/$!Q^/D +6  Es#E E# E! 2E!  EEc&\rSrSrSr\rSSjrSrg)Resolveriz3The thing that performs the actual resolution work.cv[URUR5nURXS9n[ U5$)afTake 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)rrryrzrr)rrNr resolutionr~s rrResolver.resolves68  t}}= ""<"GU##rrN)d) rrrrrr base_exceptionrrrrrrrs=&N$rr)rrr providersrstructsrrr namedtupler Exceptionr rr8objectrBr`rcrkrprrrrrrrrrrs'DD$//}h7   .   -  $4$4N ' ?'' w(KL`,`,F &   *B C<#$#$r