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
U
H=®dô‘ã@s4dZddlmZddlZddlZddlmZddlmZddl    m
Z ddl m Z mZmZmZddlmZdd    lmZdd
lmZdd lmZdd lmZdd lmZddlmZddlm Z ddl!m"Z"ddl#m$Z$ddl%m&Z&ddl'm(Z(ddl)m*Z*ddl+m,Z,e(rªddl-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5ddl6m7Z7ddl    m8Z8ddlm9Z9ddl:m;Z;ddl<m=Z=ddl>m?Z?e5e4de4e@eAffZBe4e@e@e@e8eBe1e@fZCddd gZDe EeF¡ZGd2d"d#„ZHGd$d%„d%eIƒZJd&d'„ZKGd(d)„d)eIƒZLGd*d„deIƒZMGd+d,„d,eIƒZNGd-d „d eIƒZOd.d/„ZPd0d1„ZQdS)3z!Routines related to PyPI, indexesé)Úabsolute_importN)Ú
specifiers)Úcanonicalize_name)Úparse)ÚBestVersionAlreadyInstalledÚDistributionNotFoundÚInvalidWheelFilenameÚUnsupportedWheel)Ú parse_links)ÚInstallationCandidate)Ú FormatControl)ÚLink)ÚSelectionPreferences)Ú TargetPython)ÚWheel)ÚWHEEL_EXTENSION)Ú
indent_log)Ú build_netloc)Úcheck_requires_python)ÚMYPY_CHECK_RUNNING)ÚSUPPORTED_EXTENSIONS)Ú url_to_path)Ú    FrozenSetÚIterableÚListÚOptionalÚSetÚTextÚTupleÚUnion)ÚTag)Ú _BaseVersion)Ú LinkCollector)Ú SearchScope)ÚInstallRequirement)ÚHashes©r ÚBestCandidateResultÚ PackageFinderFcCs~zt|j|d}Wn&tjk
r8t d|j|¡YnBX|szd tt|ƒ¡}|sht d||j|¡dSt d||j|¡dS)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_infoz2Ignoring invalid Requires-Python (%r) for link: %sÚ.z4Link requires a different Python (%s not in: %r): %sFzBIgnoring failed Requires-Python check (%s not in: %r) for link: %sT)    rÚrequires_pythonrÚInvalidSpecifierÚloggerÚdebugÚjoinÚmapÚstr)Úlinkr)Úignore_requires_pythonÚ is_compatibleÚversionr&r&úYD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\pip/_internal/index/package_finder.pyÚ_check_link_requires_python=s8ÿ
þ
þýr7c@s,eZdZdZe d¡Zddd„Zdd„ZdS)    Ú LinkEvaluatorzD
    Responsible for evaluating links for a particular project.
    z-py([123]\.?[0-9]?)$NcCs4|dkr d}||_||_||_||_||_||_dS)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)Úselfr>Úcanonical_nameÚformatsÚ target_pythonÚ allow_yankedr3r&r&r6Ú__init__tszLinkEvaluator.__init__c Csúd}|jr(|js(|jpd}dd |¡fS|jr<|j}|j}nö| ¡\}}|sPdS|tkrfdd |¡fSd|jkrŒ|t    krŒd |j
¡}d|fSd    |j kr¢|d
kr¢d S|t    kr2zt |j ƒ}Wntk
rÐYd SXt|jƒ|jkröd  |j
¡}d|fS|j ¡}| |¡s,| ¡}d d |¡¡}d|fS|j}d|jkr\|t    kr\d |j
¡}d|fS|snt||jƒ}|sˆd |j
¡}d|fS|j |¡}    |    rÆ|d|     ¡…}|     d¡}
|
|jjkrÆdSt||jj|j d} | sädSt! "d||¡d|fS)aG
        Determine whether a link is a candidate for installation.
 
        :return: A tuple (is_candidate, result), where `result` is (1) a
            version string if `is_candidate` is True, and (2) if
            `is_candidate` is False, an optional string to log the reason
            the link fails to qualify.
        Nz <none given>Fzyanked for reason: {})Fz
