1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
U
H=®döã@s€ddlmZddlmZddlmZerlddlmZmZm    Z    m
Z
m Z m Z m Z mZddlmZmZddlmZGdd    „d    eƒZd
S) é)Ú SpecifierSet)ÚAbstractProvider)ÚMYPY_CHECK_RUNNING)ÚAnyÚDictÚIterableÚOptionalÚSequenceÚSetÚTupleÚUnioné)Ú RequirementÚ    Candidate)ÚFactoryc@sDeZdZdd„Zdd„Zdd„Zdd„Zd    d
„Zd d „Zd d„Z    dS)Ú PipProvidercCs"||_||_||_||_||_dS©N)Ú_factoryÚ _constraintsÚ_ignore_dependenciesÚ_upgrade_strategyÚuser_requested)ÚselfÚfactoryÚ constraintsÚignore_dependenciesÚupgrade_strategyr©rúcD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\pip/_internal/resolution/resolvelib/provider.pyÚ__init__)s
    zPipProvider.__init__cs$‡fdd„‰‡fdd„}t||dS)Ncs&ˆjdkrdSˆjdkr"|ˆjkSdS)aÔAre 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-neededF)rr©Úname)rrrÚ_eligible_for_upgradePs
 
 
 
z8PipProvider._sort_matches.<locals>._eligible_for_upgradecs|jrˆ|jƒsdSdS)ayReturn a sort key for the matches.
 
            The highest priority should be given to installed candidates that
            are not eligible for upgrade. We use the integer value in the first
            part of the key to sort these before other candidates.
 
            We only pull the installed candidate to the bottom (i.e. most
            preferred), but otherwise keep the ordering returned by the
            requirement. The requirement is responsible for returning a list
            otherwise sorted for the resolver, taking account for versions
            and binary preferences as specified by the user.
            r r)Z is_installedr")Úc)r#rrÚsort_keybsz+PipProvider._sort_matches.<locals>.sort_key)Úkey)Úsorted)rÚmatchesr%r)r#rrÚ _sort_matches8s  zPipProvider._sort_matchescCs|jSrr!)rÚ
dependencyrrrÚidentifyvszPipProvider.identifycCst|ƒSr)Úlen)rÚ
resolutionÚ
candidatesZ informationrrrÚget_preferencezszPipProvider.get_preferencecCs:|sgS|j |djtƒ¡}|j ||¡}t| |¡ƒS)Nr)rÚgetr"rrZfind_candidatesÚreversedr))rÚ requirementsÚ
constraintr.rrrÚ find_matches„sÿzPipProvider.find_matchescCs
| |¡Sr)Úis_satisfied_by)rÚ requirementÚ    candidaterrrr5ŽszPipProvider.is_satisfied_bycCs|j }dd„| |¡DƒS)NcSsg|]}|dk    r|‘qSrr)Ú.0ÚrrrrÚ
<listcomp>•sþz0PipProvider.get_dependencies.<locals>.<listcomp>)rZiter_dependencies)rr7Z with_requiresrrrÚget_dependencies’sþzPipProvider.get_dependenciesN)
Ú__name__Ú
__module__Ú __qualname__rr)r+r/r4r5r;rrrrr(s>
 
rN)Z pip._vendor.packaging.specifiersrZ pip._vendor.resolvelib.providersrÚpip._internal.utils.typingrÚtypingrrrrr    r
r r ÚbaserrrrrrrrrÚ<module>s   (