kgh+ fddlZddlmZddlmZmZmZmZmZm Z m Z m Z m Z m Z ddlmZddlmZddlmZmZmZddlmZdd lmZdd lmZer"dd lmZdd lmZeeefZeeee fZ!neZ!e d Z"e dZ#dee e#fde de"de e"e#ffdZ$Gdde!Z%dS)N) lru_cache) TYPE_CHECKINGDictIterableIteratorMappingOptionalSequenceTupleTypeVarUnion)AbstractProvider)InstallRequirement) Candidate Constraint Requirement)REQUIRES_PYTHON_IDENTIFIER)Factory)ExplicitRequirement) Preference)RequirementInformationDVmapping identifierdefaultreturncl||vr||S|d\}}}|r ||vr||S|S)aiGet item from a package name lookup mapping with a resolver identifier. This extra logic is needed when the target mapping is keyed by package name, which cannot be directly looked up with an identifier (which may contain requested extras). Additional logic is added to also look up a value by "cleaning up" the extras from the identifier. [) partition)rrrname open_bracket_s /builddir/build/BUILD/imunify360-venv-2.6.0/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/provider.py_get_with_identifierr&:sUWz"" '0055D,t} Nc 2eZdZdZdedeeefdededeee fddf d Z d e e e fdefd Zd eed eee fdeeee fdeeedfdeddeef dZded eee fdeeee fdeeedfdedddf dZdedeeee fdeeee fdee fdZeedde de defdZde dee fdZdS) PipProvideraPip's provider implementation for resolvelib. :params constraints: A mapping of constraints specified by the user. Keys are canonicalized project names. :params ignore_dependencies: Whether the user specified ``--no-deps``. :params upgrade_strategy: The user-specified upgrade strategy. :params user_requested: A set of canonicalized package names that the user supplied for pip to install/upgrade. factory constraintsignore_dependenciesupgrade_strategyuser_requestedrNcL||_||_||_||_||_dSN)_factory _constraints_ignore_dependencies_upgrade_strategy_user_requested)selfr*r+r,r-r.s r%__init__zPipProvider.__init__^s1  '$7!!1-r'requirement_or_candidatec|jSr0)r")r6r8s r%identifyzPipProvider.identifyls ',,r' identifiers resolutions candidates informationPreferenceInformationbacktrack_causesc t}|D]G}||jj|j||jjHg}|D],} | t kr| gcS| |vr|| ,-|r|S|S)aProduce a subset of identifiers that should be considered before others. Currently pip narrows the following selection: * Requires-Python, if present is always returned by itself * Backtrack causes are considered next because they can be identified in linear time here, whereas because get_preference() is called for each identifier, it would be quadratic to check for them there. Further, the current backtrack causes likely need to be resolved before other requirements as a resolution can't be found while there is a conflict. )setadd requirementr"parentrappend) r6r;r<r=r>r@backtrack_identifiersinfocurrent_backtrack_causesrs r%narrow_requirement_selectionz(PipProvider.narrow_requirement_selectionos&!$$ < =`` or ``!=``. * Alphabetical order for consistency (aids debuggability). TFc3zK|]6\}}t|t|dfV7dS)rN) isinstancerget_candidate_lookup).0rr$s r% z-PipProvider.get_preference..s\1 #6779O9O9Q9QRS9TUr'c4g|]}|D]}|j|jfSrL)operatorversion)rP specifier_set specifiers r% z.PipProvider.get_preference..sJ, , , *, ,  !2 3, , , , r'c3(K|] }||jVdSr0)rW)rPireqs r%rRz-PipProvider.get_preference..s)!K!KTd!K$.!K!K!K!K!K!Kr'c3@K|]\}}|dddkod|vVdS)N==*rLrPopvers r%rRz-PipProvider.get_preference..s;VVSr"1"v~;CsNVVVVVVr'c38K|]\}}|dvp |dkod|vVdS)).sR  C%% E2:+D#*      r') nextiter StopIterationzipanyboolr5getmathinf)r6rr<r=r>r@has_informationdirectireqsdirects operatorspinned upper_boundedunfreerequested_orders r%get_preferencezPipProvider.get_preferencesj< # k*-.. / / / #OO  $ $ $$OOO $ "F>@EE ! +J 7NGU \\F, , !K!KU!K!K!K, , , VVIVVVVV  $     i.22:txHHJJ  J    s "' 66 requirementsincompatibilitiescdtdtffd }tj|t j}j||||| |jS)NrrcnjdkrdSjdkrtj|d}|duSdS)aAre upgrades allowed for this project? This checks the upgrade strategy, and whether the project was one that the user specified in the command line, in order to decide whether we should upgrade if there's a newer version available. (Note that we don't need access to the `--upgrade` flag, because an upgrade strategy of "to-satisfy-only" means that `--upgrade` was not specified). eagerTzonly-if-neededNrF)r4r&r5)r user_orderr6s r%_eligible_for_upgradez7PipProvider.find_matches.._eligible_for_upgradesY%00t'+;;;1(  "--5r'r|)rrw constraintprefers_installedrxis_satisfied_by) strrir&r2remptyr1find_candidatesr)r6rrwrxr~rs` r% find_matcheszPipProvider.find_matchess  c d      ,*   $&&   },,!%!#8#8#D#DD/ 0 -   r')maxsizerD candidatec,||Sr0)r)rDrs r%rzPipProvider.is_satisfied_bys**9555r'cP|j }d||DS)Nc3K|]}||V dSr0rL)rPrQs r%rRz/PipProvider.get_dependencies..s"WWaWWr')r3iter_dependencies)r6r with_requiress r%get_dependencieszPipProvider.get_dependenciess/ 55 WW966}EEWWWWr')__name__ __module__ __qualname____doc__rrrrriintr7r rrr:rrrr rJrvr staticmethodrrrrLr'r%r)r)Ss . .#z/* ." .  . S#X .  . . . .-{I7M1N-SV----)c])S)^,)C)!445 ) S(+B"CCD ) ##:; ) #))))VK K S)^,K C)!445 K S(+B"CCD K ##:; K  K K K K Z( ( c8K#889( #3(;#;< ( )  ( ( ( ( TYt6[6Y64666\6X)X8MXXXXXXr'r))&rk functoolsrtypingrrrrrr r r r r pip._vendor.resolvelib.providersrpip._internal.req.req_installrbaserrrr=rr*rrwrr pip._vendor.resolvelib.resolversrr?r _ProviderBaserrr&r)rLr'r%rs                         >=====<<<<<<4444444444222222------%;;;;;;GGGGGG2; 3IJ$[)S%@AMM$M* GCLL GCLL S!V_ 1a4[ 2FXFXFXFXFX-FXFXFXFXFXr'