File "contextlib2.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyc
File size: 22.98 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit


Rec	@s>dZddlZddlZddlZddlmZddlmZddddd	d
ddd
g	Zedg7Zej	d d+krej
Znejde
fid,d6ZdZdZdefdYZd	e
fdYZdefdYZdZde
fdYZde
fdYZdefdYZdefdYZd
e
fd YZej	d!dkZerd"Zd#Znd$Zd%Zydd&lmZWnek
reZ n
Xd'Z d
e
fd(YZ!de!fd)YZ"defd*YZ#dS(-sAcontextlib2 - backports and enhancements to the contextlib moduleiN(tdeque(twrapstcontextmanagertclosingtnullcontexttAbstractContextManagertContextDecoratort	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
cGsy
|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



cBs8eZdZdZejdZedZRS(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|ddStS(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$tclassmethodR&(((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)eZdZdZdZdZRS(sJA base class or mixin that enables context managers to work as decorators.cCstjdt|jS(sReturns 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"tfd}|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_GeneratorContextManagercBs2eZdZdZdZdZdZRS(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|jS(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.pyR0scCs5yt|jSWntk
r0tdnXdS(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|jWntk
r1dSXtdn|dkrY|}ny&|jj|||tdWnztk
r}||k	Stk
r}||krtStr|j|krtSn#t	j
d|k	rqnXdS(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
			cstfd}|S(s@contextmanager decorator.

    Typical usage:

        @contextmanager
        def some_generator(<arguments>):
            <setup>
            try:
                yield <value>
            finally:
                <cleanup>

    This makes this:

        with some_generator(<arguments>) as <variable>:
            <body>

    equivalent to this:

        <setup>
        try:
            <variable> = <value>
            <body>
        finally:
            <cleanup>

    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.pythelpers(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.pyRscBs)eZdZdZdZdZRS(s2Context to automatically close something at the end of a block.

    Code like this:

        with closing(<module>.open(<arguments>)) as f:
            <block>

    is equivalent to this:

        f = <module>.open(<arguments>)
        try:
            <block>
        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|jjdS(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.pyRs		t_RedirectStreamcBs)eZdZdZdZdZRS(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|jtt|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|jjdS(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.pyRLs		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.pyRscBseZdZdZRS(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)eZdZdZdZdZRS(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||jS(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			icsfd}|S(NcsOx?|j}||krdS|dks4|kr8Pn|}qW||_dS(N(t__context__R(tnew_exctold_exctexc_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}|dWn!tk
r>||d_nXdS(Ni(R[t
BaseException(texc_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


cCsdS(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<lambda>[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_eZdZdZdZdZdZdZdZdZ	dZ
d	ZRS(
sContext 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_alls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_wrappersN(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_exits	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_typetexit_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.
        csdS(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.pyRrs(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.pyRzs	
cCs8t|}|j}|j|}|j|||S(sEnters 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_contexts
	cCs|jddddS(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.pyRKscCs|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	}tjd}t|}t}t}xx|jr|jj}y%||rwt}t}d}nWq;tj}||d|dt}|}q;Xq;W|rt|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					
	
		cBs2eZdZdZdZdZdZRS(s+Backwards compatibility alias for ExitStackcCs'tjdttt|jdS(Ns*ContextStack has been renamed to ExitStack(R-R.R/tsuperRR<(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_exitscOs|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.pytregisterscCs
|jS(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.pytpreserves(R'R(R)R<RRR(((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
			cBs,eZdZddZdZdZRS(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.pyRs	(ii(($R)R*RER-tcollectionsRt	functoolsRt__all__tversion_infoRt_abc_ABCtABCMetatobjectRRRRR7RRRLRR	R
RCRaRettypesRitImportErrorR:RlRRR(((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<module>sL	
	
	(H	"			

	q