ok

Mini Shell

Direktori : /proc/thread-self/root/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/contextlib2.pyc

�
�Rec	@s>dZddlZddlZddlZddlmZddlmZddddd	d
ddd
g	Zedg7Zej	d d+kr�ej
Znejde
fid,d6�Zd�Zd�Zdefd��YZd	e
fd��YZdefd��YZd�Zde
fd��YZde
fd��YZdefd��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(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
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$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)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(<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.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(<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|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.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)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_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}|d�Wn!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


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<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_eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�ZRS(
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_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.pyRt�s


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/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_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-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

Zerion Mini Shell 1.0