\bgqg \dZddlZddlZddlZddlZddlZddlZddlZddlm Z m Z m Z ddl m Z mZmZmZmZmZmZddlmZddlmZddlmZmZmZddlmZdd lmZe rdd l m!Z!dd l"m#Z#m$Z$dd l%m&Z&dd l'm(Z(ej)e*Z+de,de-fdZ.deee,fdede,de,def dZ/Gdde0Z1Gdde1Z2Gdde1Z3Gdde1Z4Gdde2Z5Gdd e2Z6Gd!d"e1Z7Gd#d$e4Z8Gd%d&e4Z9Gd'd(e4Z:Gd)d*e4Z;Gd+d,e1Z<Gd-d.e1Z=Gd/d0e1Z>Gd1d2e1Z?Gd3d4e1Z@Gd5d6e4ZAGd7d8e4ZBGd9d:e4ZCGd;de4ZEGd?d@e2e4ZFGdAdBeFe4ZGGdCdDe4ZHGdEdFe4ZIGdGdHeIZJGdIdJeIZKGdKdLeIZLGdMdNeIZMGdOdPeIZNGdQdRe4ZOGdSdTe3ZPdUejQdVZRGdWdXe2ZSGdYdZe2ZTGd[d\e2ZUGd]d^e2ZVdS)_zExceptions used throughout package. This module MUST NOT try to import from anything within `pip._internal` to operate. This is expected to be importable from any/all files within the subpackage and, thus, should not depend on them. N)chaingroupbyrepeat) TYPE_CHECKINGDictIteratorListLiteralOptionalUnion)InvalidRequirement)InvalidVersion)ConsoleConsoleOptions RenderResult)escape)Text)_Hash)RequestResponse)BaseDistribution)InstallRequirementsreturnc0tjd|duS)Nz^[a-z]+(-[a-z]+)*$)rematch)rs i/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/pip/_internal/exceptions.py_is_kebab_caser&s 8)1 - -T 99consoleprefixindentct|tr|}n||}||d|d|d|dzS)Nignore)overflow T) allow_blank) isinstancer render_strjoinsplit)rr!r"r#texts r_prefix_with_indentr.*s!T%!!!$$   fx  8 87;M;MV ) hasattrr9rr;r>r?r<r@r=super__init__ __class__r2) selfr;r9r>r?r@r<r=rGs rrFzDiagnosticPipError.__init__Ls  4-- N N/N N N-Ii((OO*OOO( "  ""  IT^4IIIIIJJJJJr c rd|jjd|jd|jd|jd|jd|jd S)NrBz (reference=z , message=z , context=z , note_stmt=z , hint_stmt=z)>)rGr2r9r>r?r<r@rHs r__repr__zDiagnosticPipError.__repr__jss '    |  |           r r!optionsc#PK|jdkrdnd}d|d|jd|jdVdV|jsg|jEt |j|d|d d|d  Vt |j|d|d d|d  Vn8t |j|dd Vn|jV|j dV|jV|j|jdV|jt |j|dd V|jt |j|dd V|jdVd|jVdSdS)Nr:redyellow[z bold]z [/]: [bold]z[/]u]×[/] u]│[/] )r"r#u ]╰─>[/] z] [/] u [red]×[/] z z[magenta bold]note[/]: z z[cyan bold]hint[/]: zLink: ) r;r9 ascii_onlyr?r.r>r<r@r=)rHr!rLcolours r__rich_console__z#DiagnosticPipError.__rich_console__us )w..HI&II IIdnIIIIII! #|')L.v.../v///  *L3v333/v/// *L( ,   |'l""" > %)CHHH > %%0     > %%-     9 HHH&49&& & & & & & ! r )r2r3r4r5str__annotations__r r rrFrKrrrrT __classcell__rGs@rr8r8?sTNNN /6#'15"KKK,KC= K sDy! K %T *+ KE#t),-KE#t),-KsmK KKKKKK<  #     :':' :'  :':':':':':':':'r r8ceZdZdZdS)ConfigurationErrorz"General exception in configurationNr1r6r rrZrZs,,,,r rZceZdZdZdS)InstallationErrorz%General exception during installationNr1r6r rr\r\s////r r\c0eZdZdZdZdeddffd ZxZS)MissingPyProjectBuildRequireszNRaised when pyproject.toml has `build-system`, but no `build-system.requires`.z'missing-pyproject-build-system-requirespackagerNctdt|tddtddS)NCan not process zrThis package has an invalid pyproject.toml file. The [build-system] table is missing the mandatory `requires` key.;This is an issue with the package mentioned above, not pip.+See PEP 518 for the detailed specification.r>r?r<r@rErFrr)rHr_rGs rrFz&MissingPyProjectBuildRequires.__init__sd 8vg88TTHII      r r2r3r4r5r9rUrFrWrXs@rr^r^sVXX9I  3  4           r r^c4eZdZdZdZdededdffd ZxZS)InvalidPyProjectBuildRequiresz>Raised when pyproject.toml an invalid `build-system.requires`.z'invalid-pyproject-build-system-requiresr_reasonrNctdt|td|dtddS)NrazKThis package has an invalid `build-system.requires` key in pyproject.toml. rbrcrdre)rHr_rirGs rrFz&InvalidPyProjectBuildRequires.__init__sp 8vg88-$*--THII      r rfrXs@rrhrhs]HH9I  3               r rhc2eZdZdZdddeddfdZdefdZdS) NoneMetadataErrora4Raised when accessing a Distribution's "METADATA" or "PKG-INFO". This signifies an inconsistency, when the Distribution claims to have the metadata file (if not, raise ``FileNotFoundError`` instead), but is not actually able to produce its content. This may be due to permission errors. distr metadata_namerNc"||_||_dS)z :param dist: A Distribution object. :param metadata_name: The name of the metadata being accessed (can be "METADATA" or "PKG-INFO"). N)rmrn)rHrmrns rrFzNoneMetadataError.__init__s *r c&d|jd|jS)NzNone z" metadata found for distribution: )rnrmrJs r__str__zNoneMetadataError.__str__s Yt)XXTYXXXr r2r3r4r5rUrFrqr6r rrlrlsp +  + +  + + + +YYYYYYYr rlceZdZdZdefdZdS)UserInstallationInvalidzBA --user install is requested on an environment without user site.rcdS)Nz$User base directory is not specifiedr6rJs rrqzUserInstallationInvalid.__str__s55r N)r2r3r4r5rUrqr6r rrtrts5LL6666666r rtceZdZdefdZdS)InvalidSchemeCombinationrcdd|jddD}d|d|jddS)Nz, c34K|]}t|VdSN)rU).0as r z3InvalidSchemeCombination.__str__..s(::a3q66::::::r z Cannot set z and z together)r+args)rHbefores rrqz InvalidSchemeCombination.__str__sK::49SbS>:::::BVBB$)B-BBBBr N)r2r3r4rUrqr6r rrwrws6CCCCCCCr rwceZdZdZdS)DistributionNotFoundzCRaised when a distribution cannot be found to satisfy a requirementNr1r6r rrrsMMMMr rceZdZdZdS)RequirementsFileParseErrorzDRaised when a general error occurs parsing a requirements file line.Nr1r6r rrr sNNNNr rceZdZdZdS)BestVersionAlreadyInstalledzNRaised when the most up-to-date version of a package is already installed.Nr1r6r rrrsr rceZdZdZdS) BadCommandz0Raised when virtualenv or a command is not foundNr1r6r rrrs::::r rceZdZdZdS) CommandErrorz7Raised when there is an error in command-line argumentsNr1r6r rrrsAAAAr rceZdZdZdS)PreviousBuildDirErrorz:Raised when there's a previous conflicting build directoryNr1r6r rrrsDDDDr rc ^eZdZdZ d dededdedddffd Zdefd ZxZS) NetworkConnectionErrorzHTTP connection errorN error_msgresponserrequestrrc||_||_||_|j(|js!t|dr|jj|_t |||dS)zc Initialize NetworkConnectionError with `request` and `response` objects. Nr)rrrrDrErF)rHrrrrGs rrFzNetworkConnectionError.__init__$sn!  " M %L &),, & =0DL Hg66666r c*t|jSrz)rUrrJs rrqzNetworkConnectionError.__str__9s4>"""r )NN) r2r3r4r5rUr rFrqrWrXs@rrr!s *.'+ 777:&7)$ 7  777777*#########r rceZdZdZdS)InvalidWheelFilenamezInvalid wheel filename.Nr1r6r rrr=s!!!!r rceZdZdZdS)UnsupportedWheelzUnsupported wheel.Nr1r6r rrrAsr rc.eZdZdZdedefdZdefdZdS) InvalidWheelzInvalid (e.g. corrupt) wheel.locationnamec"||_||_dSrz)rr)rHrrs rrFzInvalidWheel.__init__Hs   r rc(d|jd|jdS)NzWheel 'z ' located at z is invalid.)rrrJs rrqzInvalidWheel.__str__LsLLLLLLLr Nrrr6r rrrEs^''CMMMMMMMr rc :eZdZdZdddedededdf d Zdefd ZdS) MetadataInconsistentaBuilt metadata contains inconsistent information. This is raised when the metadata contains values (e.g. name and version) that do not match the information previously obtained from sdist filename, user-supplied ``#egg=`` value, or an install requirement name. ireqrfieldf_valm_valrNc>||_||_||_||_dSrzrrrr)rHrrrrs rrFzMetadataInconsistent.__init__Xs$    r cFd|jd|jd|jd|jS)N Requested z has inconsistent z : expected z, but metadata has rrJs rrqzMetadataInconsistent.__str__`sO H H Hdj H H  H H9= H H r rrr6r rrrPsu(14=@IL        r rc2eZdZdZdddeddfdZdefdZdS) MetadataInvalidzMetadata is invalid.rrr:rNc"||_||_dSrzrr:)rHrr:s rrFzMetadataInvalid.__init__js  r c&d|jd|jS)Nrz has invalid metadata: rrJs rrqzMetadataInvalid.__str__nsJDIJJdjJJJr rrr6r rrrgsf1#$KKKKKKKr rc\eZdZdZdZdededeeeddffd Z defd Z xZ S) InstallationSubprocessErrorzA subprocess call failed.zsubprocess-exited-with-errorcommand_description exit_code output_linesrNcr|td}n]tjdt|dtd|ztjdz}t dt |d||dd ||_||_dS) NzSee above for output.z[red][z lines of output][/] rQz[red]\[end of output][/]z[green]z)[/] did not run successfully. exit code: zNThis error originates from a subprocess, and is likely not a problem with pip.r>r?r@r<) r from_markuplenr+rErFrrr)rHrrr output_promptrGs rrFz$InstallationSubprocessError.__init__ws   !899MM !S#l*;*;!S!S!STTrww|,,--."#>??@  *&!455**'**"$  $7 "r c$|jd|jS)Nz exited with )rrrJs rrqz#InstallationSubprocessError.__str__s*IIIIIr ) r2r3r4r5r9rUintr r rFrqrWrXs@rrrrs##.I#!# # tCy) #  ######@JJJJJJJJJr rc8eZdZdZdeddffd ZdefdZxZS)MetadataGenerationFailedzmetadata-generation-failedpackage_detailsrNcztt|dt|dddS)Nz4Encountered error while generating package metadata.zSee above for details.rbr)rErrFr)rHrrGs rrFz!MetadataGenerationFailed.__init__sK )40099J?++.S :     r cdS)Nzmetadata generation failedr6rJs rrqz MetadataGenerationFailed.__str__s++r )r2r3r4r9rUrFrqrWrXs@rrrsq,I            ,,,,,,,,,r rc:eZdZdZd dZd dZdefdZdefd Z dS) HashErrorsz:Multiple HashError instances rolled into one for reportingrNcg|_dSrz)errorsrJs rrFzHashErrors.__init__s ') r r: HashErrorc:|j|dSrz)rappend)rHr:s rrzHashErrors.appends 5!!!!!r cg}|jdt|jdD]>\}}||j|d|D?|rd|SdS)Nc|jSrz)orderes rz$HashErrors.__str__..sqwr )keyc|jSrzrXrs rrz$HashErrors.__str__..sr c3>K|]}|VdSrz)body)r{rs rr}z%HashErrors.__str__..s*99a999999r r'rQ)rsortrrheadextendr+)rHlinescls errors_of_clss rrqzHashErrors.__str__s ..///")$+7L7L"M"M : : C LL " " " LL99=999 9 9 9 9  $99U## #rr c*t|jSrz)boolrrJs r__bool__zHashErrors.__bool__sDK   r )rN)r:rrN) r2r3r4r5rFrrUrqrrr6r rrrsxDD****""""!$!!!!!!r rcdeZdZUdZdZeded<dZdZe ed<de fd Z de fd Z de fd Z dS) ra A failure to verify a package against known-good hashes :cvar order: An int sorting hash exception classes by difficulty of recovery (lower being harder), so the user doesn't bother fretting about unpinned packages when he has deeper issues, like VCS dependencies, to deal with. Also keeps error reports in a deterministic order. :cvar head: A section heading for display above potentially many exceptions of this kind :ivar req: The InstallRequirement that triggered this error. This is pasted on after the exception is instantiated, because it's not typically available earlier. NrreqrQr~rrc0d|S)a=Return a summary of me for display under the heading. This default implementation simply prints a description of the triggering requirement. :param req: The InstallRequirement that provoked this error, with its link already populated by the resolver's _populate_link().  )_requirement_namerJs rrzHashError.bodys1d,,..000r c>|jd|S)Nr')rrrJs rrqzHashError.__str__s ),,tyy{{,,,r c<|jrt|jndS)zReturn a description of the requirement that triggered me. This default implementation returns long description of the req, with line numbers unknown package)rrUrJs rrzHashError._requirement_names!%?s48}}}.??r )r2r3r4r5rr rVrrrrUrrqrr6r rrrs +/C& '... DE3OOO 1c 1 1 1 1-----@3@@@@@@r rceZdZdZdZdZdS)VcsHashUnsupporteduA hash was provided for a version-control-system-based requirement, but we don't have a method for hashing those.rzlCan't verify hashes for these requirements because we don't have a way to hash version control repositories:Nr2r3r4r5rrr6r rrrs)11 E ; DDr rceZdZdZdZdZdS)DirectoryUrlHashUnsupportedrzUCan't verify hashes for these file:// requirements because they point to directories:Nrr6r rrrs)11 E  DDr rc6eZdZdZdZdZdeddfdZdefdZdS) HashMissingz2A hash was needed for a requirement but is absent.awHashes are required in --require-hashes mode, but they are missing from some requirements. Here is a list of those requirements along with the hashes their downloaded archives actually had. Add lines like these to your requirements files to prevent tampering. (If you did not enable --require-hashes manually, note that it turns on automatically when any package has a hash.) gotten_hashrNc||_dS)zq :param gotten_hash: The hash of the (possibly malicious) archive we just downloaded N)r)rHrs rrFzHashMissing.__init__s 'r cddlm}d}|jr.|jjr |jjnt |jdd}d|pd||jS)Nr) FAVORITE_HASHrz {} --hash={}:{}r)pip._internal.utils.hashesrr is_direct original_linkgetattrformatr)rHrr_s rrzHashMissing.bodys~<<<<<< 8  8%4&&TXud33 %++  ((-9I   r ) r2r3r4r5rrrUrFrr6r rrr sf<< E  'C'D'''' c      r rceZdZdZdZdZdS) HashUnpinnedzPA requirement had a hash specified but was not pinned to a specific version.zaIn --require-hashes mode, all requirements must have their versions pinned with ==. These do not:Nrr6r rrr3s) E 1 DDr rcreZdZdZdZdZdeeeefdeedfddfd Z defd Z defd Z dS) HashMismatchz Distribution file hash values don't match. :ivar package_name: The name of the package that triggered the hash mismatch. Feel free to write to this after the exception is raise to improve its error message. zTHESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.allowedgotsrrNc"||_||_dS)z :param allowed: A dict of algorithm names pointing to lists of allowed hex digests :param gots: A dict of algorithm names pointing to hashes we actually got from the files under suspicion N)rr)rHrrs rrFzHashMismatch.__init__Ps  r cZd|d|S)Nr: )r_hash_comparisonrJs rrzHashMismatch.bodyZs0Ld,,..LL43H3H3J3JLLLr cNdtddfd}g}|jD]g\}}|||fd|D|d|j|dhd|S)aE Return a comparison of actual and expected hash values. Example:: Expected sha256 abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde or 123451234512345123451234512345123451234512345 Got bcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdef hash_namerz chain[str]c>t|gtdS)Nz or)rr)rs r hash_then_orz3HashMismatch._hash_comparison..hash_then_oris)fX&6&677 7r c3BK|]}dtd|VdS)z Expected  N)next)r{rr"s rr}z0HashMismatch._hash_comparison..qs:UUa@d6ll@@Q@@UUUUUUr z Got r')rUritemsrrr hexdigestr+)rHrrr expectedsr"s @rrzHashMismatch._hash_comparison]s 8C 8L 8 8 8 8 $(L$6$6$8$8   Iy!\),,F LLUUUU9UUU U U U LLO49Y+?+I+I+K+KOOO    yyr ) r2r3r4r5rrrrUr rFrrr6r rrr>s E / S$s)^ 4Dg>##6#6 q'v'''''' s ( 77configctjd} ||d|d}|D]F}t jt 5|||cdddcS#1swxYwYGnj#t $rYn^tttj f$r@ddl m }t |}td||YnwxYw|dS) N) interpolationzutf-8)encodingzexternally-managedr)VERBOSEzFailed to read %s)exc_info)r ConfigParserreadr% contextlibsuppressKeyErrorOSErrorUnicodeDecodeError ParsingErrorpip._internal.utils._logr*logger isEnabledForwarning)rr&parsersectionrr*r+s r from_configz(ExternallyManagedEnvironment.from_configs *>>> K KKK 1 1 112G>>@@ - -(22--3ws|,,------------------- -    D+\-FG K K K 8 8 8 8 8 8**733H NN.N J J J J J  K s4yys=AB%B6BB B B B C9AC98C9)r2r3r4r5r9r rUrF staticmethodrr% classmethodr pathlibPathr:rWrXs@rrrs1I hsm       "#\*glC'( ([r rc$eZdZdZdfd ZxZS)UninstallMissingRecordzuninstall-no-record-file distributionrrNc|j}|r|dkr,|jd|j}tjdd|df}ntd|d}t td|d |jd | dS) Npipz==z,You might be able to recover from this via: z(pip install --force-reinstall --no-deps greenzThe package was installed by z3. You should check if it can uninstall the package.Cannot uninstall zAThe package's contents are unknown: no RECORD file was found for rr>r?r@) installerraw_nameversionrassemblerErF)rHrArGdephintrGs rrFzUninstallMissingRecord.__init__s *  I..!*DDl.BDDC=>ACAA7KDD D DDDD ;\;;<<I0<0EIII      r rArrNr2r3r4r9rFrWrXs@rr@r@sB*I          r r@c$eZdZdZdfd ZxZS)LegacyDistutilsInstallz%uninstall-distutils-installed-packagerArrNcpttd|dddS)NrEzIt is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.rF)rErFr)rHrArGs rrFzLegacyDistutilsInstall.__init__sL ;\;;<<      r rMrNrXs@rrPrPsB7I           r rPc@eZdZdZdddeeefddffd ZxZS)InvalidInstalledPackagezinvalid-installed-packagermr invalid_excrNc |j}t|trd}nd}tt d|d|rd|dndzd|d|jd zd |d d dS)N requirementrIz!Cannot process installed package rzin rQzbecause it has an invalid rrz.Starting with pip 24.1, packages with invalid zs can not be processed.z,To proceed this package must be uninstalled.rF)installed_locationr)r rErFrr)rHrmrTrW invalid_typerGs rrFz InvalidInstalledPackage.__init__s "4 k#5 6 6 %(LL$L ;D;;;4FN0+0000BPU|UU @PQR@SUUV 9999E  r ) r2r3r4r9r r rrFrWrXs@rrSrSsk+I ! -~=>             r rS)Wr5rr.rloggingr=rsys itertoolsrrrtypingrrrr r r r "pip._vendor.packaging.requirementsr pip._vendor.packaging.versionrpip._vendor.rich.consolerrrpip._vendor.rich.markuprpip._vendor.rich.textrhashlibrpip._vendor.requests.modelsrrpip._internal.metadatarpip._internal.req.req_installr getLoggerr2r5rUrrr. Exceptionr0r8rZr\r^rhrlrtrwrrrrrrrrrrrrrrrrrrrrrr r r"rrr@rPrSr6r rrhs}  ,,,,,,,,,,PPPPPPPPPPPPPPPPPPAAAAAA888888JJJJJJJJJJ******&&&&&&A========777777@@@@@@  8 $ $ :c:d::::) T3Y) )  )  )  ))))"yp'p'p'p'p'p'p'p'l--------00000000     $6   "     $6   "YYYYYYYY866666/666CCCCC0CCC NNNNN,NNNOOOOO!2OOO( ;;;;;;;;BBBBB8BBBEEEEEHEEE#####X###8""""","""(MMMMM$MMM     ,   .KKKKK'KKK&J&J&J&J&J"46G&J&J&JR,,,,,: