kgh~ddlZddlZddlZddlmZmZmZmZmZm Z m Z m Z m Z m Z mZmZmZmZmZmZddlmZddlmZddlmZmZddlmZmZddlmZddl m!Z!m"Z"dd l#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*dd l+m,Z,dd l-m.Z.m/Z/dd l0m1Z1dd l2m3Z3ddl4m5Z5ddl6m7Z7m8Z8ddl9m:Z:m;Z;ddlm?Z?ddl@mAZAddlBmCZCddlDmEZEddlFmGZGmHZHmIZIddlJmKZKmLZLmMZMmNZNmOZOmPZPmQZQddlRmSZSmTZTddlUmVZVmWZWmXZXmYZYmZZZerGddeZ[ej\e]Z^edZ_ee1e_fZ`Gdde ZaGd d!ZbdS)"N) TYPE_CHECKINGCallableDict FrozenSetIterableIteratorListMapping NamedTupleOptionalProtocolSequenceSetTupleTypeVarcast)InvalidRequirement) SpecifierSet)NormalizedNamecanonicalize_name)InvalidVersionVersion)ResolutionImpossible) CacheEntry WheelCache)DistributionNotFoundInstallationErrorInvalidInstalledPackageMetadataInconsistentMetadataInvalidUnsupportedPythonVersionUnsupportedWheel) 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) Candidate Constraint Requirement)AlreadyInstalledCandidate BaseCandidateEditableCandidateExtrasCandidate LinkCandidateRequiresPythonCandidateas_base_candidate)FoundCandidatesIndexCandidateInfo)ExplicitRequirementRequiresPythonRequirementSpecifierRequirement!SpecifierWithoutExtrasRequirementUnsatisfiableRequirementc$eZdZUeed<eed<dS) ConflictCause requirementparentN)__name__ __module__ __qualname__r@__annotations__r3/builddir/build/BUILD/imunify360-venv-2.6.0/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/factory.pyrErEOs*....rMrECcZeZdZUeeed<eeefed<eee fed<dS)CollectedRootRequirements requirements constraintsuser_requestedN) rHrIrJr r5rKrstrr4intrLrMrNrQrQZsL{####c:o&&&&cN"""""rMrQceZdZ dBdedededeedededed 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)e#egefd e!efd+Z*d,ed-e!ed e$e#fd.Z+d/e,ed e-fd0Z.d1ed e/fd2Z0 dCdedeed-e!ed e$e#fd4Z1ded ee#fd5Z2dedeed ee3fd6Z4d1ed eefd7Z5d8ed9d e6fd:Z7d;e#dd?d@e:ee&fd e;fdAZz$Factory.__init__..s-%%%#T%%%rMF) local_only)_finderrZ _wheel_cacher;_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_cacher._supported_tags_cacher%iter_installed_distributions_installed_dists) selfrYrZr[r\r]r^r_r`raenvs rN__init__zFactory.__init__as   '!8!I!I+;(+ /'=$9;;="CE&PR'  $&3__" ')++C%%<<<NN%%%D ! ! ! %'D ! ! !rMc|jSN)ro)rys rNr^zFactory.force_reinstalls $$rMlinkc|jsdSt|j}||jjrdS|jd}t|)Nz+ is not a supported wheel on this platform.)is_wheelr'filename supportedrj target_pythonget_unsorted_tagsr")ryr~wheelmsgs rN"_fail_if_link_is_unsupported_wheelz*Factory._fail_if_link_is_unsupported_wheelsh}  Fdm$$ ??4<5GGII J J  FKKKs###rM comes_frombaseextrasrct|td|Df} |j|}n,#t$rt |||}||j|<YnwxYw|S)Nc34K|]}t|VdSr})r)rfes rN z1Factory._make_extras_candidate..s+(N(N!):1)=)=(N(N(N(N(N(NrMr)id frozensetruKeyErrorr9)ryrrr cache_key candidates rN_make_extras_candidatezFactory._make_extras_candidatesXXy(N(Nv(N(N(NNNO  @4Y?II @ @ @'fLLLI6?D ( 3 3 3 @s 8&A! A!rgtemplatec |j|j}n1#t$r$t|||}||j|j<YnwxYw|s|S||||S)N)factoryr)rtrerr6r)ryrgrrrs rN_make_candidate_from_distz!Factory._make_candidate_from_dists  H243FGDD H H H,T8TJJJDCGD +D,? @ @ @ H K**4H*MMMs+AAnameversioncn|||||}|r||S||||S)Nr)_make_base_candidate_from_linkr)ryr~rrrrrs rN_make_candidate_from_linkz!Factory._make_candidate_from_linksP)-(K(K (D') )  K**4H*MMMrMc ||jvrdS|jr}||jvrg t||||||j|<nI#tt f$r5}t d||ddi||j|<Yd}~dSd}~wwxYw|j|S||jvr` t||||||j|<nB#t$r5}t d||ddi||j|<Yd}~dSd}~wwxYw|j|S)N)rrrz3Discarding [blue underline]%s[/]: [yellow]%s[reset]markupT)extra) rqeditablersr8rr loggerinforrr:)ryr~rrrrs rNrz&Factory._make_base_candidate_from_links 4' ' '4  ( 44999 ;L $! ' <<<D2488-o>   KKM'.   23D(.44444 1$7 74555 7D $! ' 888D.t44,   KKM'.   23D(.44444 -d3 3s-:B *A;;BB77 C6*C11C6ireqs specifierhashesprefers_installedincompatible_idsc |sdS|d js Jdt jj t |D]R}|js Jd|jjz|dz t|jz Sdttf   fd }dttf   fd }t|||S) NrLrz)Candidates found on index must be PEP 508F)trust_internetrbc6jrdS j}n#t$rYdSwxYw |jdsdSn##t $r}t ||d}~wwxYw|}t|vrdS|S)z6Get the candidate for the currently-installed version.NT) prereleases)rg invalid_exc)rgrr) rorxrcontainsrrrrr) installed_distrrrrrryrrs rN_get_installed_candidatez@Factory._iter_found_candidates.._get_installed_candidates$ t !%!6t!<   tt  R!)).*@d)SS 4 ! R R R->qQQQQ R66#!7I )}} 000t s#  ((A A+A&&A+c 3nK j }|j}td|D}dtdt fd}| }t |D]G}|r|s |jjrtj j |j |j }|j |fVHdS)N) project_namerrc3.K|]}|jjVdSr})r~ is_yanked)rficans rNrzUFactory._iter_found_candidates..iter_index_candidate_infos..=s'CCTTY0CCCCCCrMrrbc~|D]9}|jdkrdS|jdkr|jdr7dSdS)Nz===T==z.*F)operatorrendswith)rsps rN is_pinnedzUFactory._iter_found_candidates..iter_index_candidate_infos..is_pinned?s\#  B{e++#tt{d** z**400! 44urM)r~rrrr) rjfind_best_candidateapplicable_candidatesallrboolreversedr~r functoolspartialrr) resulticans all_yankedrpinnedrfuncrrrryrrs rNiter_index_candidate_infoszBFactory._iter_found_candidates..iter_index_candidate_infos2s\55!#6F 0E CCUCCCCCJ \ d    Yy))F! ) )"v493F (2!% L lD((((( ) )rM) reqrrrrrrr r3rr>r=) ryrrrrrireqrrrrrs ` `` ` @@@rN_iter_found_candidateszFactory._iter_found_candidatessg 2 8|HHHHH| !233!* - -D8 H HH H H8 + +I dkkk77 7F i ,, ,FF (9*=           :& )H5G,H& )& )& )& )& )& )& )& )& )& )& )P & $ $ & &      rMbase_requirementsc#K|D]O}|\}}|t|}| Jd|||VPdS)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_lookupr<r)ryrrr lookup_cand_ base_cands rN#_iter_explicit_candidates_from_basez+Factory._iter_explicit_candidates_from_baseas% A AC 5577NK"*+66I((*:(((--i@@ @ @ @ @ A ArM identifier constraintc#K|jD]Q}||||t||t |d}|r|VRdS)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)ryrrrr~rs rN!_iter_candidates_from_constraintsz)Factory._iter_candidates_from_constraintsws$ D  3 3D 9 9 9;;7hGG&z22 <I   rMrRincompatibilitiesis_satisfied_byc t}g}D]G} | \} } | || | || Ht jt 5t} | jkr| |  | jdt| j  | jgD]0} | \} } | || 1dddn #1swxYwY|rD | ||dn#t$rYdSwxYwd| dD|s#||jj|Sfd|DS)NrLr)rc,h|]}t|SrL)r)rfcs rN z*Factory.find_candidates..sMMM!1MMMrMc3K|]Ntv(tfdDJVOdS)c30K|]}|VdSr}rL)rfrrrs rNrz4Factory.find_candidates...s/PPOOC++PPPPPPrMN)rrr)rfrrr incompat_idsrrRs @rNrz*Factory.find_candidates..s  !uuL((**1--)PPPPP|J7OPPPPP) ((((  rM)setraddappend contextlibsuppressrr0rupdatergetrrrr"rrr)ryrrRrrrrexplicit_candidatesrrcandrparsed_requirementrrs `` ` ` @rNfind_candidateszFactory.find_candidatess/2ee*, + # #C1133JD$#''--- T""" !3 4 4 + +!0!,CRHH++C!6688GAt' T*** + + + + + + + + + + + + + + +$   #**::""!&q;$   rr NM'8'<'|jr$|j|jjrt|Vt|VdS| |j| |j|jrt|n||jrt|jndd}|>|js|j|jt!t|jVdS||V|jr?|||t'|jVdSdS)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_markersrrrmarkersr~rrrrBrArrr)rrqrCmake_requirement_from_candidaterr)ryrrrs rN#_make_requirements_from_install_reqz+Factory._make_requirements_from_install_reqs!!"233'  KKH        ! { >tx38J37=====&t,, , , , , ,  3 3DI > > > 66 :>+O0666459YH&ty111D 7D |y:.ty99./@/K/KLLLLLLL::4@@@@@;>>33D)DK:P:PQQrM root_ireqsctgii}t|D]\}}|jrt|}|rt ||sB|js Jdt|j}||jvr|j|xx|zcc<tj ||j|<t| |d}|s|d}|j r|j|jvr||j|j<|j||jd|S)NzConstraint must be namedrL)rrc"|j|jkSr})rr)rs rNz3Factory.collect_root_requirements..5s!&AN2JrM)key)rQ enumeraterr,rrrrrSr4 from_ireqlistr user_suppliedrTrRextendsort) ryr collectedirproblemrreqsrs rNcollect_root_requirementsz!Factory.collect_root_requirementss.b"b99  ,, 4 4GAt 47==5+G444))++y<<"<<?I,X];&--d3333 ##(J(J#KKKrMrc t|Sr})r?)ryrs rNrz'Factory.make_requirement_from_candidate8s#9---rMrLcZ|||}|||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. )rmr)ryrrrrs rNmake_requirements_from_specz#Factory.make_requirements_from_spec=s0// :FF77>NOOOrMc`|jrdSt|sdSt||jSr})rprUr@rl)ryrs rN make_requires_python_requirementz(Factory.make_requires_python_requirementOs:  ' 49~~ 4(D4JKKKrMcX|jdS|j|||jS)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)r~ package_namesupported_tags)rkget_cache_entryrv)ryr~rs rNget_wheel_cache_entryzFactory.get_wheel_cache_entryZs>   $4 0051   rMc|j|j}|dS|js|S|jr|St r(|jr!d|jd|j}t|dS)NzNWill not install to the user site because it will lack sys.path precedence to z in ) rxrrrn in_usersiter1in_site_packagesraw_namelocationr)ryrrgmessages rNget_dist_to_uninstallzFactory.get_dist_to_uninstallms$(()?@@ <4 " K   K $ % % -$*? -M*.-MM=A]MM $G,, ,trMcausesrEc|s Jd|jj}t|dkrIt|djj}d|djjd|d|}t|Sd|d}|D]@}|j }t|jj}|d |d |d z }At|S) Nz,Requires-Python error reported with no causer2rzPackage z requires a different Python: z not in z%Packages require a different Python. z not in: z (required by )) rlrlenrUrFrrGrr!format_for_error)ryrrrrcausepackages rN_report_requires_python_errorz%Factory._report_requires_python_errors EEEEEv(0 v;;!  F1I1;<z?Factory._report_single_requirement_conflict..s999qCFF999rMc,g|]}t|SrLr!r"s rNr$z?Factory._report_single_requirement_conflict..sGGGa3q66GGGrMz)Ignored the following yanked versions: %s, nonezJIgnored the following versions that require a different python version: %sz; zNCould not find a version that satisfies the requirement %s (from versions: %s)zrequirements.txtzHINT: You are attempting to install a package literally named "requirements.txt" (which cannot exist). Consider using the '-r' flag to install the packages listed in requirements.txtz#No matching distribution found for )rUrrjfind_all_candidatesrrequires_python_skipped_reasonsrr~rrrsortedrcriticaljoinrr) ryrrGreq_dispcandsskipped_by_requires_python versions_setyanked_versions_setrrversionsyanked_versionss rN#_report_single_requirement_conflictz+Factory._report_single_requirement_conflicts >3xxHH44fk444H 001ABB%)\%Q%Q%S%S"%(UU ,/EE , ,A,-F=((I ,#'' 2222  ++++99F<$8$8999GG62E+F+FGGG   OO; /**4f    &  OO 455?     "  IIh   )6    s88) ) ) KK#   $$O#$O$OPPPrMrz,ResolutionImpossible[Requirement, Candidate]rScf|js Jdfd|jD}|r#td|St|jdkrCt t |j\}}|j|vr||Sdttdtfd}dtdtfd }t}|jD]<\}}|| } n ||} | | =|r|t|} nd } d | d } t| d } t} |jD]a\}}|j|vr| |j| dz} |r| |jd|jdz} n| dz} | | z} b| D]} || j}| d| |z } | dzdzdzdzdz} t| t)dS)Nz)Installation error reported with no causecg|]=}t|jt|jj;|>SrL) isinstancerFr@rrl)rfrrys rNr$z2Factory.get_installation_error..s[" " " %+-FGG" %55d6LMM " " " " rMzSequence[ConflictCause]r2partsrbct|dkr|dSd|dddz|dzS)Nr2rr&z and )rr,)r8s rN text_joinz1Factory.get_installation_error..text_joinsB5zzQQx99U3B3Z((72U2Y> >rMrGc|}|r|js|jd|jSt |jt rt |jjSt |jS)Nr)get_install_requirementrrrr7r+rU)rGrs rNdescribe_triggerz8Factory.get_installation_error..describe_triggerst1133D :t : +99999$/+=>> 14?/000t'' 'rMzthe 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 z<2. remove package versions to allow pip to attempt to solve zthe dependency conflict zResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts)rrrrnextiterrr4r rUr3rrrr*rr+rrrr)ryrrSrequires_python_causesrrGr;r>triggerstriggerrrrelevant_constraintsrspecs` rNget_installation_errorzFactory.get_installation_errors xDDDDDx" " " " " " "  " 55.0FGG  qx==A  tAH~~..KCx{**??VLLL  ?T#Y ?3 ? ? ? ?  (Y (3 ( ( ( (558 " "KC~..00**622 LL ! ! ! !  ,9VH--..DD+D -d - - -  ,"uu8 / /KCx;&&$((222.C 2v{IIV^IIII11,,...CC' H HCs#-D GCGGG GCC  / 0K KM  M *  *   C# 1   rMr})rL)=rHrIrJr#r(r-r rrrrVr{propertyr^r&rr7rrUr+r9rr$r3rrrrrrrr/rrrr5rrr4rr rrrr rQrr?rrr rrrr!rrr4rrrGrLrMrNrXrX`s6:%'%'%'&%'5 %' j) %'  %'%'%'!%%'"%S/2%' %'%'%'%'N%%%%X%$t$$$$$48    #  /0       N N# N% N  N N N N N N# N% N ~& N '" N )  N N N N7474%74~& 74 '" 74 - 74747474rd *+d  d  d  d c( d  ) d d d d LA#K0A#A )  AAAA,   %  )      ,J J c8K#889J #3(;#;< J  J  J "; ":D"@AJ  ) J J J J X3&3:B3-3 + 3333j(12( "((((T.". ....+- PPP/0P#3- P +  PPPP$ L L +  L L L L  (  *     &yXFV=W81/1 !1111,2Q2Q(0(;2Q 2Q2Q2Q2Qhd 9d #z/*d   d d d d d d rMrX)crrloggingtypingrrrrrrr r r r r rrrrr"pip._vendor.packaging.requirementsr pip._vendor.packaging.specifiersrpip._vendor.packaging.utilsrrpip._vendor.packaging.versionrrpip._vendor.resolvelibrpip._internal.cacherrpip._internal.exceptionsrrrrr r!r""pip._internal.index.package_finderr#pip._internal.metadatar$r%pip._internal.models.linkr&pip._internal.models.wheelr' pip._internal.operations.preparer(pip._internal.req.constructorsr)r*pip._internal.req.req_installr+r,pip._internal.resolution.baser-&pip._internal.utils.compatibility_tagsr.pip._internal.utils.hashesr/pip._internal.utils.packagingr0pip._internal.utils.virtualenvr1rr3r4r5 candidatesr6r7r8r9r:r;r<found_candidatesr=r>rRr?r@rArBrCrE getLoggerrHrrOCacherQrXrLrMrNrbse&BAAAAA999999IIIIIIIIAAAAAAAA77777766666666=<<<<<LLLLLLLL******,,,,,,@@@@@@EDDDDD@@@@@@------999999CCCCCC4444444444BAAAAAAA  8 $ $ GCLL T1W ##### ### W  W  W  W  W  W  W  W  W  W  rM