kgh0o dZddlZddlZddlZddlZddlZddlZddlZddlm Z m Z m Z ddl m Z mZmZmZmZmZmZddlmZddlmZddlmZmZmZddlmZdd lmZe r dd l m!Z!dd l"m#Z#m$Z$dd l%m&Z&dd l'm(Z(ddl)m*Z*ej+e,Z-de.de/fdZ0deee.fdede.de.def dZ1Gdde2Z3Gdde3Z4Gdde3Z5Gdde3Z6Gdde4Z7Gd d!e4Z8Gd"d#e3Z9Gd$d%e6Z:Gd&d'e6Z;Gd(d)e6Z<Gd*d+e6Z=Gd,d-e3Z>Gd.d/e3Z?Gd0d1e3Z@Gd2d3e3ZAGd4d5e3ZBGd6d7e6ZCGd8d9e6ZDGd:d;e6ZEGd<d=e6ZFGd>d?e6ZGGd@dAe4e6ZHGdBdCeHe6ZIGdDdEe6ZJGdFdGe6ZKGdHdIeKZLGdJdKeKZMGdLdMeKZNGdNdOeKZOGdPdQeKZPGdRdSe6ZQGdTdUe5ZRdVejSdWZTGdXdYe4ZUGdZd[e4ZVGd\d]e4ZWGd^d_e4ZXGd`dae4ZYGdbdce4ZZdS)dzExceptions 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)Link)InstallRequirementsreturnc0tjd|duS)Nz^[a-z]+(-[a-z]+)*$)rematch)rs x/builddir/build/BUILD/imunify360-venv-2.6.0/opt/imunify360/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 rcP|!t|ds Jd|j}t|s Jd||_||_||_||_||_||_||_t d|j j d|jddS)Nr:zerror reference not provided!z#error reference must be kebab-case!) hasattrr:r r<r?r@r=rAr>super__init__ __class__r3) selfr<r:r?r@rAr=r>rHs rrGzDiagnosticPipError.__init__Ms  4-- N N/N N N-Ii((OO*OOO( "  ""  IT^4IIIIIJJJJJr!c rd|jjd|jd|jd|jd|jd|jd S)NrCz (reference=z , message=z , context=z , note_stmt=z , hint_stmt=z)>)rHr3r:r?r@r=rArIs r__repr__zDiagnosticPipError.__repr__kss '    |  |           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<r: ascii_onlyr@r/r?r=rAr>)rIr"rMcolours r__rich_console__z#DiagnosticPipError.__rich_console__vs )w..HI&II IIdnIIIIII! #|')L.v.../v///  *L3v333/v/// *L( ,   |'l""" > %)CHHH > %%0     > %%-     9 HHH&49&& & & & & & ! r!)r3r4r5r6str__annotations__r r rrGrLrrrrU __classcell__rHs@rr9r9@sTNNN /6#'15"KKK,KC= K sDy! K %T *+ KE#t),-KE#t),-KsmK KKKKKK<  #     :':' :'  :':':':':':':':'r!r9ceZdZdZdS)ConfigurationErrorz"General exception in configurationNr2r7r!rr[r[s,,,,r!r[ceZdZdZdS)InstallationErrorz%General exception during installationNr2r7r!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=rArFrGrr)rIr`rHs rrGz&MissingPyProjectBuildRequires.__init__sd 8vg88TTHII      r!r3r4r5r6r:rVrGrXrYs@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)NrbzKThis package has an invalid `build-system.requires` key in pyproject.toml. rcrdrerf)rIr`rjrHs rrGz&InvalidPyProjectBuildRequires.__init__sp 8vg88-$*--THII      r!rgrYs@rriris]HH9I  3               r!ric2eZdZdZdddeddfdZdefdZdS) 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)rnro)rIrnros rrGzNoneMetadataError.__init__s *r!c&d|jd|jS)NzNone z" metadata found for distribution: )rornrKs r__str__zNoneMetadataError.__str__s Yt)XXTYXXXr!r3r4r5r6rVrGrrr7r!rrmrmsp +  + +  + + + +YYYYYYYr!rmceZdZdZdefdZdS)UserInstallationInvalidzBA --user install is requested on an environment without user site.rcdS)Nz$User base directory is not specifiedr7rKs rrrzUserInstallationInvalid.__str__s55r!N)r3r4r5r6rVrrr7r!rrurus5LL6666666r!ruceZdZdefdZdS)InvalidSchemeCombinationrcdd|jddD}d|d|jddS)Nz, c34K|]}t|VdSN)rV).0as r z3InvalidSchemeCombination.__str__..s(::a3q66::::::r!z Cannot set z and z together)r,args)rIbefores rrrz InvalidSchemeCombination.__str__sK::49SbS>:::::BVBB$)B-BBBBr!N)r3r4r5rVrrr7r!rrxrxs6CCCCCCCr!rxceZdZdZdS)DistributionNotFoundzCRaised when a distribution cannot be found to satisfy a requirementNr2r7r!rrr sMMMMr!rceZdZdZdS)RequirementsFileParseErrorzDRaised when a general error occurs parsing a requirements file line.Nr2r7r!rrr sNNNNr!rceZdZdZdS)BestVersionAlreadyInstalledzNRaised when the most up-to-date version of a package is already installed.Nr2r7r!rrrsr!rceZdZdZdS) BadCommandz0Raised when virtualenv or a command is not foundNr2r7r!rrrs::::r!rceZdZdZdS) CommandErrorz7Raised when there is an error in command-line argumentsNr2r7r!rrrsAAAAr!rceZdZdZdS)PreviousBuildDirErrorz:Raised when there's a previous conflicting build directoryNr2r7r!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)rrrrErFrG)rIrrrrHs rrGzNetworkConnectionError.__init__%sn!  " M %L &),, & =0DL Hg66666r!c*t|jSr{)rVrrKs rrrzNetworkConnectionError.__str__:s4>"""r!)NN) r3r4r5r6rVr rGrrrXrYs@rrr"s *.'+ 777:&7)$ 7  777777*#########r!rceZdZdZdS)InvalidWheelFilenamezInvalid wheel filename.Nr2r7r!rrr>s!!!!r!rceZdZdZdS)UnsupportedWheelzUnsupported wheel.Nr2r7r!rrrBsr!rc.eZdZdZdedefdZdefdZdS) InvalidWheelzInvalid (e.g. corrupt) wheel.locationnamec"||_||_dSr{)rr)rIrrs rrGzInvalidWheel.__init__Is   r!rc(d|jd|jdS)NzWheel 'z ' located at z is invalid.)rrrKs rrrzInvalidWheel.__str__MsLLLLLLLr!Nrsr7r!rrrFs^''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>||_||_||_||_dSr{rrrr)rIrrrrs rrGzMetadataInconsistent.__init__Ys$    r!cFd|jd|jd|jd|jS)N Requested z has inconsistent z : expected z, but metadata has rrKs rrrzMetadataInconsistent.__str__asO H H Hdj H H  H H9= H H r!rsr7r!rrrQsu(14=@IL        r!rc2eZdZdZdddeddfdZdefdZdS) MetadataInvalidzMetadata is invalid.rrr;rNc"||_||_dSr{rr;)rIrr;s rrGzMetadataInvalid.__init__ks  r!c&d|jd|jS)Nrz has invalid metadata: rrKs rrrzMetadataInvalid.__str__osJDIJJdjJJJr!rsr7r!rrrhsf1#$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][/] rRz[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@rAr=) r from_markuplenr,rFrGrrr)rIrrr output_promptrHs rrGz$InstallationSubprocessError.__init__xs   !899MM !S#l*;*;!S!S!STTrww|,,--."#>??@  *&!455**'**"$  $7 "r!c$|jd|jS)Nz exited with )rrrKs rrrz#InstallationSubprocessError.__str__s*IIIIIr!) r3r4r5r6r:rVintr r rGrrrXrYs@rrrss##.I#!# # tCy) #  ######@JJJJJJJJJr!rc8eZdZdZdeddffd ZdefdZxZS)MetadataGenerationFailedzmetadata-generation-failedpackage_detailsrNcztt|dt|dddS)Nz4Encountered error while generating package metadata.zSee above for details.rcr)rFrrGr)rIrrHs rrGz!MetadataGenerationFailed.__init__sK )40099J?++.S :     r!cdS)Nzmetadata generation failedr7rKs rrrz MetadataGenerationFailed.__str__s++r!)r3r4r5r:rVrGrrrXrYs@rrrsq,I            ,,,,,,,,,r!rc:eZdZdZd dZd dZdefdZdefd Z dS) HashErrorsz:Multiple HashError instances rolled into one for reportingrNcg|_dSr{)errorsrKs rrGzHashErrors.__init__s ') r!r; HashErrorc:|j|dSr{)rappend)rIr;s rrzHashErrors.appends 5!!!!!r!cg}|jdt|jdD]>\}}||j|d|D?|rd|SdS)Nc|jSr{)orderes rz$HashErrors.__str__..sqwr!)keyc|jSr{rYrs rrz$HashErrors.__str__..sr!c3>K|]}|VdSr{)body)r|rs rr~z%HashErrors.__str__..s*99a999999r!r(rR)rsortrrheadextendr,)rIlinescls errors_of_clss rrrzHashErrors.__str__s ..///")$+7L7L"M"M : : C LL " " " LL99=999 9 9 9 9  $99U## #rr!c*t|jSr{)boolrrKs r__bool__zHashErrors.__bool__sDK   r!rN)r;rrN) r3r4r5r6rGrrVrrrrr7r!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. NrreqrRrrrc0d|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_namerKs rrzHashError.bodys1d,,..000r!c>|jd|S)Nr()rrrKs rrrzHashError.__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)rrVrKs rrzHashError._requirement_names!%?s48}}}.??r!)r3r4r5r6rr rWrrrrVrrrrr7r!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:Nr3r4r5r6rrr7r!rrrs)11 E ; DDr!rceZdZdZdZdZdS)DirectoryUrlHashUnsupportedrzUCan't verify hashes for these file:// requirements because they point to directories:Nrr7r!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)rIrs rrGzHashMissing.__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)rIrr`s rrzHashMissing.bodys~<<<<<< 8  8%4&&TXud33 %++  ((-9I   r!) r3r4r5r6rrrVrGrr7r!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:Nrr7r!rrr4s) 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)rIrrs rrGzHashMismatch.__init__Qs  r!cZd|d|S)Nr: )r_hash_comparisonrKs rrzHashMismatch.body[s0Ld,,..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_orjs)fX&6&677 7r!c3BK|]}dtd|VdS)z Expected  N)next)r|rr#s rr~z0HashMismatch._hash_comparison..rs:UUa@d6ll@@Q@@UUUUUUr!z Got r()rVritemsrrr hexdigestr,)rIrrr 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!) r3r4r5r6rrrrVr rGrrr7r!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)r3r4r5r6r:r rVrG staticmethodrr' classmethodr pathlibPathr<rXrYs@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@rA) installerraw_nameversionrassemblerFrG)rIrCrIdephintrHs rrGzUninstallMissingRecord.__init__s *  I..!*DDl.BDDC=>ACAA7KDD D DDDD ;\;;<<I0<0EIII      r!rCrrNr3r4r5r:rGrXrYs@rrBrBsB*I          r!rBc$eZdZdZdfd ZxZS)LegacyDistutilsInstallz%uninstall-distutils-installed-packagerCrrNcpttd|dddS)NrGzIt is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.rH)rFrGr)rIrCrHs rrGzLegacyDistutilsInstall.__init__sL ;\;;<<      r!rOrPrYs@rrRrRsB7I           r!rRc@eZdZdZdddeeefddffd ZxZS)InvalidInstalledPackagezinvalid-installed-packagernr invalid_excrNc |j}t|trd}nd}tt d|d|rd|dndzd|d|jd zd |d d dS)N requirementrKz!Cannot process installed package rzin rRzbecause 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.rH)installed_locationr*r rFrGrr)rIrnrVrY invalid_typerHs rrGz InvalidInstalledPackage.__init__s "4 k#5 6 6 %(LL$L ;D;;;4FN0+0000BPU|UU @PQR@SUUV 9999E  r!) r3r4r5r:r r rrGrXrYs@rrUrUsk+I ! -~=>             r!rUc <eZdZdZdZdddedededd f fd ZxZS) IncompleteDownloadErrorzaRaised when the downloader receives fewer bytes than advertised in the Content-Length header.zincomplete-downloadr>rreceivedexpectedretriesrNcddlm}||d||}|r d|d}d}nd}d}td |d |d } t| d |j|d dS)Nr) format_size/zafter z attempts z7Use --resume-retries to configure resume attempt limit.rRz>Consider using --resume-retries to enable download resumption.zDownload failed z(because not enough bytes were received ()zURL: z4This is an issue with network connectivity, not pip.r)pip._internal.utils.miscrarrFrG redacted_url) rIr>r]r^r_radownload_status retry_statusrNr?rHs rrGz IncompleteDownloadError.__init__3s 988888([22LL[[5J5JLL  T7G777LLDDLSD 1| 1 1- 1 1 1   /D-//L      r!)r3r4r5r6r:rrGrXrYs@rr\r\-sv%%&I  &) 58 FI           r!r\c(eZdZdZdZdfd ZxZS)ResolutionTooDeepErrorzHRaised when the dependency resolver exceeds the maximum recursion depth.zresolution-too-deeprNcRtdddddS)Nz,Dependency resolution exceeded maximum depthzpPip cannot resolve the current dependencies as the dependency graph is too complex for pip to solve efficiently.zqTry adding lower bounds to constrain your dependencies, for example: 'package>=2.0.0' instead of just 'package'. z_https://pip.pypa.io/en/stable/topics/dependency-resolution/#handling-resolution-too-deep-errors)r?r@rAr>)rFrG)rIrHs rrGzResolutionTooDeepError.__init__RsB B?Ls  r!r)r3r4r5r6r:rGrXrYs@rririMsHRR%I           r!ri)[r6rr0rloggingr?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.models.linkrpip._internal.req.req_installr getLoggerr3r7rVrr r/ Exceptionr1r9r[r]r_rirmrurxrrrrrrrrrrrrrrrrrrrrrr rr#rrrBrRrUr\rir7r!rr{s  ,,,,,,,,,,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,,,,,: