7fc (dZddlZddlZddlZddlZddlZddlZddlZddlm Z m Z m Z ddl m Z mZmZmZmZmZmZddlmZmZmZddlmZddlmZe rddlmZdd lmZm Z dd l!m"Z"dd l#m$Z$ej%e&Z'd e(d e)fdZ*d eee(fdede(de(d ef dZ+Gdde,Z-Gdde-Z.Gdde-Z/Gdde-Z0Gdde.Z1Gdde.Z2Gdd e-Z3Gd!d"e0Z4Gd#d$e0Z5Gd%d&e0Z6Gd'd(e0Z7Gd)d*e-Z8Gd+d,e-Z9Gd-d.e-Z:Gd/d0e-Z;Gd1d2e-Z<Gd3d4e0Z=Gd5d6e0Z>Gd7d8e0Z?Gd9d:e0Z@Gd;de.e0ZBGd?d@eBe0ZCGdAdBe0ZDGdCdDe0ZEGdEdFeEZFGdGdHeEZGGdIdJeEZHGdKdLeEZIGdMdNeEZJGdOdPe0ZKGdQdRe/ZLdSejMdTZNGdUdVe.ZOGdWdXe.ZPGdYdZe.ZQdS)[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)ConsoleConsoleOptions RenderResult)escape)Text)_Hash)RequestResponse)BaseDistribution)InstallRequirementsreturnc0tjd|duS)Nz^[a-z]+(-[a-z]+)*$)rematch)rs x/builddir/build/BUILD/imunify360-venv-2.3.5/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)rrr r!texts r_prefix_with_indentr,(s!T%!!!$$   fx  8 87;M;MV ) hasattrr7rr9r<r=r:r>r;super__init__ __class__r0) selfr9r7r<r=r>r:r;rEs rrDzDiagnosticPipError.__init__Js  4-- N N/N N N-Ii((OO*OOO( "  ""  IT^4IIIIIJJJJJrc rd|jjd|jd|jd|jd|jd|jd S)Nr@z (reference=z , message=z , context=z , note_stmt=z , hint_stmt=z)>)rEr0r7r<r=r:r>rFs r__repr__zDiagnosticPipError.__repr__hss '    |  |           rroptionsc#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)Nr8redyellow[z bold]z [/]: [bold]z[/]u]×[/] u]│[/] )r r!u ]╰─>[/] z] [/] u [red]×[/] z z[magenta bold]note[/]: z z[cyan bold]hint[/]: zLink: ) r9r7 ascii_onlyr=r,r<r:r>r;)rFrrJcolours r__rich_console__z#DiagnosticPipError.__rich_console__ss )w..HI&II IIdnIIIIII! #|')L.v.../v///  *L3v333/v/// *L( ,   |'l""" > %)CHHH > %%0     > %%-     9 HHH&49&& & & & & & ! r)r0r1r2r3str__annotations__r r rrDrIr rrrR __classcell__rEs@rr6r6=sTNNN /6#'15"KKK,KC= K sDy! K %T *+ KE#t),-KE#t),-KsmK KKKKKK<  #     :':' :'  :':':':':':':':'rr6ceZdZdZdS)ConfigurationErrorz"General exception in configurationNr/r4rrrXrXs,,,,rrXceZdZdZdS)InstallationErrorz%General exception during installationNr/r4rrrZrZs////rrZc0eZdZdZdZdeddffd 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>rCrDrr)rFr]rEs rrDz&MissingPyProjectBuildRequires.__init__sd 8vg88TTHII      rr0r1r2r3r7rSrDrUrVs@rr\r\sVXX9I  3  4           rr\c4eZdZdZdZdededdffd ZxZS)InvalidPyProjectBuildRequiresz>Raised when pyproject.toml an invalid `build-system.requires`.z'invalid-pyproject-build-system-requiresr]reasonrNctdt|td|dtddS)Nr_zKThis package has an invalid `build-system.requires` key in pyproject.toml. r`rarbrc)rFr]rgrEs rrDz&InvalidPyProjectBuildRequires.__init__sp 8vg88-$*--THII      rrdrVs@rrfrfs]HH9I  3               rrfc2eZdZdZdddeddfdZdefdZdS) 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)rkrl)rFrkrls rrDzNoneMetadataError.__init__s *rc&d|jd|jS)NzNone z" metadata found for distribution: )rlrkrHs r__str__zNoneMetadataError.__str__s Yt)XXTYXXXrr0r1r2r3rSrDror4rrrjrjsp +  + +  + + + +YYYYYYYrrjceZdZdZdefdZdS)UserInstallationInvalidzBA --user install is requested on an environment without user site.rcdS)Nz$User base directory is not specifiedr4rHs rrozUserInstallationInvalid.__str__s55rN)r0r1r2r3rSror4rrrrrrs5LL6666666rrrceZdZdefdZdS)InvalidSchemeCombinationrcdd|jddD}d|d|jddS)Nz, c34K|]}t|VdSN)rS).0as r z3InvalidSchemeCombination.__str__..s(::a3q66::::::rz Cannot set z and z together)r)args)rFbefores rroz InvalidSchemeCombination.__str__sK::49SbS>:::::BVBB$)B-BBBBrN)r0r1r2rSror4rrrurus6CCCCCCCrruceZdZdZdS)DistributionNotFoundzCRaised when a distribution cannot be found to satisfy a requirementNr/r4rrrrsMMMMrrceZdZdZdS)RequirementsFileParseErrorzDRaised when a general error occurs parsing a requirements file line.Nr/r4rrrr sNNNNrrceZdZdZdS)BestVersionAlreadyInstalledzNRaised when the most up-to-date version of a package is already installed.Nr/r4rrrrsrrceZdZdZdS) BadCommandz0Raised when virtualenv or a command is not foundNr/r4rrrrs::::rrceZdZdZdS) CommandErrorz7Raised when there is an error in command-line argumentsNr/r4rrrrsAAAArrceZdZdZdS)PreviousBuildDirErrorz:Raised when there's a previous conflicting build directoryNr/r4rrrrsDDDDrrc ^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)rrrrBrCrD)rFrrrrEs rrDzNetworkConnectionError.__init__"sn!  " M %L &),, & =0DL Hg66666rc*t|jSrx)rSrrHs rrozNetworkConnectionError.__str__7s4>"""r)NN) r0r1r2r3rSr rDrorUrVs@rrrs *.'+ 777:&7)$ 7  777777*#########rrceZdZdZdS)InvalidWheelFilenamezInvalid wheel filename.Nr/r4rrrr;s!!!!rrceZdZdZdS)UnsupportedWheelzUnsupported wheel.Nr/r4rrrr?srrc.eZdZdZdedefdZdefdZdS) InvalidWheelzInvalid (e.g. corrupt) wheel.locationnamec"||_||_dSrx)rr)rFrrs rrDzInvalidWheel.__init__Fs   rrc(d|jd|jdS)NzWheel 'z ' located at z is invalid.)rrrHs rrozInvalidWheel.__str__JsLLLLLLLrNrpr4rrrrCs^''CMMMMMMMrrc :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>||_||_||_||_dSrxrrrr)rFrrrrs rrDzMetadataInconsistent.__init__Vs$    rcFd|jd|jd|jd|jS)N Requested z has inconsistent z : expected z, but metadata has rrHs rrozMetadataInconsistent.__str__^sO H H Hdj H H  H H9= H H rrpr4rrrrNsu(14=@IL        rrc2eZdZdZdddeddfdZdefdZdS) MetadataInvalidzMetadata is invalid.rrr8rNc"||_||_dSrxrr8)rFrr8s rrDzMetadataInvalid.__init__hs  rc&d|jd|jS)Nrz has invalid metadata: rrHs rrozMetadataInvalid.__str__lsJDIJJdjJJJrrpr4rrrresf1#$KKKKKKKrrc\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][/] rOz[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)rCrDrrr)rFrrr output_promptrEs rrDz$InstallationSubprocessError.__init__us   !899MM !S#l*;*;!S!S!STTrww|,,--."#>??@  *&!455**'**"$  $7 "rc$|jd|jS)Nz exited with )rrrHs rroz#InstallationSubprocessError.__str__s*IIIIIr) r0r1r2r3r7rSintr r rDrorUrVs@rrrps##.I#!# # tCy) #  ######@JJJJJJJJJrrc8eZdZdZdeddffd ZdefdZxZS)MetadataGenerationFailedzmetadata-generation-failedpackage_detailsrNcztt|dt|dddS)Nz4Encountered error while generating package metadata.zSee above for details.r`r)rCrrDr)rFrrEs rrDz!MetadataGenerationFailed.__init__sK )40099J?++.S :     rcdS)Nzmetadata generation failedr4rHs rroz MetadataGenerationFailed.__str__s++r)r0r1r2r7rSrDrorUrVs@rrrsq,I            ,,,,,,,,,rrc:eZdZdZd dZd dZdefdZdefd Z dS) HashErrorsz:Multiple HashError instances rolled into one for reportingrNcg|_dSrx)errorsrHs rrDzHashErrors.__init__s )+ rr8 HashErrorc:|j|dSrx)rappend)rFr8s rrzHashErrors.appends 5!!!!!rcg}|jdt|jdD]>\}}||j|d|D?|rd|SdS)Nc|jSrx)orderes rz$HashErrors.__str__..sqwr)keyc|jSrxrVrs rrz$HashErrors.__str__..src3>K|]}|VdSrx)body)ryrs rr{z%HashErrors.__str__..s*99a999999rr%rO)rsortrrheadextendr))rFlinescls errors_of_clss rrozHashErrors.__str__s ..///")$+7L7L"M"M : : C LL " " " LL99=999 9 9 9 9  $99U## #rrc*t|jSrx)boolrrHs r__bool__zHashErrors.__bool__sDK   r)rN)r8rrN) r0r1r2r3rDrrSrorrr4rrrrsxDD,,,,""""!$!!!!!!rrcdeZdZUdZdZeded<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. NrreqrOr|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_namerHs rrzHashError.bodys1d,,..000rc>|jd|S)Nr%)rrrHs rrozHashError.__str__s ),,tyy{{,,,rc<|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)rrSrHs rrzHashError._requirement_names!%?s48}}}.??r)r0r1r2r3rr rTrrrrSrrorr4rrrrs +/C& '... DE3OOO 1c 1 1 1 1-----@3@@@@@@rrceZdZdZdZdZdS)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:Nr0r1r2r3rrr4rrrrs)11 E ; DDrrceZdZdZdZdZdS)DirectoryUrlHashUnsupportedrzUCan't verify hashes for these file:// requirements because they point to directories:Nrr4rrrrs)11 E  DDrrc6eZdZdZdZdZdeddfdZdefdZdS) 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)rFrs rrDzHashMissing.__init__s 'rcddlm}d}|jr.|jjr |jjnt |jdd}d|pd||jS)Nr) FAVORITE_HASHrz {} --hash={}:{}r)pip._internal.utils.hashesrr is_direct original_linkgetattrformatr)rFrr]s rrzHashMissing.bodys~<<<<<< 8  8%4&&TXud33 %++  ((-9I   r) r0r1r2r3rrrSrDrr4rrrrsf<< E  'C'D'''' c      rrceZdZdZdZdZdS) 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:Nrr4rrrr1s) E 1 DDrrcreZdZdZdZdZdeeeefdeedfddfd 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)rFrrs rrDzHashMismatch.__init__Ns  rcZd|d|S)Nrz: )r_hash_comparisonrHs rrzHashMismatch.bodyXs0Ld,,..LL43H3H3J3JLLLrcNdtddfd}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_orgs)fX&6&677 7rc3BK|]}dtd|VdS)z Expected  N)next)ryrr s rr{z0HashMismatch._hash_comparison..os:UUa@d6ll@@Q@@UUUUUUrz Got r%)rSritemsrrr hexdigestr))rFrrr 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) r0r1r2r3rrrrSr rDrrr4rrrr<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)r0r1r2r3r7r rSrD staticmethodrr" classmethodr pathlibPathr7rUrVs@rrrs1I hsm       "#\*glC'( ([rrc$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_nameversionrassemblerCrD)rFr>rDdephintrEs rrDzUninstallMissingRecord.__init__s *  I..!*DDl.BDDC=>ACAA7KDD D DDDD ;\;;<<I0<0EIII      rr>rrNr0r1r2r7rDrUrVs@rr=r=sB*I          rr=c$eZdZdZdfd ZxZS)LegacyDistutilsInstallz%uninstall-distutils-installed-packager>rrNcpttd|dddS)NrBzIt is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.rC)rCrDr)rFr>rEs rrDzLegacyDistutilsInstall.__init__sL ;\;;<<      rrJrKrVs@rrMrMsB7I           rrM)Rr3rr+rloggingr:rsys itertoolsrrrtypingrrrr r r r pip._vendor.rich.consoler rrpip._vendor.rich.markuprpip._vendor.rich.textrhashlibrpip._vendor.requests.modelsrrpip._internal.metadatarpip._internal.req.req_installr getLoggerr0r2rSrrr, Exceptionr.r6rXrZr\rfrjrrrurrrrrrrrrrrrrrrrrrrrrrr r rrr=rMr4rrr\s.  ,,,,,,,,,,PPPPPPPPPPPPPPPPPPJJJJJJJJJJ******&&&&&&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,,,,,: