hyb
2025-11-07 cadac0a99d87c53805a07f3b4ca7fd11e524fe4a
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
Ë
ñúh«—ãóØ—dZddlmZddlZddlZddlZddlZddlZddlm    Z    ddl
m Z ddl m Z mZmZddlmZddlmZdd    lmZdd
lmZmZdd lmZdd lmZmZmZmZdd l m!Z!m"Z"ddl#m$Z$ddl%m&Z&ddl'm(Z(ddl)m*Z*ddl+m,Z,ddl-m.Z.ddl/m0Z0ddl1m2Z2ddl3m4Z4ddl5m6Z6ddl7m8Z8ddl9m:Z:ddl;m<Z<ddl=m>Z>ddl?m@Z@e rddlAmBZBgd¢ZCe4eD«ZEeeFdeFeGeHffZIeFeGeGeGeeeGeIfZJ    d2                            d3d „ZKGd!„d"ej˜«ZMGd#„d$«ZN                                d4d%„ZOe Gd&„d'««ZPe d(¬)«Gd*„d+««ZQGd,„d-«ZRGd.„d/«ZSd5d0„ZTd6d1„ZUy)7z!Routines related to PyPI, indexesé)Ú annotationsN)ÚIterable)Ú    dataclass)Ú TYPE_CHECKINGÚOptionalÚUnion)Ú
specifiers)ÚTag)Úcanonicalize_name)ÚInvalidVersionÚ _BaseVersion)Úparse)ÚBestVersionAlreadyInstalledÚDistributionNotFoundÚInvalidWheelFilenameÚUnsupportedWheel)Ú LinkCollectorÚ parse_links)ÚInstallationCandidate)Ú FormatControl)ÚLink)Ú SearchScope)ÚSelectionPreferences)Ú TargetPython)ÚWheel)ÚInstallRequirement)Ú    getLogger)ÚWHEEL_EXTENSION)ÚHashes)Ú
indent_log)Ú build_netloc)Úcheck_requires_python)ÚSUPPORTED_EXTENSIONS)Ú    TypeGuard)rÚBestCandidateResultÚ PackageFinder©cóx—    t|j|¬«}|sfdjtt|««}|s#t
j d||j|«yt
jd||j|«y#tj$r$t
jd|j|«YywxYw)aa
    Return whether the given Python version is compatible with a link's
    "Requires-Python" value.
 
    :param version_info: A 3-tuple of ints representing the Python
        major-minor-micro version to check.
    :param ignore_requires_python: Whether to ignore the "Requires-Python"
        value if the given Python version isn't compatible.
    )Ú version_infoú.z4Link requires a different Python (%s not in: %r): %sFzBIgnoring failed Requires-Python check (%s not in: %r) for link: %sz2Ignoring invalid Requires-Python (%r) for link: %sT)
r"Úrequires_pythonÚjoinÚmapÚstrÚloggerÚverboseÚdebugr    ÚInvalidSpecifier)Úlinkr)Úignore_requires_pythonÚ is_compatibleÚversions     úUH:\Change_password\venv_build\Lib\site-packages\pip/_internal/index/package_finder.pyÚ_check_link_requires_pythonr8;s·€ðÜ-Ø ×  Ñ  Ø%ô
ˆ ñØ—h‘hœs¤3¨ Ó5Ó6ˆGÙ)Ü—‘ØJØØ×(Ñ(Øô    ð ä L‰LØTØØ×$Ñ$Øô     ð øô3 × &Ñ &ò
܏ ‰ Ø @Ø ×  Ñ  Ø õ    
ð0 ð3
ús‚BÂ4B9Â8B9cóú—eZdZej«Zej«Zej«Zej«Zej«Z    ej«Z
ej«Z y)ÚLinkTypeN) Ú__name__Ú
__module__Ú __qualname__ÚenumÚautoÚ    candidateÚdifferent_projectÚyankedÚformat_unsupportedÚformat_invalidÚplatform_mismatchÚrequires_python_mismatchr'ór7r:r:jsa„ؐ—    ‘    “ €IØ!˜Ÿ    ™    › ÐØ ˆTY‰Y‹[€FØ"˜Ÿ™›ÐؐT—Y‘Y“[€NØ!˜Ÿ    ™    › ÐØ(˜tŸy™y›{ÑrGr:cób—eZdZdZej
d«Z    d                                                    dd„Zdd„Zy)    Ú LinkEvaluatorzD
    Responsible for evaluating links for a particular project.
    z-py([123]\.?[0-9]?)$Ncó`—|€d}||_||_||_||_||_||_y)aÕ
        :param project_name: The user supplied package name.
        :param canonical_name: The canonical package name.
        :param formats: The formats allowed for this package. Should be a set
            with 'binary' or 'source' or both in it.
        :param target_python: The target Python interpreter to use when
            evaluating link compatibility. This is used, for example, to
            check wheel compatibility, as well as when checking the Python
            version, e.g. the Python version embedded in a link filename
            (or egg fragment) and against an HTML link's optional PEP 503
            "data-requires-python" attribute.
        :param allow_yanked: Whether files marked as yanked (in the sense
            of PEP 592) are permitted to be candidates for install.
        :param ignore_requires_python: Whether to ignore incompatible
            PEP 503 "data-requires-python" values in HTML links. Defaults
            to False.
        NF)Ú _allow_yankedÚ_canonical_nameÚ_ignore_requires_pythonÚ_formatsÚ_target_pythonÚ project_name)ÚselfrPÚcanonical_nameÚformatsÚ target_pythonÚ allow_yankedr4s       r7Ú__init__zLinkEvaluator.__init__s?€ð4 "Ð )Ø%*Ð "à)ˆÔØ-ˆÔØ'=ˆÔ$؈Œ Ø+ˆÔà(ˆÕrGcó —d}|jr1|js%|jxsd}tjd|›fS|j
r|j
}|j }nr|j«\}}|stjdfS|tvrtjd|›fSd|jvr*|tk(r!d|j›}tj|fSd|jvr|d    k(rtjd
fS|tk(rÈ    t|j«}t%|j&«|j(k7r"d |j›d }tj*|fS|j,j/«}|j1|«s7dj3|j5««}d|›d}tj6|fS|j8}d|jvr*|tk7r!d|j›}tj|fS|st;||j(«}|s!d|j›}tj"|fS|j<j?|«}    |    rO|d|    jA«}|    jCd«}
|
|j,jDk7rtj6dfStG||j,jH|jJ¬«} | sa|jL} | r:dd„} dj3tOd„tQjR| «D«| ¬««} |›d| ›}tjT|fStVjYd||«tjZ|fS#t $rtj"d fcYSwxYw)a­
        Determine whether a link is a candidate for installation.
 
        :return: A tuple (result, detail), where *result* is an enum
            representing whether the evaluation found a candidate, or the reason
            why one is not found. If a candidate is found, *detail* will be the
            candidate's version string; if one is not found, it contains the
            reason the link fails to qualify.
        Nz <none given>zyanked for reason: z
not a filezunsupported archive format: ÚbinaryzNo binaries permitted for Úmacosx10z.zipz macosx10 onezinvalid wheel filenamezwrong project name (not ú)ú, znone of the wheel's tags (zB) are compatible (run pip debug --verbose to show compatible tags)ÚsourcezNo sources permitted for zMissing project version for ézPython version is incorrect)r)r4cóD—td„|jd«D««S)Nc3óTK—|] }|j«sŒt|«–—Œ"y­w©N)ÚisdigitÚint©Ú.0Úss  r7ú    <genexpr>zLLinkEvaluator.evaluate_link.<locals>.get_version_sort_key.<locals>.<genexpr>ÿsèø€Ò M¨AÀÇÁŤ Q§Ñ Mùs‚(˜(r*)ÚtupleÚsplit)Úvs r7Úget_version_sort_keyz9LinkEvaluator.evaluate_link.<locals>.get_version_sort_keyþs€Ü Ñ M°·±¸³Ô MÓMÐMrGú,c3ó2K—|]}t|«–—Œy­wr`)r.rcs  r7rfz.LinkEvaluator.evaluate_link.<locals>.<genexpr>sèø€ÒR Aœ˜QŸÑRùs‚©Úkeyz Requires-Python zFound link %s, version: %s)rir.Úreturnztuple[int, ...]).Ú    is_yankedrKÚ yanked_reasonr:rBÚ egg_fragmentÚextÚsplitextrCr#rNrrPÚpathrÚfilenamerrDr ÚnamerLrArOÚget_unsorted_tagsÚ    supportedr,Úget_formatted_file_tagsrEr6Ú_extract_version_from_fragmentÚ_py_version_reÚsearchÚstartÚgroupÚ
py_versionr8Úpy_version_inforMr+Úsortedr    Ú SpecifierSetrFr/r1r@)rQr3r6ÚreasonÚegg_inforsÚwheelÚsupported_tagsÚ    file_tagsÚmatchr€Úsupports_pythonr+rjs              r7Ú evaluate_linkzLinkEvaluator.evaluate_link¤sƒ€ðˆØ >Š> $×"4Ò"4Ø×'Ñ'Ò9¨>ˆFÜ—O‘OÐ':¸6¸(Ð%CÐDÐ Dà × Ò Ø×(Ñ(ˆHØ—(‘(ŠCà ŸM™M›O‰MˆHcÙÜ ×3Ñ3°\ÐBÐBØÔ.Ñ.ä×/Ñ/Ø2°3°%Ð8ððð˜tŸ}™}Ñ,°¼Ò1GØ5°d×6GÑ6GÐ5HÐIÜ ×3Ñ3°VÐ<Ð<ؘTŸY™YÑ&¨3°&ª=Ü ×3Ñ3°^ÐDÐDØ”oÒ%ðÜ! $§-¡-Ó0Eô % U§Z¡ZÓ0°D×4HÑ4HÒHØ7¸×8IÑ8IÐ7JÈ!ÐLFÜ$×6Ñ6¸Ð?Ð?à!%×!4Ñ!4×!FÑ!FÓ!HØ—‘ ~Ô6ð!%§    ¡    ¨%×*GÑ*GÓ*IÓ JIà4°Y°Kð@LðMðô%×6Ñ6¸Ð?Ð?àŸ-™-ð ˜4Ÿ=™=Ñ (¨S´OÒ-CØ0°×1BÑ1BÐ0CÐDˆFÜ×/Ñ/°Ð8Ð 8áÜ4ØØ×$Ñ$óˆGñØ3°D×4EÑ4EÐ3FÐGˆFÜ×+Ñ+¨VÐ4Ð 4à×#Ñ#×*Ñ*¨7Ó3ˆÙ ؘo § ¡ £ Ð.ˆGØŸ™ Q›ˆJؘT×0Ñ0×;Ñ;Ò;ä×.Ñ.Ø1ððô
6Ø Ø×,Ñ,×<Ñ<Ø#'×#?Ñ#?ô
ˆñ
Ø"×2Ñ2ˆOÙóNð#&§(¡(ÜÙR¬×)@Ñ)@ÀÓ)QÔRØ0ôó#ð  yР1°/Ð1BÐCˆFÜ×5Ñ5°vÐ>Ð >ä ‰ Ð1°4¸ÔAä×"Ñ" GÐ,Ð,øôK,òä ×/Ñ/Ø0ðòðúsÄM/Í/N Î N r`)rPr.rRr.rSzfrozenset[str]rTrrUÚboolr4ú bool | NoneroÚNone)r3rroztuple[LinkType, str])    r;r<r=Ú__doc__ÚreÚcompiler|rVr‹r'rGr7rIrItso„ñð R—Z‘ZР7Ó8€Nð/3ð#)àð#)ðð#)ð ð    #)ð
$ð #)ð ð #)ð!,ð#)ð
ó#)ôJh-rGrIc
óL—|s+tjdt|«|«t|«Sg}g}d}|D]V}|j}|j
sn*|j |¬«r|dz }n|j|«ŒF|j|«ŒX|r|}n t|«}t|«t|«k(rd}    n1djt|«djd„|D«««}    tjd    t|«||j|t|«|z
|    «|S)
aÆ
    Filter out candidates whose hashes aren't allowed, and return a new
    list of candidates.
 
    If at least one candidate has an allowed hash, then all candidates with
    either an allowed hash or no hash specified are returned.  Otherwise,
    the given candidates are returned.
 
    Including the candidates with no hash specified when there is a match
    allows a warning to be logged if there is a more preferred candidate
    with no hash specified.  Returning all candidates in the case of no
    matches lets pip report the hash of the candidate that would otherwise
    have been installed (e.g. permitting the user to more easily update
    their requirements file with the desired hash).
    zJGiven no hashes to check %s links for project %r: discarding no candidatesr)Úhashesr]zdiscarding no candidateszdiscarding {} non-matches:
  {}z
  c3óFK—|]}t|j«–—Œy­wr`)r.r3)rdr@s  r7rfz*filter_unallowed_hashes.<locals>.<genexpr>Hsèø€ÒI°    œ˜IŸN™N×+ÑIùs‚!zPChecked %s links for project %r against %s hashes (%s matches, %s no digest): %s) r/r1ÚlenÚlistr3Úhas_hashÚis_hash_allowedÚappendÚformatr,Ú digest_count)
Ú
candidatesr“rPÚmatches_or_no_digestÚ non_matchesÚ match_countr@r3ÚfilteredÚdiscard_messages
          r7Úfilter_unallowed_hashesr¢s1€ñ( ܏ ‰ ð 'ä 
‹OØ ô        
ôJÓÐàÐà€KØ€KØò
/ˆ    Ø~‰~ˆØ}Š}Ø Ø × !Ñ !¨Ð !Ô 0Ø ˜1Ñ ‰Kà × Ñ ˜yÔ )Ø à×#Ñ# IÕ.ð
/ñØ'‰ô˜
Ó#ˆä
ˆ8ƒ}œ˜J›Ò'Ø4‰à<×CÑCÜ  Ó Ø K‰KÑI¸[ÔIÓ Ió
ˆô
 ‡LLð    )ä ˆJ‹ØØ×ÑØÜ Ð  Ó! KÑ/Øô    ð €OrGcó.—eZdZUdZdZded<dZded<y)ÚCandidatePreferenceszk
    Encapsulates some of the preferences for filtering and sorting
    InstallationCandidate objects.
    FrŒÚ prefer_binaryÚallow_all_prereleasesN)r;r<r=rr¥Ú__annotations__r¦r'rGr7r¤r¤Ys…ñð
 €M4ÓØ"'И4Ô'rGr¤T)Úfrozencó8—eZdZUdZded<ded<ded<d    d„Zy)
r%aÂA collection of candidates, returned by `PackageFinder.find_best_candidate`.
 
    This class is only intended to be instantiated by CandidateEvaluator's
    `compute_best_candidate()` method.
 
    :param all_candidates: A sequence of all available candidates found.
    :param applicable_candidates: The applicable candidates.
    :param best_candidate: The most preferred candidate found, or None
        if no applicable candidates were found.
    úlist[InstallationCandidate]Úall_candidatesÚapplicable_candidatesúInstallationCandidate | NoneÚbest_candidatecóȗt|j«t|j«ksJ‚|j€|jrJ‚y|j|jvsJ‚yr`)Úsetr¬r«r®©rQs r7Ú __post_init__z!BestCandidateResult.__post_init__us^€Ü4×-Ñ-Ó.´#°d×6IÑ6IÓ2JÒJÐJÐJà × Ñ Ð &Ø×1Ò1Ð 1Ð1Ð1à×&Ñ&¨$×*DÑ*DÑDÐ DÑDrGN©rorŽ)r;r<r=rr§r²r'rGr7r%r%ds!…ñ    ð0Ó/Ø6Ó6Ø0Ó0ôErGr%cóª—eZdZdZe                    d                                                        d
