\h$~RddlZddlZddlZddlmZmZmZmZmZm Z m Z m Z m Z m Z mZmZmZmZddlmZddlmZddlmZmZddlmZddlmZmZddlmZm Z m!Z!m"Z"m#Z#dd l$m%Z%dd l&m'Z'm(Z(dd l)m*Z*dd l+m,Z,dd l-m.Z.ddl/m0Z0m1Z1ddl2m3Z3m4Z4ddl5m6Z6ddl7m8Z8ddl9m:Z:ddl;mZ>ddl?m@Z@mAZAmBZBmCZCddlDmEZEmFZFmGZGmHZHmIZImJZJmKZKddlLmMZMmNZNddlOmPZPmQZQmRZRmSZSmTZTerddlmUZUGddeUZVejeXZYedZZee*eZfZ[Gdde Z\Gd d!Z]y)"N) TYPE_CHECKINGDict FrozenSetIterableIteratorListMapping NamedTupleOptionalSequenceSetTupleTypeVarcast)InvalidRequirement) SpecifierSet)NormalizedNamecanonicalize_name)ResolutionImpossible) CacheEntry WheelCache)DistributionNotFoundInstallationErrorMetadataInconsistentUnsupportedPythonVersionUnsupportedWheel) PackageFinder)BaseDistributionget_default_environment)Link)Wheel)RequirementPreparer)install_req_drop_extrasinstall_req_from_link_and_ireq)InstallRequirementcheck_invalid_constraint_type)InstallRequirementProvider) get_supported)Hashes)get_requirement)running_under_virtualenv) CandidateCandidateVersion Constraint Requirement)AlreadyInstalledCandidate BaseCandidateEditableCandidateExtrasCandidate LinkCandidateRequiresPythonCandidateas_base_candidate)FoundCandidatesIndexCandidateInfo)ExplicitRequirementRequiresPythonRequirementSpecifierRequirement!SpecifierWithoutExtrasRequirementUnsatisfiableRequirement)Protocolc"eZdZUeed<eed<y) ConflictCause requirementparentN)__name__ __module__ __qualname__r;__annotations__r-n/root/niggaflix-v3/playground/venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/factory.pyrArAKs..rIrACcFeZdZUeeed<eeefed<eee fed<y)CollectedRootRequirements requirements constraintsuser_requestedN) rDrErFrr0rGrstrr/intrHrIrJrMrMVs*{##c:o&&cN"rIrMceZdZ d@dedededeedededed ed ee e d fd dfd Z e d efdZ ded dfdZdddedeedeed efdZdedeeded efdZdedeededeedeed eef dZdededeedeed eef dZdeededed ed!e e d e!ef d"Z"d#e!e#deed e$efd$Z%d%ed&e&ded e$efd'Z'd%ed(e(ee!e#fd)e(ee$efd&e&d ed e!ef d*Z)d+ed,e!ed e$e#fd-Z*d.e+ed e,fd/Z-d0ed e.fd1Z/ dAdedeed,e!ed e$e#fd2Z0ded ee#fd3Z1dedeed ee2fd4Z3d0ed eefd5Z4d6ed7d e5fd8Z6d9e#d:eed e7fd;Z8de9ee&fd e:fd?Z;y)BFactoryNfinderpreparermake_install_req wheel_cache use_user_siteforce_reinstallignore_installedignore_requires_pythonpy_version_info.returnc ^||_||_||_t| |_||_||_||_||_i|_ i|_ i|_ i|_ i|_ |s;t} | jdD cic]} | j | c} |_yi|_ycc} w)NF) local_only)_finderrV _wheel_cacher6_python_candidate_make_install_req_from_spec_use_user_site_force_reinstall_ignore_requires_python_build_failures_link_candidate_cache_editable_candidate_cache_installed_candidate_cache_extras_candidate_cacheriter_installed_distributionscanonical_name_installed_dists) selfrUrVrWrXrYrZr[r\r]envdists rJ__init__zFactory.__init__]s   '!8!I+;(+ /'=$9;;="CE&PR'  $ )+C <<<N%##T)%D ! %'D ! %sB*c|jSN)rf)rps rJrZzFactory.force_reinstalls$$$rIlinkc|jsyt|j}|j|jj j ry|jd}t|)Nz+ is not a supported wheel on this platform.)is_wheelr!filename supportedra target_pythonget_unsorted_tagsr)rprvwheelmsgs rJ"_fail_if_link_is_unsupported_wheelz*Factory._fail_if_link_is_unsupported_wheelsX}} dmm$ ??4<<55GGI J JKs##rI comes_frombaseextrasrct|td|Df} |j|}|S#t$r!t |||}||j|<Y|SwxYw)Nc32K|]}t|ywru)r).0es rJ z1Factory._make_extras_candidate..s(N!):1)=(Nsr)id frozensetrlKeyErrorr4)rprrr cache_key candidates rJ_make_extras_candidatezFactory._make_extras_candidatesrXy(Nv(NNO  @44Y?I @'fLI6?D ( ( 3 @s0&AArrtemplatec |j|j}|s|S|j |||S#t$r*t|||}||j|j<YJwxYw)N)factoryr)rkrnrr1r)rprrrrrs rJ_make_candidate_from_distz!Factory._make_candidate_from_distsw  H2243F3FGDK**4H*MM  H,T8TJDCGD + +D,?,? @ Hs30A&%A&nameversionc^|j||||}|r||S|j|||S)Nr)_make_base_candidate_from_linkr)rprvrrrrrs rJ_make_candidate_from_linkz!Factory._make_candidate_from_linksC)-(K(K (D') K**4H*MMrIc$||jvry|jr;||jvr t||||||j|<|j|S||jvr t||||||j|<|j|S#t$r4}t j d||ddi||j|<Yd}~yd}~wwxYw#t$r4}t j d||ddi||j|<Yd}~yd}~wwxYw)N)rrrz3Discarding [blue underline]%s[/]: [yellow]%s[reset]markupT)extra) rheditablerjr3rloggerinforir5)rprvrrrrs rJrz&Factory._make_base_candidate_from_linksE 4'' '   4999 ;L $! ' <D2248"11$7 74555 7D $! ' 8D..t4 --d3 3=, KKM'.   23D((. *, KKM'.   23D((. s/B&C C*C  C D*D  Direqs specifierhashesprefers_installedincompatible_idsc |sy|d jsJdt jj t |D][}|jsJd|jjz|j dz t|j z ]dttf   fd }dttf   fd }t|||S) NrHrz)Candidates found on index must be PEP 508F)trust_internetr^cjry j}j|jdsyj |}t |vry|S#t$rYywxYw)z6Get the candidate for the currently-installed version.NT) prereleases)rrrr)rfrorcontainsrrr)installed_distrrrrrprrs rJ_get_installed_candidatez@Factory._iter_found_candidates.._get_installed_candidates$$ !%!6!6t!< %%n&<&<$%O66#!7I )} 00   sA!! A-,A-c 3K jj }t|j}t d|D}dt dt fd}| }t|D]f}|r|s|jjrtj j|j |j}|j|fhyw)N) project_namerrc3HK|]}|jjywru)rv is_yanked)ricans rJrzUFactory._iter_found_candidates..iter_index_candidate_infos..3sCTTYY00Cs "rr^c|D]@}|jdk(ry|jdk7r$|jjdr@yy)Nz===T==z.*F)operatorrendswith)rsps rJ is_pinnedzUFactory._iter_found_candidates..iter_index_candidate_infos..is_pinned5sL# B{{e+#{{d* zz**40  rI)rvrrrr)rafind_best_candidatelistiter_applicableallrboolreversedrvr functoolspartialrr) resulticans all_yankedrpinnedrfuncrrrrprrs rJiter_index_candidate_infoszBFactory._iter_found_candidates..iter_index_candidate_infos(s\\55!#6F //12E CUCCJ \ d y)F! )"v4993F3F ((22!% LL llD(( )sCC) reqrrrrrrr r-rr9r8) rprrrrrireqrrrrrs ` `` ` @@@rJ_iter_found_candidateszFactory._iter_found_candidatess 8||HHH| !2!23!* -D88 HH H8 ++ +I dkkk7 7F i , ,F  -  (9*=  0& )H5G,H& )& )P & $ &     rIbase_requirementsc#K|D]@}|j\}}|t|}|Jd|j||Byw)a8Produce explicit candidates from the base given an extra-ed package. :param base_requirements: Requirements known to the resolver. The requirements are guaranteed to not have extras. :param extras: The extras to inject into the explicit requirements' candidates. Nzno extras here)get_candidate_lookupr7r)rprrr lookup_cand_ base_cands rJ#_iter_explicit_candidates_from_basez+Factory._iter_explicit_candidates_from_baseWse% AC 557NK"*+6I( :*: :(--i@ @ AsAA  identifier constraintc#K|jD]B}|j||j|t||t |d}|s?|Dyw)zProduce explicit candidates from constraints. This creates "fake" InstallRequirement objects that are basically clones of what "should" be the template, but with original_link set to link. Nrrr)linksrrr$r)rprrrrvrs rJ!_iter_candidates_from_constraintsz)Factory._iter_candidates_from_constraintsmsb$$ D  3 3D 9;;7hG&z2 <I  s A AArNincompatibilitiesc t}g}D]<}|j\} } | |j| | ,|j| >t j t 5t} | jk7r|j|jj| jdt| jj| jgD])}|j\} } | |j| +ddd|r' |j|j|d|jdD chc] } t!| c} |s)|j#|j$j&|Sfd|DS#1swYxYw#t$rYywxYwcc} w)NrHr)rc3K|];tvr,jrtfdDr=yw)c3@K|]}|jywru)is_satisfied_by)rrcs rJrz4Factory.find_candidates...sOsC''*OsN)rrr)rrrr incompat_idsrNs @rJrz*Factory.find_candidates..sF !uL(**1-Ol:6NOO  sAA)setraddappend contextlibsuppressrr*rupdatergetrrrrrrrr)rprrNrrrexplicit_candidatesrrcandrparsed_requirementrrrs `` ` @rJfind_candidateszFactory.find_candidatess/2e*, + #C113JD$#''- T"  # !3 4 +!0!< !&&*4#**<<$(();)@)@"E!"4";";< (++,>,C,CRH+C!668GAt' T*+ +$  #**::""!&q;(9'<'$G 2F;> G  G rrequested_extrasc#PK|j|s,tjd|j|jy|j sI|j r/|j#|jjr t|t|y|j|j |j|j |j r t|n||jrt|jndd}|F|js|j|j t!t|jy|j#||j r7|j#|j%|t'|j yyw)aW Returns requirement objects associated with the given InstallRequirement. In most cases this will be a single object but the following special cases exist: - the InstallRequirement has markers that do not apply -> result is empty - the InstallRequirement has both a constraint (or link) and extras -> result is split in two requirement objects: one with the constraint (or link) and one with the extra. This allows centralized constraint handling for the base, resulting in fewer candidate rejections. z6Ignoring %s: markers '%s' don't match your environmentNr) match_markersrrrmarkersrvrrrr=r<rrr#rrhr>make_requirement_from_candidaterr)rprrrs rJ#_make_requirements_from_install_reqz+Factory._make_requirements_from_install_reqsM!!"23 KKH    {{txx38J8J7==&t, ,  3 3DII > 66 :>++06459YY&tyy1D 7D |yy..tyy99./@/KLL::4@@;;>>33D)DKK:PQsF$F& root_ireqsctgii}t|D](\}}|jrt|}|r t ||j s<|j sJdt|j }||jvr|j|xx|zcc<tj||j|<t|j|d}|s|d}|jr1|j |jvr||j|j <|jj!|+|jj#d|S)NzConstraint must be namedrH)rrc4|j|jk7Sru)rr)rs rJz3Factory.collect_root_requirements..*s!&&ANN2JrI)key)rM enumeraterr&rrrrrOr/ from_ireqrr user_suppliedrPrNextendsort) rpr collectedirproblemrreqsrs rJcollect_root_requirementsz!Factory.collect_root_requirementssN.b"b9  , 4GAt7=+G44))+yy<"<?I,,X]];&&--d35 4F ##(J#KrIrct|Sru)r:)rprs rJrz'Factory.make_requirement_from_candidate-s#9--rIcJ|j||}|j||S)a( Returns requirement objects associated with the given specifier. In most cases this will be a single object but the following special cases exist: - the specifier has markers that do not apply -> result is empty - the specifier has both a constraint and extras -> result is split in two requirement objects: one with the constraint and one with the extra. This allows centralized constraint handling for the base, resulting in fewer candidate rejections. )rdr)rprrrrs rJmake_requirements_from_specz#Factory.make_requirements_from_spec2s*// :F77>NOOrIc`|jryt|syt||jSru)rgrQr;rc)rprs rJ make_requires_python_requirementz(Factory.make_requires_python_requirementDs-  ' '9~(D4J4JKKrIch|jy|jj||tS)aLook up the link in the wheel cache. If ``preparer.require_hashes`` is True, don't use the wheel cache, because cached wheels, always built locally, have different hashes than the files downloaded from the index server and thus throw false hash mismatches. Furthermore, cached wheels at present have nondeterministic contents due to file modification times. N)rv package_namesupported_tags)rbget_cache_entryr()rprvrs rJget_wheel_cache_entryzFactory.get_wheel_cache_entryOs<    $  00(?1  rIc|jj|j}|y|js|S|jr|St r3|j r'd|jd|j}t|y)NzNWill not install to the user site because it will lack sys.path precedence to z in ) rorrre in_usersiter+in_site_packagesraw_namelocationr)rprrrmessages rJget_dist_to_uninstallzFactory.get_dist_to_uninstallbs$$(()?)?@ < ""K   K $ %$*?*?**.--T]]OM $G, ,rIcausesrAc|sJd|jj}t|dk(rOt|djj }d|dj jd|d|}t|Sd|d}|D]G}|j j}t|jj }|d |d |d z }It|S) Nz,Requires-Python error reported with no causer,rzPackage z requires a different Python: z not in z%Packages require a different Python. z not in: z (required by )) rcrlenrQrBrrCrrformat_for_error)rpr rrr causepackages rJ_report_requires_python_errorz%Factory._report_requires_python_error~sEEEv((00 v;! F1I11;;3xHgfkk]!4H 001A1AB%)\\%Q%Q%S".1e 58U ,A,-FF((I#'' 2  +  ,%+<$89qCF99+12E+FGa3q6GG  OO; /*4f  & OO 45?   "  IIh  )6  s8) ) KK# $&I#$OPP=:Gs %G Grz,ResolutionImpossible[Requirement, Candidate]rOc|jsJd|jDcgc]C}t|jtr'|jj |j s|E}}|r|j td|St|jdk(r2|jd\}}|j|vr|j||Sdttdtfd}dtdtfd }t} |jD]1\}}||j} n||} | j!| 3| r|t#| } nd } d | d } t$j'| d } t} |jD]m\}}|j|vr| j!|j| dz} |r | |jd|j(dz} n| dz} | |jz} o| D]}||j*}| d||z } | dzdzdzdzdz} t$j-| t/dScc}w)Nz)Installation error reported with no causezSequence[ConflictCause]r,rpartsr^cbt|dk(r|dSdj|dddz|dzS)Nr,rrz and )rr)r's rJ text_joinz1Factory.get_installation_error..text_joins95zQQx99U3BZ(72U2Y> >rIrCc|j}|r |js|jd|jSt |jt rt |jjSt |jS)Nr)get_install_requirementrrr isinstancer%rQ)rCrs rJdescribe_triggerz8Factory.get_installation_error..describe_triggersf113Dt ++b(899$//+=>4??//00t' 'rIzthe requested packageszCannot install z> because these package versions have conflicting dependencies.z The conflict is caused by:z  z depends on zThe user requested z% The user requested (constraint) z zTo fix this you could try to: z91. loosen the range of package versions you've specified z92. remove package versions to allow pip attempt to solve zthe dependency conflict zResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts)r r-rBr;rrcrrrrr%rrQr-rrrrrrrrrr)rprrOrrequires_python_causesrrCr*r.triggerstriggerrr~relevant_constraintsrspecs rJget_installation_errorzFactory.get_installation_errors xxDDDx " %++-FG%%55d6L6LM " " "55.0FG  qxx=A ((1+KCxx{*??VLL  ?T#Y ?3 ?  (Y (3 (588 "KC~..0*62 LL !  " VH-.D+DdV$- -  ,"u88 /KCxx;&$((2.Cv{{m1V^^,r?rA getLoggerrDrrKCacherMrTrHrIrJrOs"B9I76=L*,@E@-9CFFB   8 $ CL T1W # # P  P  rI