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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
U
H=®d]'ã@sTddlZddlZddlmZddlmZddlmZmZddlm    Z
ddl m Z ddl mZddlmZdd    lmZdd
lmZdd lmZdd lmZd dlmZer&ddlmZmZmZmZm Z ddl!m"Z"ddl#m$Z$ddl%m&Z&ddl'm(Z(ddl)m*Z*ddl+m,Z,ddl m-Z-ddlm.Z.e /e0¡Z1Gdd„deƒZ    dd„Z2dd„Z3dS)éN)Úsix©Úcanonicalize_name)Ú BaseReporterÚResolutionImpossible)ÚResolver)ÚInstallationError)Úcheck_invalid_constraint_type)ÚRequirementSet)Ú BaseResolver)Ú PipProvider)Údist_is_editable)ÚMYPY_CHECK_RUNNINGé)ÚFactory)ÚDictÚListÚOptionalÚSetÚTuple)Ú SpecifierSet)ÚResult)ÚGraph)Ú
WheelCache)Ú PackageFinder)ÚRequirementPreparer)ÚInstallRequirement)ÚInstallRequirementProvidercs8eZdZdddhZd ‡fdd„    Zdd    „Zd
d „Z‡ZS) rÚeagerzonly-if-neededzto-satisfy-onlyNFc s^tt|ƒ ¡| rt d¡|
|jks*t‚t||||||    ||| | d
|_||_    |
|_
d|_ dS)NzÊpip is using lazily downloaded wheels using HTTP range requests to obtain dependency information. This experimental feature is enabled through --use-feature=fast-deps and it is not ready for production.)
ÚfinderÚpreparerÚmake_install_reqÚ wheel_cacheÚ use_user_siteÚforce_reinstallÚignore_installedÚignore_requires_pythonÚpy_version_infoÚ
lazy_wheel) ÚsuperrÚ__init__ÚloggerÚwarningÚ_allowed_strategiesÚAssertionErrorrÚfactoryÚignore_dependenciesÚupgrade_strategyÚ_result) Úselfr rr"r!r#r0r%r&r$r1r'r(©Ú    __class__©úcD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\pip/_internal/resolution/resolvelib/resolver.pyr*'s*ÿö zResolver.__init__c
Csi}tƒ}g}|D]Ž}|jrbt|ƒ}|r0t|ƒ‚t|jƒ}||krV|||j@||<q |j||<q|jr~|jr~| t|jƒ¡|j    j
|dd}    |    dk    r|  |    ¡qt |j    ||j |j|d}
tƒ} t|
| ƒ} zd} | j|| d|_Wn<tk
r}z|j     |¡}t ||¡W5d}~XYnXt|d}|jj ¡D]Ä}| ¡}|dkrPq6|j     |¡}|dkrnd|_nD|j    jr€d|_n2|j|jkr–d|_nt |ƒ|j!kr6d|_nq6|j"}|rî|j#rîd    j$|j|j||j%pÞd
d }t& '|¡| (|¡q6|S) Nr6)Zrequested_extras)r/Ú constraintsr0r1Úuser_requestedi€„)Z
max_rounds)Úcheck_supported_wheelsFTz–The candidate selected for download or install is a yanked version: {name!r} candidate (version {version} at {link})
Reason for being yanked: {reason}z <none given>)ÚnameÚversionÚlinkÚreason))ÚsetÚ
constraintr    rrr;Ú    specifierÚ user_suppliedÚaddr/Z!make_requirement_from_install_reqÚappendr r0r1rÚ
RLResolverÚresolver2rZget_installation_errorrÚ
raise_fromr
ÚmappingÚvaluesZget_install_requirementZget_dist_to_uninstallÚshould_reinstallr$Úparsed_versionr<r Ú is_editableZ source_linkÚ    is_yankedÚformatÚ yanked_reasonr+r,Úadd_named_requirement)r3Ú    root_reqsr:r8r9Ú requirementsÚreqÚproblemr;ÚrZproviderZreporterÚresolverZ try_to_avoid_resolution_too_deepÚeÚerrorÚreq_setÚ    candidateÚireqZinstalled_distr=Úmsgr6r6r7rFQs‚
  ÿ û
ÿ  
 
 
 
 
ÿ
ø
 
zResolver.resolvecCsN|jdk    stdƒ‚|jj}t|ƒ}t|j ¡tjt    |ddd}dd„|DƒS)aGet order for installation of requirements in RequirementSet.
 
        The returned list contains a requirement before another that depends on
        it. This helps ensure that the environment is kept consistent as they
        get installed one-by-one.
 
        The current implementation creates a topological ordering of the
        dependency graph, while breaking any cycles in the graph at arbitrary
        points. We make no guarantees about where the cycle would be broken,
        other than they would be broken.
        Nzmust call resolve() first)ÚweightsT)ÚkeyÚreversecSsg|] \}}|‘qSr6r6)Ú.0Ú_r[r6r6r7Ú
<listcomp>Åsz3Resolver.get_installation_order.<locals>.<listcomp>)
r2r.ÚgraphÚget_topological_weightsÚsortedrRÚitemsÚ    functoolsÚpartialÚ_req_set_item_sorter)r3rYrcr]Z sorted_itemsr6r6r7Úget_installation_order®s  ýzResolver.get_installation_order)NF)Ú__name__Ú
__module__Ú __qualname__r-r*rFrjÚ __classcell__r6r6r4r7r$s 
ó*]rcsLtƒ‰i‰‡‡‡‡fdd„‰ˆdƒˆddks4t‚tˆƒtˆƒksHt‚ˆS)aŸAssign weights to each node based on how "deep" they are.
 
    This implementation may change at any point in the future without prior
    notice.
 
    We take the length for the longest path to any node from root, ignoring any
    paths that contain a single node twice (i.e. cycles). This is done through
    a depth-first search through the graph, while keeping track of the path to
    the node.
 
    Cycles in the graph result would result in node being revisited while also
    being it's own path. In this case, take no action. This helps ensure we
    don't get stuck in a cycle.
 
    When assigning weight, the longer path (i.e. larger length) is preferred.
    csZ|ˆkr dSˆ |¡ˆ |¡D] }ˆ|ƒq ˆ |¡ˆ |d¡}t|tˆƒƒˆ|<dS)Nr)rCZ iter_childrenÚremoveÚgetÚmaxÚlen)ÚnodeÚchildZlast_known_parent_count©rcÚpathÚvisitr]r6r7rwÝs
 
 
 z&get_topological_weights.<locals>.visitNr)r?r.rr)rcr6rur7rdÈsrdcCst|dƒ}|||fS)a)Key function used to sort install requirements for installation.
 
    Based on the "weight" mapping calculated in ``get_installation_order()``.
    The canonical package name is returned as the second member as a tie-
    breaker to ensure the result is predictable, which is useful in tests.
    rr)Úitemr]r;r6r6r7riös ri)4rgÚloggingÚ pip._vendorrZpip._vendor.packaging.utilsrZpip._vendor.resolvelibrrrrEÚpip._internal.exceptionsrZpip._internal.req.req_installr    Zpip._internal.req.req_setr
Úpip._internal.resolution.baser Z,pip._internal.resolution.resolvelib.providerr Úpip._internal.utils.miscr Úpip._internal.utils.typingrr/rÚtypingrrrrrZ pip._vendor.packaging.specifiersrZ pip._vendor.resolvelib.resolversrZpip._vendor.resolvelib.structsrÚpip._internal.cacherÚ"pip._internal.index.package_finderrÚ pip._internal.operations.preparerrrÚ    getLoggerrkr+rdrir6r6r6r7Ú<module>s8                   
%.