d„«Z            d                                                     d d„Z                d d„Zdd„Z                dd„Z                    dd„Z
y)ÚCandidateEvaluatorzm
    Responsible for filtering and sorting candidates for installation based
    on what tags are valid.
    Ncó‚—|€
t«}|€tj«}|j«}|||||||¬«S)aåCreate a CandidateEvaluator object.
 
        :param target_python: The target Python interpreter to use when
            checking compatibility. If None (the default), a TargetPython
            object will be constructed from the running Python.
        :param specifier: An optional object implementing `filter`
            (e.g. `packaging.specifiers.SpecifierSet`) to filter applicable
            versions.
        :param hashes: An optional collection of allowed hashes.
        )rPr‡Ú    specifierr¥r¦r“)rr    rƒÚget_sorted_tags)ÚclsrPrTr¥r¦r·r“r‡s        r7ÚcreatezCandidateEvaluator.create„sR€ð( Ð  Ü(›NˆMØ Ð Ü"×/Ñ/Ó1ˆIà&×6Ñ6Ó8ˆáØ%Ø)ØØ'Ø"7Øô 
ð    
rGcó¬—||_||_||_||_||_||_t |«Dcic]\}}||“Œ
c}}|_ycc}}w)z“
        :param supported_tags: The PEP 425 tags supported by the target
            Python in order of preference (most preferred first).
        N)Ú_allow_all_prereleasesÚ_hashesÚ_prefer_binaryÚ _project_nameÚ
