ó ïRec @s>dZddlZddlZddlZddlmZddlmZddddd d d d d g Zedg7Zej d d+kr—ej Z nej de fid,d6ƒZ d„Zd„Zde fd„ƒYZd e fd„ƒYZdefd„ƒYZd„Zde fd„ƒYZde fd„ƒYZd efd„ƒYZd efd„ƒYZd e fd „ƒYZej d!dkZer¯d"„Zd#„Znd$„Zd%„Zydd&lmZWnek rîeZ n Xd'„Z d e fd(„ƒYZ!de!fd)„ƒYZ"defd*„ƒYZ#dS(-sAcontextlib2 - backports and enhancements to the contextlib moduleiÿÿÿÿN(tdeque(twrapstcontextmanagertclosingt nullcontexttAbstractContextManagertContextDecoratort ExitStacktredirect_stdouttredirect_stderrtsuppresst ContextStackiiitABCt __slots__cCsB||krdS|j|ƒx|jD]}t||ƒq'W|S(N(tappendt __bases__t _classic_mro(tCtresulttB((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyRs   cGsŠy |j}Wn&tk r5tt|gƒƒ}nXxM|D]E}x<|D]0}||jkrJ|j|dkrvtSPqJqJWtSq=WtS(N(t__mro__tAttributeErrorttupleRt__dict__tNonetNotImplementedtTrue(RtmethodstmrotmethodR((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyt_check_methods$s    cBs8eZdZd„Zejd„ƒZed„ƒZRS(s,An abstract base class for context managers.cCs|S(s0Return `self` upon entering the runtime context.((tself((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyt __enter__8scCsdS(s9Raise any exception triggered within the runtime context.N(R(Rtexc_typet exc_valuet traceback((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyt__exit__<scCs |tkrt|ddƒStS(s<Check whether subclass is considered a subclass of this ABC.R R$(RRR(tclsR((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyt__subclasshook__As ( t__name__t __module__t__doc__R tabctabstractmethodR$t classmethodR&(((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR5s cBs)eZdZd„Zd„Zd„ZRS(sJA base class or mixin that enables context managers to work as decorators.cCstjdtƒ|jƒS(sÁReturns the context manager used to actually wrap the call to the decorated function. The default implementation just returns *self*. Overriding this method allows otherwise one-shot context managers like _GeneratorContextManager to support use as decorators via implicit recreation. DEPRECATED: refresh_cm was never added to the standard library's ContextDecorator API s2refresh_cm was never added to the standard library(twarningstwarntDeprecationWarningt _recreate_cm(R((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyt refresh_cmLs cCs|S(s6Return a recreated instance of self. Allows an otherwise one-shot context manager like _GeneratorContextManager to support use as a decorator via implicit recreation. This is a private interface just for _GeneratorContextManager. See issue #11647 for details. ((R((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR0]s cs"tˆƒ‡‡fd†ƒ}|S(Ncs$ˆjƒˆ||ŽSWdQXdS(N(R0(targstkwds(tfuncR(s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pytinnerjs (R(RR4R5((R4Rs†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyt__call__is(R'R(R)R1R0R6(((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyRIs  t_GeneratorContextManagercBs2eZdZd„Zd„Zd„Zd„ZRS(s%Helper for @contextmanager decorator.cCsl|||Ž|_||||_|_|_t|ddƒ}|dkr_t|ƒj}n||_dS(NR)(tgenR4R2R3tgetattrRttypeR)(RR4R2R3tdoc((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyt__init__ts  cCs|j|j|j|jƒS(N(t __class__R4R2R3(R((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR0‚scCs5yt|jƒSWntk r0tdƒ‚nXdS(Nsgenerator didn't yield(tnextR8t StopIterationt RuntimeError(R((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR ˆs cCs|dkrAyt|jƒWntk r1dSXtdƒ‚n»|dkrY|ƒ}ny&|jj|||ƒtdƒ‚Wnztk r›}||k Stk rÙ}||krºtStrÓ|j|krÓtS‚n#t j ƒd|k rü‚qünXdS(Nsgenerator didn't stops#generator didn't stop after throw()i( RR>R8R?R@tthrowtFalset_HAVE_EXCEPTION_CHAININGt __cause__tsystexc_info(RR:tvalueR#texc((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR$Žs,      (R'R(R)R<R0R R$(((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR7qs    cstˆƒ‡fd†ƒ}|S(sÜ@contextmanager decorator. Typical usage: @contextmanager def some_generator(): try: yield finally: This makes this: with some_generator() as : equivalent to this: try: = finally: cstˆ||ƒS(N(R7(R2R3(R4(s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pythelperÕs(R(R4RI((R4s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR¹scBs)eZdZd„Zd„Zd„ZRS(s2Context to automatically close something at the end of a block. Code like this: with closing(.open()) as f: is equivalent to this: f = .open() try: finally: f.close() cCs ||_dS(N(tthing(RRJ((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR<ìscCs|jS(N(RJ(R((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR ïscGs|jjƒdS(N(RJtclose(RRF((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR$òs(R'R(R)R<R R$(((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyRÛs  t_RedirectStreamcBs)eZdZd„Zd„Zd„ZRS(cCs||_g|_dS(N(t _new_targett _old_targets(Rt new_target((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR<ús cCs9|jjtt|jƒƒtt|j|jƒ|jS(N(RNRR9REt_streamtsetattrRM(R((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR ÿscCs tt|j|jjƒƒdS(N(RQRERPRNtpop(Rtexctypetexcinsttexctb((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR$sN(R'R(RRPR<R R$(((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyRLös  cBseZdZdZRS(sAContext manager for temporarily redirecting stdout to another file. # How to send help() to stderr with redirect_stdout(sys.stderr): help(dir) # How to write help() to a file with open('help.txt', 'w') as f: with redirect_stdout(f): help(pow) tstdout(R'R(R)RP(((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyRs cBseZdZdZRS(sCContext manager for temporarily redirecting stderr to another file.tstderr(R'R(R)RP(((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR scBs)eZdZd„Zd„Zd„ZRS(s?Context manager to suppress specified exceptions After the exception is suppressed, execution proceeds with the next statement following the with statement. with suppress(FileNotFoundError): os.remove(somefile) # Execution still resumes here if the file was already removed cGs ||_dS(N(t _exceptions(Rt exceptions((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR<)scCsdS(N((R((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR ,scCs|dk ot||jƒS(N(Rt issubclassRX(RRSRTRU((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR$/s (R'R(R)R<R R$(((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR s   ics‡fd†}|S(NcsOx?|j}||krdS|dks4|ˆkr8Pn|}qW||_dS(N(t __context__R(tnew_exctold_exct exc_context(t frame_exc(s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyt_fix_exception_context@s   ((R_R`((R_s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyt_make_context_fixer?s cCsCy|dj}|d‚Wn!tk r>||d_‚nXdS(Ni(R[t BaseException(t exc_detailst fixed_ctx((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyt_reraise_with_existing_contextOs    cCsd„S(NcSsdS(N(R(R\R]((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyt[t((R_((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyRaZscBs|\}}}ddUdS(Ns!raise exc_type, exc_value, exc_tb((RcR!R"texc_tb((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyRe_s(t InstanceTypecCs#t|ƒ}|tkr|jS|S(N(R:RiR=(tobjtobj_type((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyt _get_typeks  cBs_eZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z RS( s‹Context manager for dynamic management of a stack of exit callbacks For example: with ExitStack() as stack: files = [stack.enter_context(open(fname)) for fname in filenames] # All opened files will automatically be closed at the end of # the with statement, even if attempts to open files later # in the list raise an exception cCstƒ|_dS(N(Rt_exit_callbacks(R((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR<scCs+t|ƒƒ}|j|_tƒ|_|S(s?Preserve the context stack by transferring it to a new instance(R:RmR(Rt new_stack((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pytpop_all‚s  cs,‡‡fd†}ˆ|_|j|ƒdS(s:Helper to correctly register callbacks to __exit__ methodscs ˆˆ|ŒS(N((Rc(tcmtcm_exit(s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyt _exit_wrapper‹sN(t__self__tpush(RRpRqRr((RpRqs†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyt _push_cm_exit‰s cCsQt|ƒ}y |j}Wn!tk r<|jj|ƒnX|j||ƒ|S(sRegisters a callback with the standard __exit__ method signature Can suppress exceptions the same way __exit__ methods can. Also accepts any object with an __exit__ method (registering a call to the method instead of the object itself) (RlR$RRmRRu(Rtexitt_cb_typet exit_method((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyRts   cs/‡‡‡fd†}ˆ|_|j|ƒˆS(s\Registers an arbitrary callback and arguments. Cannot suppress exceptions. csˆˆˆŽdS(N((R!RHttb(R2tcallbackR3(s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyRr©s(t __wrapped__Rt(RRzR2R3Rr((R2RzR3s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyRz¤s  cCs8t|ƒ}|j}|j|ƒ}|j||ƒ|S(sªEnters the supplied context manager If successful, also pushes its __exit__ method as a callback and returns the result of the __enter__ method. (RlR$R Ru(RRpt_cm_typet_exitR((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyt enter_context±s   cCs|jdddƒdS(s$Immediately unwind the context stackN(R$R(R((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyRK¾scCs|S(N((R((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR Âsc GsÐ|ddk }tjƒd}t|ƒ}t}t}xx|jr²|jjƒ}y%||Œrwt}t}d}nWq;tjƒ}||d|dƒt}|}q;Xq;W|rÆt|ƒn|oÏ|S(Nii(NNN( RRERFRaRBRmRRRRe( RRct received_excR_R`tsuppressed_exct pending_raisetcbtnew_exc_details((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR$Ås(      ( R'R(R)R<RoRuRtRzR~RKR R$(((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyRss       cBs2eZdZd„Zd„Zd„Zd„ZRS(s+Backwards compatibility alias for ExitStackcCs'tjdtƒtt|ƒjƒdS(Ns*ContextStack has been renamed to ExitStack(R-R.R/tsuperR R<(R((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR<çs cCs |j|ƒS(N(Rt(RRz((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyt register_exitìscOs|j|||ŽS(N(Rz(RRzR2R3((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pytregisterïscCs |jƒS(N(Ro(R((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pytpreserveòs(R'R(R)R<R…R†R‡(((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR äs    cBs,eZdZdd„Zd„Zd„ZRS(sMContext manager that does no additional processing. Used as a stand-in for a normal context manager, when a particular block of code is only sometimes used with a normal context manager: cm = optional_cm if condition else nullcontext() with cm: # Perform operation, using optional_cm if condition is True cCs ||_dS(N(t enter_result(RRˆ((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR<ÿscCs|jS(N(Rˆ(R((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR scGsdS(N((Rtexcinfo((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyR$sN(R'R(R)RR<R R$(((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyRös  (ii(($R)R*RER-t collectionsRt functoolsRt__all__t version_infoR t_abc_ABCtABCMetatobjectRRRRR7RRRLRR R RCRaRettypesRit ImportErrorR:RlRR R(((s†/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pytsL       (H "      q