not a filezunsupported archive format: {}ÚbinaryzNo binaries permitted for {}Úmacosx10z.zip)Fz macosx10 one)Fzinvalid wheel filenamezwrong project name (not {})z"none of the wheel's tags match: {}ú, ÚsourcezNo sources permitted for {}zMissing project version for {}é)FzPython version is incorrect)r)r3)FNzFound link %s, version: %sT)#Ú    is_yankedr9Ú yanked_reasonÚformatÚ egg_fragmentÚextÚsplitextrr<rr>ÚpathrÚfilenamerrÚnamer:r=Úget_tagsÚ    supportedÚget_formatted_file_tagsr/r5Ú_extract_version_from_fragmentÚ_py_version_reÚsearchÚstartÚgroupÚ
py_versionr7Úpy_version_infor;r-r.) r?r2r5ÚreasonÚegg_inforNÚwheelÚsupported_tagsÚ    file_tagsÚmatchr[Úsupports_pythonr&r&r6Ú evaluate_linkšs€
 
 ÿ
ÿ
 ÿÿ ÿ  
þzLinkEvaluator.evaluate_link)N)    Ú__name__Ú
__module__Ú __qualname__Ú__doc__ÚreÚcompilerWrDrdr&r&r&r6r8hs
 
ù
&r8c
    CsÞ|st dt|ƒ|¡t|ƒSg}g}d}|D]>}|j}|js@n"|j|drV|d7}n | |¡q.| |¡q.|rx|}nt|ƒ}t|ƒt|ƒkr–d}    n d t|ƒd     dd    „|Dƒ¡¡}    t d
t|ƒ||j
|t|ƒ||    ¡|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)ÚhashesrIzdiscarding no candidateszdiscarding {} non-matches:
  {}z
  css|]}t|jƒVqdS©N)r1r2©Ú.0Ú    candidater&r&r6Ú    <genexpr>/sz*filter_unallowed_hashes.<locals>.<genexpr>zPChecked %s links for project %r against %s hashes (%s matches, %s no digest): %s) r-r.ÚlenÚlistr2Úhas_hashÚis_hash_allowedÚappendrLr/Ú digest_count)
Ú
candidatesrkr>Úmatches_or_no_digestÚ non_matchesÚ match_countror2ÚfilteredÚdiscard_messager&r&r6Úfilter_unallowed_hashesõsLü 
 
 þ
ø r}c@seZdZdZddd„ZdS)ÚCandidatePreferenceszk
    Encapsulates some of the preferences for filtering and sorting
    InstallationCandidate objects.
    FcCs||_||_dS)zR
        :param allow_all_prereleases: Whether to allow all pre-releases.
        N)Úallow_all_prereleasesÚ prefer_binary)r?r€rr&r&r6rDGs    zCandidatePreferences.__init__N)FF)rerfrgrhrDr&r&r&r6r~@sýr~c@s(eZdZdZdd„Zdd„Zdd„ZdS)    r'zÄ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.
    cCsHt|ƒt|ƒkst‚|dkr&|r2t‚n ||ks2t‚||_||_||_dS)a
        :param 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.
        N)ÚsetÚAssertionErrorÚ_applicable_candidatesÚ _candidatesÚbest_candidate©r?rwÚapplicable_candidatesr…r&r&r6rD[s 
 zBestCandidateResult.__init__cCs
t|jƒS)z(Iterate through all candidates.
        )Úiterr„©r?r&r&r6Úiter_alltszBestCandidateResult.iter_allcCs
t|jƒS)z3Iterate through the applicable candidates.
        )rˆrƒr‰r&r&r6Úiter_applicablezsz#BestCandidateResult.iter_applicableN)rerfrgrhrDrŠr‹r&r&r&r6r'Tsc@sHeZdZdZeddd„ƒZddd„Zdd    „Zd
d „Zd d „Z    dd„Z
dS)ÚCandidateEvaluatorzm
    Responsible for filtering and sorting candidates for installation based
    on what tags are valid.
    NFcCs:|dkrtƒ}|dkrt ¡}| ¡}|||||||d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.
        N)r>r`Ú    specifierr€rrk)rrÚ SpecifierSetrS)Úclsr>rBr€rrrkr`r&r&r6ÚcreateˆsúzCandidateEvaluator.createcCs(||_||_||_||_||_||_dS)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)r?r>r`rr€rrkr&r&r6rD­s zCandidateEvaluator.__init__csd|jpd}|j}dd„|jdd„|Dƒ|dDƒ‰‡fdd„|Dƒ}t||j|jd    }t||jd
S) zM
        Return the applicable candidates from a list of candidates.
        NcSsh|] }t|ƒ’qSr&)r1)rnÚvr&r&r6Ú    <setcomp>Ísz?CandidateEvaluator.get_applicable_candidates.<locals>.<setcomp>css|]}t|jƒVqdSrl©r1r5©rnÚcr&r&r6rpÖsz?CandidateEvaluator.get_applicable_candidates.<locals>.<genexpr>)Ú prereleasescsg|]}t|jƒˆkr|‘qSr&r™rš©Úversionsr&r6Ú
<listcomp>Üsz@CandidateEvaluator.get_applicable_candidates.<locals>.<listcomp>)rwrkr>©Úkey)r‘r•Úfilterr}r’r”ÚsortedÚ    _sort_key)r?rwÚallow_prereleasesrr‡Úfiltered_applicable_candidatesr&rr6Úget_applicable_candidatesÂs"    
 ÷ÿ
ÿýz,CandidateEvaluator.get_applicable_candidatesc CsÈ|j}t|ƒ}d}d}|j}|jr’t|jƒ}| |¡sFtd |j¡ƒ‚|j    rPd}| 
|¡ }|j dk    r˜t   d|j ¡}    |     ¡}
t|
dƒ|
df}n| }t| |j¡ƒ} dt|jƒ} | | ||j||fS)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&rzB{} is not a supported wheel for this platform. It can't be sorted.rINz ^(\d+)(.*)$éÿÿÿÿ)r–rqr2Úis_wheelrrQrTr    rLr“Úsupport_index_minÚ    build_tagrirbÚgroupsÚintrtr’rJr5) r?roÚ
valid_tagsÚ support_numr«Úbinary_preferencer2r_ÚprirbÚbuild_tag_groupsÚhas_allowed_hashÚ
yank_valuer&r&r6r¤ès<
 
ÿÿ 
þzCandidateEvaluator._sort_keycCs|sdSt||jd}|S)zy
        Return the best candidate per the instance's sort order, or None if
        no candidate is acceptable.
        Nr )Úmaxr¤)r?rwr…r&r&r6Úsort_best_candidate$s    z&CandidateEvaluator.sort_best_candidatecCs"| |¡}| |¡}t|||dS)zF
        Compute and return a `BestCandidateResult` instance.
        )r‡r…)r§r¶r'r†r&r&r6Úcompute_best_candidate2s
 
ýz)CandidateEvaluator.compute_best_candidate)NFFNN)FFN) rerfrgrhÚ classmethodrrDr§r¤r¶r·r&r&r&r6rŒs ù )ù
&<rŒc@sîeZdZdZd.dd„Zed/dd„ƒZedd„ƒZed    d
„ƒZ    e    j
d d
„ƒZ    ed d „ƒZ edd„ƒZ edd„ƒZ edd„ƒZdd„Zedd„ƒZdd„Zdd„Zdd„Zdd„Zd d!„Zd"d#„Zd$d%„Zd&d'„Zd0d(d)„Zd1d*d+„Zd,d-„ZdS)2r(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.
    NcCsP|dkrtƒ}|pttƒtƒƒ}||_||_||_||_||_||_tƒ|_    dS)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~r rr9Ú_candidate_prefsr;Ú_link_collectorr=Úformat_controlÚ _logged_links)r?Úlink_collectorrBrCr»Úcandidate_prefsr3r&r&r6rDLszPackageFinder.__init__cCs8|dkrtƒ}t|j|jd}|||||j|j|jd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.
        N)r€r)r¾r½rBrCr»r3)rr~r€rrCr»r3)rr½Úselection_prefsrBr¾r&r&r6rtsþúzPackageFinder.createcCs|jSrl)r=r‰r&r&r6rB•szPackageFinder.target_pythoncCs|jjSrl©rºÚ search_scoper‰r&r&r6rÁšszPackageFinder.search_scopecCs ||j_dSrlrÀ)r?rÁr&r&r6rÁŸscCs|jjSrl)rºÚ
find_linksr‰r&r&r6r¤szPackageFinder.find_linkscCs|jjSrl)rÁÚ
index_urlsr‰r&r&r6részPackageFinder.index_urlsccs|jjjD]}t|ŽVq
dSrl)rºÚsessionÚpip_trusted_originsr)r?Ú    host_portr&r&r6Ú trusted_hosts®szPackageFinder.trusted_hostscCs|jjSrl©r¹rr‰r&r&r6r´sz#PackageFinder.allow_all_prereleasescCs d|j_dS©NTrÈr‰r&r&r6Úset_allow_all_prereleases¹sz'PackageFinder.set_allow_all_prereleasescCs|jjSrl©r¹r€r‰r&r&r6r€½szPackageFinder.prefer_binarycCs d|j_dSrÉrËr‰r&r&r6Úset_prefer_binaryÂszPackageFinder.set_prefer_binarycCs.t|ƒ}|j |¡}t||||j|j|jdS)N)r>r@rArBrCr3)rr»Úget_allowed_formatsr8r=r9r;)r?r>r@rAr&r&r6Úmake_link_evaluatorÆs úz!PackageFinder.make_link_evaluatorcCsPgg}}tƒ}|D]2}||kr| |¡|jr<| |¡q| |¡q||S)z
        Returns elements of links in order, non-egg links first, egg links
        second, while eliminating duplicates
        )rÚaddrMru)r?ÚlinksÚeggsÚno_eggsÚseenr2r&r&r6Ú _sort_linksÔs
 
  zPackageFinder._sort_linkscCs(||jkr$t d||¡|j |¡dS)NzSkipping link: %s: %s)r¼r-r.rÏ)r?r2r]r&r&r6Ú_log_skipped_linkås
zPackageFinder._log_skipped_linkcCs<| |¡\}}|s(|r$|j||ddSt|j|t|ƒdS)z
        If the link is a candidate for install, convert it to an
        InstallationCandidate and return it. Otherwise, return None.
        )r]N)rRr2r5)rdrÕr r>r1)r?Úlink_evaluatorr2Ú is_candidateÚresultr&r&r6Úget_install_candidateðsûz#PackageFinder.get_install_candidatecCs6g}| |¡D]"}| ||¡}|dk    r| |¡q|S)zU
        Convert links that are candidates to InstallationCandidate objects.
        N)rÔrÙru)r?rÖrÐrwr2ror&r&r6Úevaluate_linkss   zPackageFinder.evaluate_linksc    CsTt d|¡|j |¡}|dkr$gStt|ƒƒ}tƒ|j||d}W5QRX|S)Nz-Fetching project page and analyzing links: %s©rÐ)r-r.rºÚ
fetch_pagerrr
rrÚ)r?Ú project_urlrÖÚ    html_pageÚ
page_linksÚ package_linksr&r&r6Úprocess_project_urlsÿ  þz!PackageFinder.process_project_urlc    Cs–|j |¡}| |¡}|j||jd}g}|jD]}|j||d}| |¡q0|j||jd}|rŠ|j    ddt
  dd  dd„|Dƒ¡¡|||S)    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Û)rÖT)ÚreversezLocal files found: %srGcSsg|]}t|jjƒ‘qSr&)rr2Úurlrmr&r&r6rŸFsÿz5PackageFinder.find_all_candidates.<locals>.<listcomp>) rºÚ collect_linksrÎrÚrÂÚ project_urlsráÚextendÚfilesÚsortr-r.r/)    r?r>Úcollected_linksrÖÚfind_links_versionsÚ page_versionsrÝràÚ file_versionsr&r&r6Úfind_all_candidates$s4
 
þ
ÿ þ 
þþ    z!PackageFinder.find_all_candidatescCs"|j}tj||j|j|j||dS)z3Create a CandidateEvaluator object to use.
        )r>rBr€rrrk)r¹rŒrr=r€r)r?r>rrkr¾r&r&r6Úmake_candidate_evaluatorOs    úz&PackageFinder.make_candidate_evaluatorcCs$| |¡}|j|||d}| |¡S)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.
        )r>rrk)rírîr·)r?r>rrkrwÚcandidate_evaluatorr&r&r6Úfind_best_candidatebs
ýz!PackageFinder.find_best_candidatec    Cs|jdd}|j|j|j|d}|j}d}|jdk    r@t|jjƒ}dd„}|dkr||dkr|t     d||| 
¡ƒ¡t d  |¡ƒ‚d}|rš|dks–|j|kršd    }|sÌ|dk    rÌ|r¸t  d
|¡nt  d ||j¡dS|rêt  d ||| ¡ƒ¡t‚t  d |j|| ¡ƒ¡|S)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
        F)Útrust_internet)rrkNcSs d tdd„|Dƒtd¡pdS)NrGcSsh|]}t|jƒ’qSr&r™ršr&r&r6r˜’szKPackageFinder.find_requirement.<locals>._format_versions.<locals>.<setcomp>r Únone)r/r£Ú parse_version)Ú    cand_iterr&r&r6Ú_format_versions‹s  þýz8PackageFinder.find_requirement.<locals>._format_versionszNCould not find a version that satisfies the requirement %s (from versions: %s)z%No matching distribution found for {}TzLExisting installed version (%s) is most up-to-date and satisfies requirementzUExisting installed version (%s) satisfies requirement (most up-to-date version is %s)z=Installed version (%s) is most up-to-date (past versions: %s)z)Using version %s (newest of versions: %s))rkrðrRrr…Ú satisfied_byrór5r-ÚcriticalrŠrrLr.r‹r)    r?ÚreqÚupgraderkÚbest_candidate_resultr…Úinstalled_versionrõÚbest_installedr&r&r6Úfind_requirementysl ÿ
 
üÿÿÿþ ýü
ü
ýzPackageFinder.find_requirement)NNN)N)NN)NN)rerfrgrhrDr¸rÚpropertyrBrÁÚsetterrÂrÃrÇrrÊr€rÌrÎrÔrÕrÙrÚrárírîrðrýr&r&r&r6r(EsP ù
(ü  
 
 
 
 
 
 
 
  .ü
ü
cCsLt|ƒD].\}}|dkrqt|d|…ƒ|kr|Sqtd ||¡ƒ‚dS)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 {})Ú    enumeraterÚ
ValueErrorrL)Úfragmentr@Úir›r&r&r6Ú_find_name_version_sepËs 
rcCsBzt||ƒd}Wntk
r(YdSX||d…}|s>dS|S)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.
    rIN)rr)rr@Ú version_startr5r&r&r6rVæs     rV)F)RrhÚ
__future__rÚloggingriZpip._vendor.packagingrZpip._vendor.packaging.utilsrÚpip._vendor.packaging.versionrróÚpip._internal.exceptionsrrrr    Úpip._internal.index.collectorr
Úpip._internal.models.candidater Ú#pip._internal.models.format_controlr Úpip._internal.models.linkr Ú$pip._internal.models.selection_prefsrÚ"pip._internal.models.target_pythonrÚpip._internal.models.wheelrÚpip._internal.utils.filetypesrÚpip._internal.utils.loggingrÚpip._internal.utils.miscrÚpip._internal.utils.packagingrÚpip._internal.utils.typingrÚpip._internal.utils.unpackingrÚpip._internal.utils.urlsrÚtypingrrrrrrrrÚpip._vendor.packaging.tagsr r!r"Ú!pip._internal.models.search_scoper#Zpip._internal.reqr$Úpip._internal.utils.hashesr%r­r1ZBuildTagZCandidateSortingKeyÚ__all__Ú    getLoggerrer-r7Úobjectr8r}r~r'rŒr(rrVr&r&r&r6Ú<module>sb                  (      ÿ
 
+K-E