_specifierÚ_supported_tagsÚ    enumerateÚ_wheel_tag_preferences)    rQrPr‡r·r¥r¦r“ÚidxÚtags             r7rVzCandidateEvaluator.__init__¨s^€ð'<ˆÔ#؈Œ Ø+ˆÔØ)ˆÔØ#ˆŒØ-ˆÔô
&/¨~Ó%>÷'
Ù!˜˜cˆC‰Hó'
ˆÕ#ùó'
s¹ Acó‚—|jxsd}|j}|Dcgc]}|t|j«f‘Œ}}t    |j d„|D«|¬««}|Dcgc] \}}||vsŒ |‘Œ}}}t ||j|j¬«}    t|    |j¬«Scc}wcc}}w)zM
        Return the applicable candidates from a list of candidates.
        Nc3ó&K—|]    \}}|–—Œ y­wr`r')rdÚ_ris   r7rfz?CandidateEvaluator.get_applicable_candidates.<locals>.<genexpr>×sèø€Ò7‘tq˜!”Ñ7ùs‚)Ú prereleases)rœr“rPrm) r¼rÀr.r6r°Úfilterr¢r½r¿r‚Ú    _sort_key)
rQrœÚallow_prereleasesr·ÚcÚcandidates_and_versionsÚversionsrir¬Úfiltered_applicable_candidatess
          r7Úget_applicable_candidatesz,CandidateEvaluator.get_applicable_candidatesÂsˀð!×7Ñ7Ò?¸4ÐØ—O‘Oˆ    ðAKÖ"K¸1 A¤s¨1¯9©9£~Ò#6Ð"KÐÐ"KÜØ × Ñ Ù7Ð6Ô7Ø-ð ó ó
ˆð0G× X¡t q¨!È!ÈxÊ-¢РXÐÑ XÜ)@Ø,Ø—<‘<Ø×+Ñ+ô*
Ð&ô Ð4¸$¿.¹.ÔIÐIùò#Lùó!Ys¡B6Á) B;Á6B;cóð—|j}t|«}d}d}|j}|jrNt    |j
«}    |j ||j« }|jrd}|j}n| }t|j|j««}    dt|j«z}
|    |
||j ||fS#t$rt|j
›d«‚wxYw)a)
        Function to pass as the `key` argument to a call to sorted() to sort
        InstallationCandidates by preference.
 
        Returns a tuple such that tuples sorting as greater using Python's
        default comparison operator are more preferred.
 
        The preference is as follows:
 
        First and foremost, candidates with allowed (matching) hashes are
        always preferred over candidates without matching hashes. This is
        because e.g. if the only candidate with an allowed hash is yanked,
        we still want to use that candidate.
 
        Second, excepting hash considerations, candidates that have been
        yanked (in the sense of PEP 592) are always less preferred than
        candidates that haven't been yanked. Then:
 
        If not finding wheels, they are sorted by version only.
        If finding wheels, then the sort order is by version, then:
          1. existing installs
          2. wheels ordered via Wheel.support_index_min(self._supported_tags)
          3. source archives
        If prefer_binary was set, then all wheels are sorted above sources.
 
        Note: it was considered to embed this logic into the Link
              comparison operators, but then different sdist links
              with the same version, would have to be considered equal
        r'rz@ is not a supported wheel for this platform. It can't be sorted.r]éÿÿÿÿ)rÁr•r3Úis_wheelrrvÚfind_most_preferred_tagrÃÚ
ValueErrorrr¾Ú    build_tagrbr˜r½rpr6) rQr@Ú
valid_tagsÚ support_numr×Úbinary_preferencer3r†ÚpriÚhas_allowed_hashÚ
yank_values            r7rËzCandidateEvaluator._sort_keyås€ð<×)Ñ)ˆ
ܘ*“oˆ Ø ˆ    ØÐ؏~‰~ˆØ =Š=ä˜$Ÿ-™-Ó(ˆEð
à×1Ñ1Ø" D×$?Ñ$?óðð×"Ò"Ø$%Ð!ØŸ™‰Ià.ˆCܘt×3Ñ3°D·L±LÓAÓBÐØœ#˜dŸn™nÓ-Ñ-ˆ
à Ø Ø Ø × Ñ Ø Ø ð 
ð    
øôò Ü&Ø—~‘~Ð&ð''ð'óðð ús Á
CÃ"C5có:—|syt||j¬«}|S)zy
        Return the best candidate per the instance's sort order, or None if
        no candidate is acceptable.
        Nrm)ÚmaxrË)rQrœr®s   r7Úsort_best_candidatez&CandidateEvaluator.sort_best_candidate&s €ñØÜ˜Z¨T¯^©^Ô<ˆØÐrGcób—|j|«}|j|«}t|||¬«S)zF
        Compute and return a `BestCandidateResult` instance.
        )r¬r®)rÑràr%)rQrœr¬r®s    r7Úcompute_best_candidatez)CandidateEvaluator.compute_best_candidate3s<€ð!%× >Ñ >¸zÓ JÐà×1Ñ1Ð2GÓHˆä"Ø Ø"7Ø)ô
ð    
rG)NFFNN)rPr.rTúTargetPython | Noner¥rŒr¦rŒr·úspecifiers.BaseSpecifier | Noner“ú Hashes | Nonerorµ)FFN)rPr.r‡z    list[Tag]r·zspecifiers.BaseSpecifierr¥rŒr¦rŒr“rårorŽ)rœrªrorª)r@rroÚCandidateSortingKey)rœrªror­)rœrªror%) r;r<r=rÚ classmethodrºrVrÑrËràrâr'rGr7rµrµ~s„ñð
ð.2Ø#Ø&+Ø59Ø $ð!
àð!
ð+ð!
ðð    !
ð
 $ð !
ð 3ð !
ðð!
ð
ò!
óð!
ðP$Ø&+Ø $ð
àð
ð"ð
ð,ð    
ð
ð 
ð  $ð 
ðð
ð
ó
ð4!Jà/ð!Jð
%ó!JóF?
ðB à/ð ð
&ó ð
à/ð
ð
ô
rGrµcóø—eZdZdZ            d                                                    dd„Ze    d                            d d„«Zed!d„«Zed"d„«Z    e    jd#d„«Z    ed$d„«Z ed$d    „«Z ed%d
„«Z ed&d „«Zed%d „«Zed%d „«Zed'd„«Zd(d„Zed'd„«Zd(d„Zd$d„Zd)d„Zd*d„Zd+d„Z                        d,d„Z                        d-d„Z                        d.d„Zd/d„Z        d0                            d1d„Z        d0                            d2d„Z                        d3d„Zy)4r&z This finds packages.
 
    This is meant to match easy_install's technique for looking for
    packages, by reading pages and looking for appropriate links.
    Ncóê—|€
t«}|xstt«t««}||_||_||_||_||_||_t«|_    i|_
i|_ y)a“
        This constructor is primarily meant to be used by the create() class
        method and from tests.
 
        :param format_control: A FormatControl object, used to control
            the selection of source packages / binary packages when consulting
            the index and links.
        :param candidate_prefs: Options to use when creating a
            CandidateEvaluator object.
        N) r¤rr°rKÚ_candidate_prefsrMÚ_link_collectorrOÚformat_controlÚ _logged_linksÚ_all_candidatesÚ_best_candidates)rQÚlink_collectorrTrUrìÚcandidate_prefsr4s       r7rVzPackageFinder.__init__Ls}€ð& Ð "Ü2Ó4ˆOà'ÒF¬=¼»ÄÃÓ+Fˆà)ˆÔØ /ˆÔØ'=ˆÔ$Ø-ˆÔØ+ˆÔà,ˆÔô?B»eˆÔðHJˆÔð ð     ÕrGcó´—|€
t«}t|j|j¬«}|||||j|j
|j ¬«S)afCreate a PackageFinder.
 
        :param selection_prefs: The candidate selection preferences, as a
            SelectionPreferences object.
        :param target_python: The target Python interpreter to use when
            checking compatibility. If None (the default), a TargetPython
            object will be constructed from the running Python.
        )r¥r¦)rñrðrTrUrìr4)rr¤r¥r¦rUrìr4)r¹rðÚselection_prefsrTrñs     r7rºzPackageFinder.createzs`€ð Ð  Ü(›NˆMä.Ø)×7Ñ7Ø"1×"GÑ"Gô
