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zip_longest)Path) FunctionType TracebackType)AnyBinaryIOCallableDict GeneratorIterableIteratorListOptionalTextIOTupleTypeTypeVarUnioncast) Requirement)BuildBackendHookCaller) __version__) CommandErrorExternallyManagedEnvironment)get_major_minor_version)WINDOWS)retry)running_under_virtualenv)rmtree display_path backup_dirasksplitext format_sizeis_installable_dirnormalize_pathrenamesget_prog ensure_dirremove_auth_from_urlcheck_externally_managed ConfiguredBuildBackendHookCallerTreturnctjtjtdd}tj|}dt d|dtdS)Nz..zpip z from z (python ))ospathjoindirname__file__abspathrr ) pip_pkg_dirs x/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/utils/misc.pyget_pip_versionr?Ksb',,rwx88$EEK'//+..K W+ W W[ W W;R;T;T W W WWpy_version_info.ct|dkr|dt|z dzz }nt|dkr |dd}td|S)ax Convert a tuple of ints representing a Python version to one of length three. :param py_version_info: a tuple of ints representing a Python version, or None to specify no version. The tuple can have any length. :return: a tuple of length three if `py_version_info` is non-None. Otherwise, return `py_version_info` unchanged (i.e. None). )rN VersionInfo)lenr)rAs r>normalize_version_inforFRsf ?aAO 4 44<< _   ! !)"1"-   / //r@r8c tj|dS#t$r<}|jtjkr|jtjkrYd}~dSYd}~dSd}~wwxYw)z os.path.makedirs without EEXIST.N)r7makedirsOSErrorerrnoEEXIST ENOTEMPTY)r8es r>r.r.es D  7el " "qw%/'A'A  # " " " " "'A'A'A'A'A'As A+AAc tjtjd}|dvrtjdS|S#t ttf$rYnwxYwdS)Nr)z __main__.pyz-cz -m pippip) r7r8basenamesysargv executableAttributeError TypeError IndexError)progs r>r-r-osp w ,, ( ( (n--- -K Iz 2     5sAAAA A rCg?)stop_after_delaywaitFdir ignore_errorsonexcc|rt}|t}tttt t ft|}tj dkrtj ||dStj ||dS)Nr\)rC )onerror) _onerror_ignore_onerror_reraiserrrOnExcOnErrrmtree_errorhandlerrQ version_infoshutilr$)rZr[r\handlers r>r$r$|s  }  U5%< "566 G  7"" c)))))) c7++++++r@_argscdSNris r>rarasDr@crkrlrms r>rbrbs r@r^funcexc_infocn tj|j}n#t$rYdSwxYw|tjzsQ tj||tjz ||dS#t$rYnwxYw#t$rYnwxYwt |ts|\}}}||||dS)a1 `rmtree` error handler to 'force' a file remove (i.e. like `rm -f`). * If a file is readonly then it's write flag is set and operation is retried. * `onerror` is the original callback from `rmtree(... onerror=onerror)` that is chained at the end if the "rm -f" still fails. N)r7statst_moderIS_IWRITEchmod isinstance BaseException)ror8rpr\rs_s r>reres '$--'  T] "   HT7T]2 3 3 3  T         D  h . ."!8Q E$hs/ **"A= A-- A:9A:= B  B cDtjtj|}|tjtjjzr+d|ttjdz}|S)zTGives the display value for a given path, making it relative to cwd if possible..N)r7r8normcaser< startswithgetcwdseprEr8s r>r%r%sr 7  BGOOD11 2 2D ry{{RW[011.T#bikk**,,-- Kr@.bakextcd}|}tj||zr9|dz }|t|z}tj||z9||zS)z\Figure out the name of a directory to back up the given dir to (adding .bak, .bak2, etc))r7r8existsstr)rZrn extensions r>r&r&sh AI '..y ) )! Q#a&&L  '..y ) )! ?r@messageoptionsctjddD] }||vr|cS t ||S)NPIP_EXISTS_ACTION)r7environgetsplitr')rractions r>ask_path_existsrsW*..!4b99??AA W  MMM  w  r@chtjdrtd|dS)z&Raise an error if no input is allowed. PIP_NO_INPUTz5No input was expected ($PIP_NO_INPUT set); question: N)r7rr Exceptionrs r>_check_no_inputrs? z~~n%%  MG M M     r@c t|t|}|}||vr7t d|d|n|S)z@Ask the message interactively, with the given possible responsesrz>Your response ({!r}) was not one of the expected responses: {}z, )rinputstriplowerprintformatr9)rrresponses r>r'r's    >>>>##))++ 7 " " VHdii&8&899     O r@c>t|t|S)zAsk for input interactively.)rrrs r> ask_inputrsG >>r@cHt|tj|S)z!Ask for a password interactively.)rgetpassrs r> ask_passwordrs G ?7 # ##r@valcf|}|dvrdS|dvrdStd|)zConvert a string representation of truth to true (1) or false (0). True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values are 'n', 'no', 'f', 'false', 'off', and '0'. Raises ValueError if 'val' is anything else. )yyesttrueon1r)rnoffalseoff0rzinvalid truth value )r ValueError)rs r> strtoboolrsJ ))++C 222q 5 5 5q777888r@bytesc|dkr |dz dz ddS|dkrt|dz dS|dkr |dz ddSt|dS) Ni@Bg@@iz.1fz MBi'z kBz bytes)int)rs r>r)r)s {&.4'00000   edl##(((( &.)))))e**$$$$r@rowscld|D}dt|ddiDfd|D}|fS)zReturn a list of formatted rows and a list of column sizes. For example:: >>> tabulate([['foobar', 2000], [0xdeadbeef]]) (['foobar 2000', '3735928559'], [10, 4]) cRg|]$}ttt|%Srl)tuplemapr).0rows r> ztabulate..#s( 1 1 1SE#c3-- 1 1 1r@cRg|]$}ttt|%Srl)maxrrE)rcols r>rztabulate..$s( L L LCSS#   L L Lr@ fillvaluerc g|]B}dttj|CS) )r9rrljustrstrip)rrsizess r>rztabulate..%s? K K KsSXXc#)S%00 1 1 8 8 : : K K Kr@)r)rtablers @r>tabulaters[ 2 1D 1 1 1D L L;+K+K+K L L LE K K K Kd K K KE %<r@cDtj|sdStjtj|drdStjtj|drdSdS)atIs path is a directory containing pyproject.toml or setup.py? If pyproject.toml exists, this is a PEP 517 project. Otherwise we look for a legacy setuptools layout by identifying setup.py. We don't check for the setup.cfg because using it without setup.py is only available for PEP 517 projects, which are already covered by the pyproject.toml check. Fzpyproject.tomlTzsetup.py)r7r8isdirisfiler9rs r>r*r*)s{ 7==  u w~~bgll4)9::;;t w~~bgll44455t 5r@filesizec#DK ||}|sdS|V)z7Yield pieces of data from a file-like object until EOF.TN)read)rrchunks r> read_chunksr:s5 $  E r@Tresolve_symlinksctj|}|r tj|}ntj|}tj|S)zN Convert a path to its canonical, case-normalized, absolute version. )r7r8 expanduserrealpathr<r{)r8rs r>r+r+Esa 7  d # #D%w%%wt$$ 7  D ! !!r@ctj|\}}|dr|dd|z}|dd}||fS)z,Like os.path.splitext, but take off .tar tooz.tarN) posixpathr(rendswith)r8basers r>r(r(Rs\"4((ID# zz||V$$233i#oCRCy 9r@oldnewctj|\}}|r5|r3tj|stj|t j||tj|\}}|r*|r* tj|dS#t$rYdSwxYwdSdS)z7Like os.renames(), but handles renaming across devices.N) r7r8rrrHrgmove removedirsrI)rrheadtails r>r,r,[ss##JD$ RW^^D11 D KSs##JD$   M$         DD sB,, B:9B:cztsdS|ttjS)z Return True if path is within sys.prefix, if we're running in a virtualenv. If we're not in a virtualenv, all paths are considered "local." Caution: this function assumes the head of path has been normalized with normalize_path. T)r#r|r+rQprefixrs r>is_localrls3 $ % %t ??>#*55 6 66r@msgargsc*tj|g|RdSrk)loggerinfo)rrs r> write_outputrzs  Kdr@cVeZdZUeed<ededdfdZedefdZ dS) StreamWrapper orig_streamr4c(|}||_|Srk)r)clsrrets r> from_streamzStreamWrapper.from_streamscee% r@c|jjSrk)rencodingselfs r>rzStreamWrapper.encodings((r@N) __name__ __module__ __qualname__r__annotations__ classmethodrpropertyrrrlr@r>rr~suf[)#)))X)))r@r sequentialnamedc tt|tt|fi|}d|D}||d<t dd|S)Nci|]\}}|| Srlrl)rkeyvalues r> zenum..s:::jc5uc:::r@reverse_mappingEnumrl)dictziprangerEitemstype)rrenumsreverses r>enumr sg Zs:!7!788 B BE B BE::EKKMM:::G&E  E " ""r@hostportc,||Sd|vrd|d}|d|S)z. Build a netloc from a host-port pair N:[]rl)r r s r> build_netlocrs8 |  d{{4{{{  T  r@httpsnetlocschemec^|ddkrd|vr d|vrd|d}|d|S)z) Build a full URL from a netloc. r@rrz://)count)rrs r>build_url_from_netlocrsP||CA#V"3"368I8IV ! ! ! !!r@czt|}tj|}|j|jfS)z2 Return the host-port pair from a netloc. )rurllibparseurlparsehostnamer )rurlparseds r> parse_netlocr"s5  ' 'C \ " "3 ' 'F ?FK ''r@cd|vr|dfS|dd\}}d}d|vr|dd\}}n|d}}tj|}|tj|}|||ffS)zp Parse out and remove the auth information from a netloc. Returns: (netloc, (username, password)). rNNrNr)rsplitrrrunquote)rauthpwusers r>split_auth_from_netlocr*s  &|## ==a((LD&B d{{::c1%%bbb <   % %D ~ \ ! !" % % D": r@ct|\}\}}||S|d}d}n!tj|}d}||d|S)z Replace the sensitive data in a netloc with "****", if it exists. For example: - "user:pass@example.com" returns "user:****@example.com" - "accesstoken@example.com" returns "****@example.com" N****rz:****r)r*rrquote)rr)passwords r> redact_netlocr/sj 6f==F T8 | |!!$'' 'H ' 'v ' ''r@r transform_netlocctj|}||j}|j|d|j|j|jf}tj|}|td|fS)aRTransform and replace netloc in a url. transform_netloc is a function taking the netloc and returning a tuple. The first element of this tuple is the new netloc. The entire tuple is returned. Returns a tuple containing the transformed url as item 0 and the original tuple returned by transform_netloc as item 1. r NetlocTuple) rrurlsplitrrr8queryfragment urlunsplitr)r r0purl netloc_tuple url_piecessurls r>_transform_urlr;sq <  % %D##DK00L+|A 4:t}UJ < " ": . .D m\22 22r@c t|Srk)r*rs r> _get_netlocr>s !& ) ))r@c"t|fSrk)r/r=s r>_redact_netlocr@s & ! ! ##r@cBt|t\}\}}|||fS)z Parse a url into separate netloc, auth, and url with no auth. Returns: (url_without_auth, netloc, (username, password)) r;r>)r url_without_authrr's r>split_auth_netloc_from_urlrDs*(6c;'G'G$nvt VT ))r@c8t|tdS)z7Return a copy of url with 'username:password@' removed.rrBr s r>r/r/s #{ + +A ..r@c8t|tdS)z.Replace the password in a given url with ****.r)r;r@rFs r>redact_auth_from_urlrHs #~ . .q 11r@reqc|jst|St||jt|jS)z:Replace the password in a given requirement url with ****.)r rreplacerH)rIs r>redact_auth_from_requirementrLs@ 73xx s88  CG%9#'%B%B C CCr@)frozencLeZdZUeed<eed<defdZdefdZdedefdZ dS) HiddenTextsecretredactedr4c(dt|dS)Nz )rrs r>__repr__zHiddenText.__repr__&s,c$ii,,,,r@c|jSrkrQrs r>__str__zHiddenText.__str__)s }r@othercft|t|krdS|j|jkS)NF)rrP)rrXs r>__eq__zHiddenText.__eq__-s/ ::e $ $5{el**r@N) rrrrrrTrWr boolrZrlr@r>rOrO!s KKKMMM-#----+C+D++++++r@rOrc$t|dS)Nr,rV)rO)rs r> hide_valuer]6s ef - - --r@cBt|}t||S)NrV)rHrO)r rQs r>hide_urlr_:s"#C((H cH - - --r@ modifying_pipcddtjjdtjjdtjjg}|o7to0t jtjd|v}|rYtj ddgtjddz}td d |dS) zProtection of pip.exe from modification on Windows On Windows, any operation modifying pip should be run as: python -m pip ... rOrzrz-mrNz3To modify pip, please run the following command: {}r) rQrfmajorminorr!r7r8rPrRrSrrr9)r` pip_namesshould_show_use_python_msg new_commands r>(protect_pip_from_modification_on_windowsrg?s &c$&&?c$??s'7'=??I P'Pbg&6&6sx{&C&Cy&P" ~tU3chqrrlB  B I I%%       r@ctrdStjt jdd}tj|sdStj|)zCheck whether the current environment is externally managed. If the ``EXTERNALLY-MANAGED`` config file is found, the current environment is considered externally managed, and an ExternallyManagedEnvironment is raised. NstdlibzEXTERNALLY-MANAGED) r#r7r8r9 sysconfigget_pathrr from_config)markers r>r0r0Ysd !! W\\),X668L M MF 7>>& ! ! & 26 : ::r@cZtjduotjS)zIs this console interactive?N)rQstdinisattyrlr@r>is_console_interactiverqhs" 9D 7SY%5%5%7%77r@ blocksizectj}d}t|d5}t||D])}|t |z }||* dddn #1swxYwY||fS)z5Return (hash, length) for path using hashlib.sha256()rrb)rN)hashlibsha256openrrEupdate)r8rrhlengthrblocks r> hash_filer|ms A F dD  Q 333  E c%jj F HHUOOOO  f9s (s0, s1), (s2, s3), (s4, s5), ... )iterr)r}s r>pairwiserysH~~H x * **r@predcft|\}}t||t||fS)z Use a predicate to partition entries into false entries and true entries, like partition(is_odd, range(10)) --> 0 2 4 6 8 and 1 3 5 7 9 )rrfilter)rr}t1t2s r> partitionrs2]]FB tR &r"2"2 22r@cXeZdZ ddedededeedeeddeef fd Z dd ed eeee ee effd eed effd Z dded eeee ee effd effd Z dd ed eeee ee effd eed effd Z dd eeee ee effd e effd Z dd eeee ee effd e effd Z dd eeee ee effd e effd Z dd ed eeee ee effded effd Z dd ed eeee ee effded effd ZxZS)r1N config_holder source_dir build_backend backend_pathrunner).Npython_executablec`t|||||||_dSrk)super__init__r)rrrrrrr __class__s r>rz)ConfiguredBuildBackendHookCaller.__init__s=   |V=N   +r@wheel_directoryconfig_settingsmetadata_directoryr4cd|jj}t|||SN)rr)rrr build_wheelrrrrcsrs r>rz,ConfiguredBuildBackendHookCaller.build_wheels9   /ww"" RDV#   r@sdist_directorycb|jj}t||SN)r)rrr build_sdist)rrrrrs r>rz,ConfiguredBuildBackendHookCaller.build_sdists-   /ww""?B"GGGr@cd|jj}t|||Sr)rrrbuild_editablers r>rz/ConfiguredBuildBackendHookCaller.build_editables9   /ww%% RDV&   r@c`|jj}t|Sr)rrrget_requires_for_build_wheelrrrrs r>rz=ConfiguredBuildBackendHookCaller.get_requires_for_build_wheel+  /ww33B3GGGr@c`|jj}t|Sr)rrrget_requires_for_build_sdistrs r>rz=ConfiguredBuildBackendHookCaller.get_requires_for_build_sdistrr@c`|jj}t|Sr)rrrget_requires_for_build_editablers r>rz@ConfiguredBuildBackendHookCaller.get_requires_for_build_editables+  /ww66r6JJJr@T_allow_fallbackcd|jj}t|||SN)rrr)rrr prepare_metadata_for_build_wheelrrrrrrs r>rzAConfiguredBuildBackendHookCaller.prepare_metadata_for_build_wheels:   /ww771+8   r@cd|jj}t|||Sr)rrr#prepare_metadata_for_build_editablers r>rzDConfiguredBuildBackendHookCaller.prepare_metadata_for_build_editables:   /ww::1+;   r@)NNNr$rk)NT)rrrr rrrrrrrrrrrrrr[rr __classcell__)rs@r>r1r1s '+04+/ + + + + + sm + ),- +$C= + + + + + +"GK,0     "$sE#tCy.,A'A"BC  %SM        GKHHH"$sE#tCy.,A'A"BCH HHHHHHGK,0     "$sE#tCy.,A'A"BC  %SM        MQHH'S%T#Y2G-G(HIH cHHHHHHMQHH'S%T#Y2G-G(HIH cHHHHHHMQKK'S%T#Y2G-G(HIK cKKKKKKGK $     "$sE#tCy.,A'A"BC          GK $     "$sE#tCy.,A'A"BC              r@r1ctrdSttdsdStjdkstjdkrdStjdkrdSt ddS)zOutput a warning for sudo users on Unix. In a virtual environment, sudo pip still writes to virtualenv. On Windows, users may run pip as Administrator without issues. This warning only applies to Unix root users outside of virtualenv. Ngetuidwin32cygwinraaRunning pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.)r#hasattrr7rQplatformrrwarningrlr@r>warn_if_run_as_rootrs !! 2x   |w#,(":": y{{a NN )r@)FN)r)T)r)r4N)r3)rJrruloggingr7rrgrrrQrj urllib.parser dataclassesr functoolsrior itertoolsrrrpathlibr typesr r typingr r rrrrrrrrrrrrr"pip._vendor.packaging.requirementsrpip._vendor.pyproject_hooksrrOrpip._internal.exceptionsrrpip._internal.locationsr pip._internal.utils.compatr!pip._internal.utils.retryr"pip._internal.utils.virtualenvr#__all__ getLoggerrrr2rwExcInforrDrr2rcrdFILE_CHUNK_SIZEr?rFr.r-r[r$rarbrer%r&rrr'rrrfloatr)rr*rrr+r(r,rrrr rrr"r*r/r;r>r@rDr/rHrLrOr]r_rgr0rqr|rrr1rrlr@r>rst    !!!!!!3333333333--------$;:::::>>>>>>OOOOOOOO;;;;;;......++++++CCCCCC   "  8 $ $ GCLL ]#]MA BCcM" Cx}hsm;<<= ,m4c9:,g.34XXXXX0E#s(O0c3PSm@T0000&ST #    $$$DH,, ,!,2:5/, ,,,%$,( C D     S T    $ & & & & & G]*+&  &  & & & & RssCcs!S!8C=!S!!!! S T      x}     ss $#$#$$$$ 93 93 9 9 9 9 %u%%%%% 8HSM* uT#YS 5I/J    ST$!0 udD ! " " " " " " " "35c?34" 73 74 7 7 7 7c#$ ) ) ) ) )H ) ) )"#c#C#DI#### s (3- C    ""#"s"""""((x}hsm'C!D((((3;:(#(#(((((3 3 (#c3h)? @3 3 3333(** ****$3$5:$$$$ *  * 3U8C=(3-78 89 * * * */c/c////2c2c2222 DkDcDDDD $++++++++(.c.j.....#.*....  D T    4 ; ; ; ;88888  C C eCHo    +x}+%S/)B++++ 3 A39  3)1! 3 8A; #$ 3 3 3 3W W W W W '=W W W tr@