2bi SrSSKrSSKrSSKrSSKrSSKrSSKJrJrJ r J r J r J r J r Jr SSKJr SSKJr SSKJr SSKJr SSKJr SS KJrJrJrJr SS KJrJ r SS K!J"r" SS K#J$r$ SS K%J&r& SSK'J(r( SSK)J*r* SSK+J,r, SSK-J.r. SSK/J0r0 SSK1J2r2 SSK3J4r4 SSK5J6r6 SSK7J8r8 SSK9J:r: SSK;Jr> \(aSSK?J@r@ /SQrA\2"\B5rC\\ S\ \D\E44rF\ \D\D\D\\ \D\F4rGS6S\&S\ \D\D\D4S\HS \H4S!jjrI"S"S#\R5rK"S$S%5rLS&\ \"S'\ \6S(\ES \ \"4S)jrM"S*S+5rN"S,S-5rO"S.S/5rP"S0S15rQS2\ES3\ES \D4S4jrRS2\ES3\ES \ \E4S5jrSg)7z!Routines related to PyPI, indexesN) TYPE_CHECKING FrozenSetIterableListOptionalSetTupleUnion) specifiers)Tag)canonicalize_name) _BaseVersion)parse)BestVersionAlreadyInstalledDistributionNotFoundInvalidWheelFilenameUnsupportedWheel) 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)rBestCandidateResult PackageFinderlink version_infoignore_requires_pythonreturnc[URUS9nU(dkSR[[U55nU(d#[ R SUURU5 g[ RSUURU5 g![Ra$ [ RSURU5 gf=f)aE 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. )r*.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_pythonjoinmapstrloggerverbosedebugr InvalidSpecifier)r)r*r+ is_compatibleversions ڔ/builddir/build/BUILDROOT/alt-python313-pip-23.3.1-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/pip/_internal/index/package_finder.py_check_link_requires_pythonr:3s-  % hhs3 56G)J((   LLT$$   3  & &  @   0 3 sB 5CCc\rSrSr\R "5r\R "5r\R "5r\R "5r \R "5r \R "5r \R "5r Sr g)LinkTypebr(N)__name__ __module__ __qualname____firstlineno__enumauto candidatedifferent_projectyankedformat_unsupportedformat_invalidplatform_mismatchrequires_python_mismatch__static_attributes__r(r9r<r<bsS I  YY[FYY[N #yy{rLr<c\rSrSrSr\R "S5rSS\S\S\ \S\ S \ S \ \ S S4S jjr S \S \\\44SjrSrg) LinkEvaluatorlz< Responsible for evaluating links for a particular project. z-py([123]\.?[0-9]?)$N project_namecanonical_nameformats target_python allow_yankedr+r,cVUcSnXPlX lX`lX0lX@lXlg)aU :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_pythonrP)selfrPrQrRrSrTr+s r9__init__LinkEvaluator.__init__xs34 " )%* ")-'=$ +(rLr)cSnUR(a;UR(d*UR=(d Sn[RSU34$UR (aUR nUR nGOUR5upEU(d[RS4$U[;a[RSU34$SUR;a+U[:Xa!SUR3n[RU4$SUR;aUS :Xa[RS 4$U[:Xa[UR5n[%UR&5UR(:wa"S URS 3n[R*U4$UR,R/5nUR1U5(d7SR3UR555nSUS3n[R6U4$UR8nSUR;a+U[:wa!SUR3n[RU4$U(d[;UUR(5nU(d!SUR3n[R"U4$UR<R?U5n U (aOUSU RA5nU RCS5n XR,RD:wa[R6S4$[GUUR,RHURJS9n U (d#USURL3n[RNU4$[PRSSX5 [RTU4$![ a [R"S 4s$f=f)au 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 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*r+z Requires-Python zFound link %s, version: %s)+ is_yankedrV yanked_reasonr<rF egg_fragmentextsplitextrGr$rYrrPpathrfilenamerrHr namerWrErZget_unsorted_tags supportedr0get_formatted_file_tagsrIr8_extract_version_from_fragment_py_version_researchstartgroup py_versionr:py_version_inforXr/rJr3r5rD) r[r)r8reasonegg_inforhwheelsupported_tags file_tagsmatchrusupports_pythons r9 evaluate_linkLinkEvaluator.evaluate_linksB >>$"4"4''9>FOO':6(%CD D   ((H((C MMOMH 33\BB..//23%8t}},1G5d6G6G5HI 33V<<TYY&3&= 33^DDo%!$--0E %UZZ0D4H4HH78I8I7J!LF$66??!%!4!4!F!F!H~66!% %*G*G*I JI4YK@LM%66??-- 4== (SO-C01B1B0CDF//8 84$$G3D4E4E3FGF++V4 4##**73 o .GQJ00;;;..1 6 ,,<<#'#?#?  y 1$2F2F1GHF55v> > 14A""G,,s, //0s2M++N  N )rVrWrYrXrZrPN)r>r?r@rA__doc__recompilerqr2rrboolrr\rr r<r~rKr(rLr9rNrNlsZZ 78N26#)#)#)3 #) $ #)  #)!)#) #)J\-$\-53+?\-rLrN candidateshashesrPc vU(d+[RS[U5U5 [U5$/n/nSnUH_nURnUR (dO-UR US9(aUS- nOURU5 MNURU5 Ma U(aUnO [U5n[U5[U5:XaSn O1SR[U5SRSU555n [RS [U5UURU[U5U- U 5 U$) 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)rrdzdiscarding no candidateszdiscarding {} non-matches: {}z c3L# UHn[UR5v M g7fr)r2r)).0rDs r9 *filter_unallowed_hashes..5sI[ INN++["$zPChecked %s links for project %r against %s hashes (%s matches, %s no digest): %s) r3r5lenlistr)has_hashis_hash_allowedappendformatr0 digest_count) rrrPmatches_or_no_digest non_matches match_countrDr)filtereddiscard_messages r9filter_unallowed_hashesrs,(   '  O   JKK ~~}}   ! ! ! 0 1 K   y ) ##I. ' # 8}J'4<CC   KKI[I I   LL ) J !K/  OrLc6\rSrSrSrS S\S\SS4SjjrSrg) CandidatePreferencesiFz_ Encapsulates some of the preferences for filtering and sorting InstallationCandidate objects. prefer_binaryallow_all_prereleasesr,NcX lXlg)zB :param allow_all_prereleases: Whether to allow all pre-releases. Nrr)r[rrs r9r\CandidatePreferences.__init__Ms&;"*rLr)FF)r>r?r@rArrr\rKr(rLr9rrFs5$&+ + + $ +  + +rLrcl\rSrSrSrS\\S\\S\\SS4SjrS\ \4S jr S\ \4S jr S r g) r&iYzA collection of candidates, returned by `PackageFinder.find_best_candidate`. This class is only intended to be instantiated by CandidateEvaluator's `compute_best_candidate()` method. rapplicable_candidatesbest_candidater,Nc[U5[U5::deUc U(aeOX2;deX lXlX0lg)z :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_applicable_candidates _candidatesrr[rrrs r9r\BestCandidateResult.__init__`sL()S_<<<  !, ,,,!: ::&;#%,rLc,[UR5$)zIterate through all candidates.)iterrr[s r9iter_allBestCandidateResult.iter_allxsD$$%%rLc,[UR5$)z*Iterate through the applicable candidates.)rrrs r9iter_applicable#BestCandidateResult.iter_applicable|sD//00rL)rrr) r>r?r@rArrrrr\rrrrKr(rLr9r&r&Ysh -./- $$9:-!!67 -  -0&(#89&1*?!@1rLr&c2\rSrSrSr\SS\S\\S\ S\ S\\ RS \\ S S4S jj5r SS\S \\S\ RS\ S\ S \\ S S4S jjrS\\S \\4SjrS\S \4SjrS\\S \\4SjrS\\S \4SjrSrg)CandidateEvaluatoriza Responsible for filtering and sorting candidates for installation based on what tags are valid. NrPrSrr specifierrr,c Uc [5nUc[R"5nUR5nU"UUUUUUS9$)aCreate 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. )rPrzrrrr)rr SpecifierSetget_sorted_tags)clsrPrSrrrrrzs r9createCandidateEvaluator.createsR(  (NM  "//1I&668%)'"7   rLrzcXPlX`lX@lXlX0lX l[ U5VVs0sHupxX_M snnUlgs snnf)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) r[rPrzrrrridxtags r9r\CandidateEvaluator.__init__sS'<# +)#- &/~%>' %>CH%>' #' sA rcvUR=(d SnURnURSU5US9Vs1sHn[U5iM nnUVs/sH n[UR5U;dMUPM" nn[ UUR URS9n[XRS9$s snfs snf)z= Return the applicable candidates from a list of candidates. Nc3L# UHn[UR5v M g7fr)r2r8)rcs r9r?CandidateEvaluator.get_applicable_candidates..s4AQYYr) prereleases)rrrPkey) rrfilterr2r8rrrsorted _sort_key) r[rallow_prereleasesrvversionsrrfiltered_applicable_candidatess r9get_applicable_candidates,CandidateEvaluator.get_applicable_candidatess!77?4OO %%54-&     F    -7 UJq#aii.H:TJ U)@,<<++* & 4..II1  !VsB1B67B6rDcURn[U5nSnSnURnUR(a[ UR 5nUR X R5*nUR(aSnURbN[R"SUR5n U cS5eU R5n [!U S5U S4nOU*n[!UR#UR$55n S[!UR&5-n U U UUR(UU4$![a% [SRUR 55ef=f)ay 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.rdz ^(\d+)(.*)$z!guaranteed by filename validation)rrr)is_wheelrrkfind_most_preferred_tagr ValueErrorrrr build_tagrr|groupsintrrrer8) r[rD valid_tags support_numrbinary_preferencer)ryprir|build_tag_groupshas_allowed_hash yank_values r9rCandidateEvaluator._sort_keysT<)) *o  ~~ ==$--(E 11"$?$?""$%!*A(M*MM(#(<<>  !1!!457G7JK .Ct33DLLAB#dnn--           ! &''-venn'= s D++/Ec<U(dg[XRS9nU$)za Return the best candidate per the instance's sort order, or None if no candidate is acceptable. Nr)maxr)r[rrs r9sort_best_candidate&CandidateEvaluator.sort_best_candidate/sZ^^<rLc\URU5nURU5n[UUUS9$)z6 Compute and return a `BestCandidateResult` instance. )rr)rrr&rs r9compute_best_candidate)CandidateEvaluator.compute_best_candidate<s<!% > >z J112GH" "7)  rL)rrrrrrr)NFFNN)FFN)r>r?r@rAr classmethodr2rrrr BaseSpecifierr rrr r\rrCandidateSortingKeyrrr&rrKr(rLr9rrsi 15#&+8<#'! !  -!  ! $ ! J445 !  !  ! ! P$&+#'  S  ++    $      4"J./"J # $"JHC #8C =PC J ./  ' (  ./   rLrcD\rSrSrSrS1S\S\S\S\\ S\\ S \\S S4S jjr \ S2S\S \ S\\S S4S jj5r\S \4Sj5r\S \4Sj5r\R&S\S S4Sj5r\S \\4Sj5r\S \\4Sj5r\S \\4Sj5r\S \4Sj5rS3Sjr\S \4Sj5rS3SjrS \\4SjrS\S \4Sjr S\\!S \\!4Sjr"S\!S\#S \S S4S!jr$S"\S\!S \\%4S#jr&S"\S\\!S \\%4S$jr'S%\!S"\S \\%4S&jr(\)RT"SS'9S\S \\%4S(j5r+S4S\S)\\,RZS*\\.S \/4S+jjr0\)RT"SS'9S4S\S)\\,RZS*\\.S \14S,jj5r2S-\3S.\S \\%4S/jr4S0r5g)5r'iNzThis finds packages. This is meant to match easy_install's technique for looking for packages, by reading pages and looking for appropriate links. Nlink_collectorrSrTformat_controlcandidate_prefsr+r,cUc [5nU=(d [[5[55nX0lXPlX`lXlX lX@l[5Ul g)aS 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) rrrrV_candidate_prefsrX_link_collectorrZr _logged_links)r[rrSrTrrr+s r9r\PackageFinder.__init__UsX&  "24O'F=+F) /'=$-+,?BerLselection_prefsc Uc [5n[URURS9nU"UUUURUR UR S9$)a6Create 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. )rr)rrrSrTrr+)rrrrrTrr+)rrrrSrs r9rPackageFinder.create|s`  (NM.)77"1"G"G  +)'(55*99#2#I#I   rLcUR$r)rZrs r9rSPackageFinder.target_pythons"""rLc.URR$rr search_scopers r9rPackageFinder.search_scopes##000rLrc$XRlgrr)r[rs r9rrs,8)rLc.URR$r)r find_linksrs r9rPackageFinder.find_linkss##...rLc.URR$r)r index_urlsrs r9rPackageFinder.index_urlss  +++rLc#n# URRRH n[U6v M g7fr)rsessionpip_trusted_originsr")r[ host_ports r9 trusted_hostsPackageFinder.trusted_hostss---55III * *Js35c.URR$rrrrs r9r#PackageFinder.allow_all_prereleasess$$:::rLc&SURlgNTrrs r9set_allow_all_prereleases'PackageFinder.set_allow_all_prereleasess6:3rLc.URR$rrrrs r9rPackageFinder.prefer_binarys$$222rLc&SURlgrrrs r9set_prefer_binaryPackageFinder.set_prefer_binarys.2+rLcURVVVs1sHupnU[R:XdMUiM nnnn[U5$s snnnfr)rr<rJr)r[_resultdetailreasonss r9requires_python_skipped_reasons-PackageFinder.requires_python_skipped_reasonssN&*%7%7 %7!6::: %7  g  s AArPc [U5nURRU5n[UUUURUR UR S9$)N)rPrQrRrSrTr+)r rget_allowed_formatsrNrZrVrX)r[rPrQrRs r9make_link_evaluator!PackageFinder.make_link_evaluatorsS*<8%%99.I%)--++#'#?#?   rLlinksc//p2[5nUHPnXT;dM URU5 UR(aURU5 M?URU5 MR X2-$)zi Returns elements of links in order, non-egg links first, egg links second, while eliminating duplicates )raddrgr)r[r(eggsno_eggsseenr)s r9 _sort_linksPackageFinder._sort_linkssX Bg%D$$KK%NN4( ~rLr)rr cXU4nX@R;a2[RSX15 URRU5 gg)NzSkipping link: %s: %s)rr3r5r*)r[r)rr entrys r9_log_skipped_linkPackageFinder._log_skipped_linksBv& ** * LL0& ?    " "5 ) +rLlink_evaluatorcURU5up4U[R:waURX#U5 g[ UR UUS9$)zw If the link is a candidate for install, convert it to an InstallationCandidate and return it. Otherwise, return None. N)rlr)r8)r~r<rDr2rrP)r[r4r)rr s r9get_install_candidate#PackageFinder.get_install_candidatesS(55d; X'' '  " "4 8$,,  rLc/nURU5H*nURX5nUcMURU5 M, U$)zE Convert links that are candidates to InstallationCandidate objects. )r.r6r)r[r4r(rr)rDs r9evaluate_linksPackageFinder.evaluate_linkssJ  $$U+D22>HI$!!),, rL project_urlc[RSU5 URRU5nUc/$[ [ U55n[ 5 URUUS9nSSS5 U$!,(df  W$=f)Nz-Fetching project page and analyzing links: %s)r()r3r5rfetch_responserrr!r9)r[r;r4index_response page_links package_linkss r9process_project_url!PackageFinder.process_project_urls  ;  --<<[I  !I+n56 \ // 0M  \ s A00 A?)maxsizec,URU5nURRU[R"UR US9S9n[ RRSU55n[U5n[ RRSU55nURU[USS95n[R[R5(azU(as/nUHFn U R R"(deUR%U R R&5 MH [R+SSR-U55 Xu-$![(a) UR%U R R"5 Mf=f) zFind 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. )r4)rPcandidates_from_pagec3`# UH$nUHnUcMUR5v M M& g7fr)page_candidatesrsourcesrcs r9r4PackageFinder.find_all_candidates..9s5; ,! %F " " $ $! %, ..c3`# UH$nUHnUcMUR5v M M& g7fr) file_linksrHs r9rrJAs56 ,! F    ! ,rKT)reversezLocal files found: %srb)r&rcollect_sources functoolspartialrA itertoolschain from_iterablerr9rr3 isEnabledForloggingDEBUGr)urlr file_path Exceptionr5r0) r[rPr4collected_sourcespage_candidates_itrG file_links_itfile_candidatespathsrDs r9find_all_candidates!PackageFinder.find_all_candidates%sa11,? 00@@%!*!2!2((-"A '__::; ,;   12!556 ,6  --  =$ /    w}} - -/E,  ~~))))5LL!9!9:- LL0$))E2B C00 !5LL!3!345s%E  /FFrrc URn[RUURURUR UUS9$)z*Create a CandidateEvaluator object to use.)rPrSrrrr)rrrrZrr)r[rPrrrs r9make_candidate_evaluator&PackageFinder.make_candidate_evaluatorZsK//!((%--)77"1"G"G )  rLchURU5nURUUUS9nURU5$)zFind 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. )rPrr)r`rcr)r[rPrrrcandidate_evaluators r9find_best_candidate!PackageFinder.find_best_candidateksF--l; ";;%<  #99*EErLrequpgradecP^^URSS9nURURURUS9nURmSmUR bUR R mS[[S[4SjnTcHTcE[RSUU"UR555 [S RU55eS [[SS 4UU4S jjnU(dITbFU"T5(a"[R!S TTR 5 g[R!ST5 gU"T5(a7[R!STR U"UR#555 T$[R!STU"UR#555 [$e)zTry 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)rrN cand_iterr,c SR[UVs1sHn[UR5iM sn[S95=(d S$s snf)Nrbrnone)r0rr2r8 parse_version)rmrs r9_format_versions8PackageFinder.find_requirement.._format_versionssI  1:;AQYY;)  TcgTcgTRT:$)NTF)r8)rDrinstalled_versions r9_should_install_candidateAPackageFinder.find_requirement.._should_install_candidates)!(%!)),== =rLzUExisting 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))rrgrlrr satisfied_byr8rrr2r3criticalrrrrr5rr) r[rirjrbest_candidate_resultrqrurrts @@r9find_requirementPackageFinder.find_requirements51 $ 8 8 HHmm!9!  /==48    ' # 0 0 8 8  1F(G C   $)? OO& !6!?!?!AB  '7>>sC  > 56 > / > >,8(88 6%"**   ,%  $^ 4 4 LL;&& !6!F!F!HI  " !  K  2BBD E *)rL)rVrrXrrrZr)NNNr)r,N)NN)6r>r?r@rArrrrrrrr\rrrpropertyrSrrsetterrr2rrrrrrrrr"rNr&rr.r<r2rr6r9rArP lru_cacher`r rr rrcr&rgrrzrKr(rLr9r'r'Ns37:>15!D%!D$!D !D !/ !D ""67 !D!)!D !DN 15  % .  -     >#|##1k119999/DI//,DI,,+x}++;t;;;3t333c     $DJ *d*H*c*d* + 37 ' ( $ + 4 # $*&2121=R8S21'21n9=#'   J445     "&9=#' FFJ445F F  F'F,W*%W*04W* ' (W*rLr'fragmentrQc[U5H#up#US:waM [USU5U:XdM!Us $ [USU35e)aFind the separator's index based on the package's canonical name. :param fragment: A + 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 )rr r)rrQirs r9_find_name_version_seprsQ$(# 8  Xbq\ *n <H $ z!1.1AB CCrLc\[X5S-nXSnU(dgU$![a gf=f)zParse the version string from a + 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. rdN)rr)rrQ version_startr8s r9rprpsA.xH1L ~&G  N s  ++)F)TrrBrPrRrVrtypingrrrrrrr r pip._vendor.packagingr pip._vendor.packaging.tagsr pip._vendor.packaging.utilsr pip._vendor.packaging.versionrrrppip._internal.exceptionsrrrrpip._internal.index.collectorrrpip._internal.models.candidater#pip._internal.models.format_controlrpip._internal.models.linkr!pip._internal.models.search_scoper$pip._internal.models.selection_prefsr"pip._internal.models.target_pythonrpip._internal.models.wheelrpip._internal.reqrpip._internal.utils._logrpip._internal.utils.filetypesrpip._internal.utils.hashesr pip._internal.utils.loggingr!pip._internal.utils.miscr"pip._internal.utils.packagingr#pip._internal.utils.unpackingr$pip._vendor.typing_extensionsr%__all__r>r3rr2BuildTagrrr:Enumr<rNrrr&rr'rrpr(rLr9rs'  XXX,*96@ E@=*9E;,0.9-21?>7 C 8  rE#s(O+ ,Cc<#PQ $), ,S# &,!, ,^+tyy+M-M-`G*+G V GG  GT++&%1%1PJ J ZK*K*\ DSD#D#D4S#(SV-rL