ˆñ
Ø+Ø)Ø'Ø(×5Ñ5Ø*×9Ñ9Ø#2×#IÑ#Iô 
ð    
rGcó—|jSr`)rOr±s r7rTzPackageFinder.target_pythonšs€à×"Ñ"Ð"rGcó.—|jjSr`©rëÚ search_scoper±s r7r÷zPackageFinder.search_scopežs€à×#Ñ#×0Ñ0Ð0rGcó&—||j_yr`rö)rQr÷s  r7r÷zPackageFinder.search_scope¢s€à,8ˆ×ÑÕ)rGcó.—|jjSr`)rëÚ
find_linksr±s r7rúzPackageFinder.find_links¦s€à×#Ñ#×.Ñ.Ð.rGcó.—|jjSr`)r÷Ú
index_urlsr±s r7rüzPackageFinder.index_urlsªs€à× Ñ ×+Ñ+Ð+rGcóB—|jjjSr`)rëÚsessionÚ    pip_proxyr±s r7ÚproxyzPackageFinder.proxy®s€à×#Ñ#×+Ñ+×5Ñ5Ð5rGc#ójK—|jjjD] }t|Ž–—Œy­wr`)rërþÚpip_trusted_originsr!)rQÚ    host_ports  r7Ú trusted_hostszPackageFinder.trusted_hosts²s2èø€à×-Ñ-×5Ñ5×IÑIò    +ˆIÜ     Ð*Ó *ñ    +ùs‚13cój—|jjj}t|t«r|SdSr`)rërþÚverifyÚ
isinstancer.)rQrs  r7Ú custom_certzPackageFinder.custom_cert·s/€ð
×%Ñ%×-Ñ-×4Ñ4ˆÜ# F¬CÔ0ˆvÐ:°dÐ:rGcót—|jjj}t|t«rJd«‚|S)Nz"pip only supports PEM client certs)rërþÚcertrrg)rQr
s  r7Ú client_certzPackageFinder.client_cert¿s4€à×#Ñ#×+Ñ+×0Ñ0ˆÜ˜d¤EÔ*ÐPÐ,PÓPÐ*؈ rGcó.—|jjSr`©rêr¦r±s r7r¦z#PackageFinder.allow_all_prereleasesÅs€à×$Ñ$×:Ñ:Ð:rGcó&—d|j_y©NTr r±s r7Úset_allow_all_prereleasesz'PackageFinder.set_allow_all_prereleasesÉs€Ø6:ˆ×ÑÕ3rGcó.—|jjSr`©rêr¥r±s r7r¥zPackageFinder.prefer_binaryÌs€à×$Ñ$×2Ñ2Ð2rGcó&—d|j_yrrr±s r7Úset_prefer_binaryzPackageFinder.set_prefer_binaryÐs€Ø.2ˆ×ÑÕ+rGcóŽ—|jDchc]\}}}|tjk(r|’Œ}}}}t|«Scc}}}wr`)rír:rFr‚)rQrÈÚresultÚdetailÚreasonss     r7Úrequires_python_skipped_reasonsz-PackageFinder.requires_python_skipped_reasonsÓsQ€ð&*×%7Ñ%7÷
ð
á!6˜6Øœ×:Ñ:Ò:ò ð
ˆò
ô
g‹Ðùô 
s‘ Acó¬—t|«}|jj|«}t||||j|j
|j ¬«S)N)rPrRrSrTrUr4)r rìÚget_allowed_formatsrIrOrKrM)rQrPrRrSs    r7Úmake_link_evaluatorz!PackageFinder.make_link_evaluatorÛsS€Ü*¨<Ó8ˆØ×%Ñ%×9Ñ9¸.ÓIˆäØ%Ø)ØØ×-Ñ-Ø×+Ñ+Ø#'×#?Ñ#?ô 
ð    
rGcóÀ—gg}}t«}|D]G}||vsŒ|j|«|jr|j|«Œ7|j|«ŒI||zS)z
        Returns elements of links in order, non-egg links first, egg links
        second, while eliminating duplicates
        )r°Úaddrrr™)rQÚlinksÚeggsÚno_eggsÚseenr3s      r7Ú _sort_linkszPackageFinder._sort_linksèsc€ð
˜BˆgˆÜ›%ˆØò    )ˆDؘ4ÒØ—‘˜”Ø×$Ò$Ø—K‘K Õ%à—N‘N 4Õ(ð     )ð˜‰~ÐrGcó—|||f}||jvr3tjd||«|jj|«yy)NzSkipping link: %s: %s)rír/r1r)rQr3rrÚentrys     r7Ú_log_skipped_linkzPackageFinder._log_skipped_linkøsH€Øv˜vÐ&ˆØ ˜×*Ñ*Ñ *ô L‰LÐ0°&¸$Ô ?Ø × Ñ × "Ñ " 5Õ )ð     +rGcóȗ|j|«\}}|tjk7r|j|||«y    t    |j
||¬«S#t $rYywxYw)z
        If the link is a candidate for install, convert it to an
        InstallationCandidate and return it. Otherwise, return None.
        N)rwr3r6)r‹r:r@r&rrPr )rQÚlink_evaluatorr3rrs     r7Úget_install_candidatez#PackageFinder.get_install_candidatesp€ð(×5Ñ5°dÓ;‰ˆØ ”X×'Ñ'Ò 'Ø × "Ñ " 4¨°Ô 8Øð    Ü(Ø#×0Ñ0ØØôð øô
ò    Ùð    ús½AÁ    A!Á A!có‚—g}|j|«D](}|j||«}|€Œ|j|«Œ*|S)zU
        Convert links that are candidates to InstallationCandidate objects.
        )r#r)r™)rQr(rrœr3r@s      r7Úevaluate_linkszPackageFinder.evaluate_linkssQ€ð ˆ
Ø×$Ñ$ UÓ+ò    -ˆDØ×2Ñ2°>À4ÓHˆIØÑ$Ø×!Ñ! )Õ,ð    -ð
ÐrGcóþ—tjd|«|jj|«}|€gSt    t |««}t «5|j||¬«}ddd«|S#1swYSxYw)Nz-Fetching project page and analyzing links: %s)r)r/r1rëÚfetch_responser–rr r+)rQÚ project_urlr(Úindex_responseÚ
page_linksÚ package_linkss      r7Úprocess_project_urlz!PackageFinder.process_project_url#sˆ€ô     ‰ Ø ;Ø ô    
ð×-Ñ-×<Ñ<¸[ÓIˆØ Ð !؈Iäœ+ nÓ5Ó6ˆ
ä ‹\ñ    Ø ×/Ñ/ØØ ð0óˆM÷    ð Ð÷     ð Ðús ÁA2Á2A<cóŠ—||jvr|j|S|j|«}|jj|t    j
|j |¬«¬«}tjjd„|D««}t|«}tjjd„|D««}|j|t|d¬««}tjtj «rn|rlg}|D]@}    |    j"j$sJ‚    |j'|    j"j(«ŒBtj-ddj/|««||z|j|<|j|S#t*$r(|j'|    j"j$«YŒ¹wxYw)    aFind all available InstallationCandidate for project_name
 
        This checks index_urls and find_links.
        All versions found are returned as an InstallationCandidate list.
 
        See LinkEvaluator.evaluate_link() for details on which files
        are accepted.
        )r()rPÚcandidates_from_pagec3óNK—|]}|D]}||j«–—ŒŒy­wr`)Úpage_candidates©rdÚsourcesr\s   r7rfz4PackageFinder.find_all_candidates.<locals>.<genexpr>Ns<èø€ò;
àØ!ò;
ðØÐ!ð × "Ñ "× $ð;
Ø $ñ;
ùó‚#%c3óNK—|]}|D]}||j«–—ŒŒy­wr`)Ú
file_linksr7s   r7rfz4PackageFinder.find_all_candidates.<locals>.<genexpr>Vs<èø€ò6
àØ!ò6
ðØÐ!ð × Ñ × ð6
Ø ñ6
ùr9T)ÚreversezLocal files found: %sr[)rîrrëÚcollect_sourcesÚ    functoolsÚpartialr2Ú    itertoolsÚchainÚ from_iterabler–r+r‚r/Ú isEnabledForÚloggingÚDEBUGr3Úurlr™Ú    file_pathÚ    Exceptionr1r,)
rQrPr(Úcollected_sourcesÚpage_candidates_itr6Ú file_links_itÚfile_candidatesÚpathsr@s
          r7Úfind_all_candidatesz!PackageFinder.find_all_candidates8sŸ€ð ˜4×/Ñ/Ñ /Ø×'Ñ'¨ Ñ5Ð 5à×1Ñ1°,Ó?ˆà ×0Ñ0×@Ñ@Ø%Ü!*×!2Ñ!2Ø×(Ñ(Ø-ô"ðAó
Ðô'Ÿ_™_×:Ñ:ñ;
à,ô;
ó
Ðô Ð1Ó2ˆä!Ÿ™×5Ñ5ñ6
à,ô6
ó
ˆ ð ×-Ñ-Ø Ü =¨$Ô /ó
ˆô
× Ñ œwŸ}™}Ô -±/؈EØ,ò 5    Ø —~‘~×)Ò)Ð)Ð)ð5Ø—L‘L §¡×!9Ñ!9Õ:ð 5ô L‰LÐ0°$·)±)¸EÓ2BÔ Cð.=¸Ñ-Nˆ×ј\Ñ*à×#Ñ# LÑ1Ð1øô!ò5Ø—L‘L §¡×!3Ñ!3Ö4ð5úsÄ$%FÆ.GÇGcóŒ—|j}tj||j|j|j
||¬«S)z*Create a CandidateEvaluator object to use.)rPrTr¥r¦r·r“)rêrµrºrOr¥r¦)rQrPr·r“rñs     r7Úmake_candidate_evaluatorz&PackageFinder.make_candidate_evaluatorqsK€ð×/Ñ/ˆÜ!×(Ñ(Ø%Ø×-Ñ-Ø)×7Ñ7Ø"1×"GÑ"GØØð )ó
ð    
rGcóø—|||f|jvr|j|||fS|j|«}|j|||¬«}|j|«|j|||f<|j|||fS)aFind matches for the given project and specifier.
 
        :param specifier: An optional object implementing `filter`
            (e.g. `packaging.specifiers.SpecifierSet`) to filter applicable
            versions.
 
        :return: A `BestCandidateResult` instance.
        )rPr·r“)rïrNrPrâ)rQrPr·r“rœÚcandidate_evaluators      r7Úfind_best_candidatez!PackageFinder.find_best_candidate‚s¡€ð ˜) VÐ ,°×0EÑ0EÑ EØ×(Ñ(¨°yÀ&Ð)HÑIÐ Ià×-Ñ-¨lÓ;ˆ
Ø"×;Ñ;Ø%ØØð<ó
Ðð  × 6Ñ 6°zÓ Bð     ×јl¨I°vÐ=Ñ>ð×$Ñ$ \°9¸fÐ%DÑEÐErGcóÚ‡‡    —|j}|€Jd«‚|jd¬«}|j||j|¬«}|jŠdŠ    |j
|j
j Š    dd„}‰    €7‰€5tjd|||j««td|›«‚                dˆˆ    fd    „ }|sC‰    A|‰«r"tjd
‰    ‰j «ytjd ‰    «y|‰«r3tjd ‰j ||j««‰Stjd ‰    ||j««t‚)zêTry to find a Link matching req
 
        Expects req, an InstallRequirement and upgrade, a boolean
        Returns a InstallationCandidate if found,
        Raises DistributionNotFound or BestVersionAlreadyInstalled otherwise
        Nz&find_requirement() called with no nameF)Útrust_internet)r·r“c
ó–—djt|Dchc]}t|j«’Œc}t¬««xsdScc}w)Nr[rmÚnone)r,r‚r.r6Ú parse_version)Ú    cand_iterrÍs  r7Ú_format_versionsz8PackageFinder.find_requirement.<locals>._format_versions·sE€ð —    ‘    ÜØ1:Ö;¨Aœ˜QŸY™YÒ;Ü)ôóòð ð ùò<s•A zNCould not find a version that satisfies the requirement %s (from versions: %s)z#No matching distribution found for có.•—‰€y‰€y‰j‰kDS)NTF)r6)r@r®Úinstalled_versions €€r7Ú_should_install_candidatezAPackageFinder.find_requirement.<locals>._should_install_candidateÐs)ø€ð!Ð(ØØÐ%ØØ!×)Ñ)Ð,=Ñ=Ð =rGzUExisting installed version (%s) satisfies requirement (most up-to-date version is %s)zLExisting installed version (%s) is most up-to-date and satisfies requirementz)Using version %s (newest of versions: %s)z=Installed version (%s) is most up-to-date (past versions: %s))rYzIterable[InstallationCandidate]ror.)r@r­roz TypeGuard[InstallationCandidate])rwr“rSr·r®Ú satisfied_byr6r/Úcriticalr«rr1r¬r)
rQÚreqÚupgraderwr“Úbest_candidate_resultrZr]r®r\s
        @@r7Úfind_requirementzPackageFinder.find_requirementŸs•ù€ðx‰xˆØÐÐIÐ!IÓIÐà—‘¨5Ó1ˆØ $× 8Ñ 8Ø Ø—m‘mØð!9ó!
Ðð
/×=Ñ=ˆà15ÐØ × Ñ Ð 'Ø #× 0Ñ 0× 8Ñ 8Ð ó     ð Ð $¨Ð)?Ü O‰Oð&àÙ Ð!6×!EÑ!EÓFô     ô'Ð)LÈSÈEÐ'RÓSÐ Sð    >Ø3ð    >à -ö    >ñÐ,Ð8Ù(¨Ô8Ü— ‘ ð6à%Ø"×*Ñ*ô    ðô — ‘ ð,à%ôð
á $ ^Ô 4Ü L‰LØ;Ø×&Ñ&Ù Ð!6×!LÑ!LÓMô ð
"Ð !ô     ‰ Ø KØ Ù Ð2×HÑHÓ Iô    
ô
*Ð)rG)NNN)rðrrTrrUrŒrìzFormatControl | NonerñzCandidatePreferences | Noner4rrorŽr`)rðrrórrTrãror&)ror)ror)r÷rrorŽ)roz    list[str])roú
str | None)roz Iterable[str])rorŒr³)rPr.rorI)rúIterable[Link]roz
list[Link])r3rrr:rr.rorŽ)r(rIr3rror­)r(rIrrerorª)r.rr(rIrorª)rPr.rorª)NN)rPr.r·rär“rårorµ)rPr.r·rär“råror%)r`rrarŒror­) r;r<r=rrVrçrºÚpropertyrTr÷Úsetterrúrürrrr r¦rr¥rrrr#r&r)r+r2rNrPrSrcr'rGr7r&r&Es„„ñð04Ø7;Ø.2ð(à%ð(ð$ð(ðð    (ð
-ð (ð 5ð (ð!,ð(ð
ó(ð\ð
.2ð    
à%ð
ð.ð
ð+ð    
ð
 
ò 
óð
ð>ò#óð#ðò1óð1ð×Ñò9óð9ðò/óð/ðò,óð,ðò6óð6ðò+óð+ðò;óð;ðòóðð
ò;óð;ó;ðò3óð3ó3óó 
óó *ðØ+ðØ37ðà    %óð* Ø+ð Ø4Bð à    $ó ðØðØ1>ðà    $óó*72ðx6:Ø $ð    
àð
ð3ð
ðð    
ð
 
ó 
ð(6:Ø $ð    FàðFð3ðFðð    Fð
 
ó Fð:X*Ø%ðX*Ø04ðX*à    %ôX*rGr&có~—t|«D] \}}|dk7rŒ t|d|«|k(sŒ|cSt|›d|›«‚)aöFind the separator's index based on the package's canonical name.
 
    :param fragment: A <package>+<version> filename "fragment" (stem) or
        egg fragment.
    :param canonical_name: The package's canonical name.
 
    This function is needed since the canonicalized name does not necessarily
    have the same length as the egg info's name part. An example::
 
    >>> fragment = 'foo__bar-1.0'
    >>> canonical_name = 'foo-bar'
    >>> _find_name_version_sep(fragment, canonical_name)
    8
    ú-Nz does not match )rÂr rÖ)ÚfragmentrRÚirÍs    r7Ú_find_name_version_seprlúsX€ô$˜(Ó#ò‰ˆˆ1Ø Š8Ø Ü ˜X b q˜\Ó *¨nÓ <ØŠHð    ô
˜zÐ!1°.Ð1AÐBÓ
CÐCrGcóT—    t||«dz}||d}|sy|S#t$rYywxYw)zúParse the version string from a <package>+<version> filename
    "fragment" (stem) or egg fragment.
 
    :param fragment: The string to parse. E.g. foo-2.1
    :param canonical_name: The canonicalized name of the package this
        belongs to.
    r]N)rlrÖ)rjrRÚ version_startr6s    r7r{r{sE€ðÜ.¨x¸ÓHÈ1ÑLˆ ð}~Ð&€GÙ ØØ €Nøô òÙðús ‚›    '¦')F)r3rr)ztuple[int, int, int]r4rŒrorŒ)rœrªr“rårPr.rorª)rjr.rRr.rorb)rjr.rRr.rord)VrÚ
__future__rr>r>r@rDrÚcollections.abcrÚ dataclassesrÚtypingrrrÚpip._vendor.packagingr    Úpip._vendor.packaging.tagsr
Úpip._vendor.packaging.utilsr Úpip._vendor.packaging.versionr r rrXÚpip._internal.exceptionsrrrrÚpip._internal.index.collectorrrÚpip._internal.models.candidaterÚ#pip._internal.models.format_controlrÚpip._internal.models.linkrÚ!pip._internal.models.search_scoperÚ$pip._internal.models.selection_prefsrÚ"pip._internal.models.target_pythonrÚpip._internal.models.wheelrÚpip._internal.reqrÚpip._internal.utils._logrÚpip._internal.utils.filetypesrÚpip._internal.utils.hashesrÚpip._internal.utils.loggingr Úpip._internal.utils.miscr!Úpip._internal.utils.packagingr"Úpip._internal.utils.unpackingr#Útyping_extensionsr$Ú__all__r;r/rgrbr.ÚBuildTagrær8ÚEnumr:rIr¢r¤r%rµr&rlr{r'rGr7ú<module>rŒs ðÙ'å"ã ÛÛÛÛ    Ý$Ý!÷ñõ -Ý*Ý9ßFÝ@÷ó÷ EÝ@Ý=Ý*Ý9ÝEÝ;Ý,Ý0Ý.Ý9Ý-Ý2Ý1Ý?Ý>áÝ+â
Cۖ
8Ó    €à r‘˜E # s (™OÐ+Ñ ,€Ø˜C  c¨<¸À#¹ÈÐPÑQÐð $)ð,Ø
ð,à&ð,ð!ð,ð
ó    ,ô^+ˆty‰yô+÷X-ñX-ðvGØ+ðGà ðGððGð!ó    GðT ÷(ð(ó ð(ñ $Ô÷EðEóðE÷2D
ñD
÷Nr*ñr*ój Dô4rG