https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /usr/lib/python2.7/site-packages/werkzeug/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib/python2.7/site-packages/werkzeug/local.pyc
�
./�_c@sdZddlZddlmZddlmZddlmZddlmZyddl	m
ZWnIek
r�ydd	l
mZWq�ek
r�dd	lmZq�XnXd
�Zdefd��YZd
efd��YZdefd��YZedefd��Y�ZdS(s�
    werkzeug.local
    ~~~~~~~~~~~~~~

    This module implements context-local objects.

    :copyright: 2007 Pallets
    :license: BSD-3-Clause
i����N(tupdate_wrapperi(timplements_bool(tPY2(tClosingIterator(t
getcurrent(t	get_identcCs|j�dS(sMReleases the contents of the local for the current context.
    This makes it possible to use locals without a manager.

    Example::

        >>> loc = Local()
        >>> loc.foo = 42
        >>> release_local(loc)
        >>> hasattr(loc, 'foo')
        False

    With this function one can release :class:`Local` objects as well
    as :class:`LocalStack` objects.  However it is not possible to
    release data held by proxies that way, one always has to retain
    a reference to the underlying local object in order to be able
    to release it.

    .. versionadded:: 0.6.1
    N(t__release_local__(tlocal((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyt
release_localstLocalcBsMeZd	Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	RS(
t__storage__t__ident_func__cCs*tj|di�tj|dt�dS(NR
R(tobjectt__setattr__R(tself((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyt__init__8scCst|jj��S(N(titerR
titems(R((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyt__iter__<scCs
t||�S(sCreate a proxy for a name.(t
LocalProxy(Rtproxy((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyt__call__?scCs|jj|j�d�dS(N(R
tpopRtNone(R((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRCscCs=y|j|j�|SWntk
r8t|��nXdS(N(R
RtKeyErrortAttributeError(Rtname((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyt__getattr__Fs
cCsP|j�}|j}y||||<Wn"tk
rKi||6||<nXdS(N(RR
R(RRtvaluetidenttstorage((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyR
Ls	
cCs<y|j|j�|=Wntk
r7t|��nXdS(N(R
RRR(RR((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyt__delattr__Ts
(s__storage__s__ident_func__(
t__name__t
__module__t	__slots__RRRRRR
R(((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyR	5s						t
LocalStackcBskeZdZd�Zd�Zed��Zejd��Zd�Zd�Z	d�Z
ed��ZRS(	s�This class works similar to a :class:`Local` but keeps a stack
    of objects instead.  This is best explained with an example::

        >>> ls = LocalStack()
        >>> ls.push(42)
        >>> ls.top
        42
        >>> ls.push(23)
        >>> ls.top
        23
        >>> ls.pop()
        23
        >>> ls.top
        42

    They can be force released by using a :class:`LocalManager` or with
    the :func:`release_local` function but the correct way is to pop the
    item from the stack after using.  When the stack is empty it will
    no longer be bound to the current context (and as such released).

    By calling the stack without arguments it returns a proxy that resolves to
    the topmost item on the stack.

    .. versionadded:: 0.6.1
    cCst�|_dS(N(R	t_local(R((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRvscCs|jj�dS(N(R$R(R((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRyscCs
|jjS(N(R$R(R((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyR|scCstj|jd|�dS(NR(RR
R$(RR((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyR�scs�fd�}t|�S(Ncs(�j}|dkr$td��n|S(Nsobject unbound(ttopRtRuntimeError(trv(R(s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyt_lookup�s	(R(RR(((Rs2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyR�scCsEt|jdd�}|dkr4g|j_}n|j|�|S(sPushes a new item to the stacktstackN(tgetattrR$RR)tappend(RtobjR'((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pytpush�s

cCsZt|jdd�}|dkr%dSt|�dkrLt|j�|dS|j�SdS(s}Removes the topmost item from the stack, will return the
        old value or `None` if the stack was already empty.
        R)ii����N(R*R$RtlenRR(RR)((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyR�s
cCs1y|jjdSWnttfk
r,dSXdS(s[The topmost item on the stack.  If the stack is empty,
        `None` is returned.
        i����N(R$R)Rt
IndexErrorR(R((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyR%�s(R R!t__doc__RRtpropertyRtsetterRR-RR%(((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyR#[s						
tLocalManagercBsJeZdZddd�Zd�Zd�Zd�Zd�Zd�Z	RS(sNLocal objects cannot manage themselves. For that you need a local
    manager.  You can pass a local manager multiple locals or add them later
    by appending them to `manager.locals`.  Every time the manager cleans up,
    it will clean up all the data left in the locals for this context.

    The `ident_func` parameter can be added to override the default ident
    function for the wrapped locals.

    .. versionchanged:: 0.6.1
       Instead of a manager the :func:`release_local` function can be used
       as well.

    .. versionchanged:: 0.7
       `ident_func` was added.
    cCs�|dkrg|_n-t|t�r6|g|_nt|�|_|dk	r�||_x0|jD]}tj|d|�qdWn	t|_dS(NR(	Rtlocalst
isinstanceR	tlistt
ident_funcRR
R(RR4R7R((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyR�s	cCs
|j�S(s�Return the context identifier the local objects use internally for
        this context.  You cannot override this method to change the behavior
        but use it to link other context local objects (such as SQLAlchemy's
        scoped sessions) to the Werkzeug locals.

        .. versionchanged:: 0.7
           You can pass a different ident function to the local manager that
           will then be propagated to all the locals passed to the
           constructor.
        (R7(R((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyR�scCs"x|jD]}t|�q
WdS(s�Manually clean up the data in the locals for this context.  Call
        this at the end of the request or use `make_middleware()`.
        N(R4R(RR((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pytcleanup�scs��fd�}|S(sWWrap a WSGI application so that cleaning up happens after
        request end.
        cst�||��j�S(N(RR8(tenvirontstart_response(tappR(s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pytapplication�s((RR;R<((R;Rs2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pytmake_middleware�scCst|j|�|�S(ssLike `make_middleware` but for decorating functions.

        Example usage::

            @manager.middleware
            def application(environ, start_response):
                ...

        The difference to `make_middleware` is that the function passed
        will have all the arguments copied from the inner application
        (name, docstring, module).
        (RR=(Rtfunc((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyt
middleware�s
cCsd|jjt|j�fS(Ns<%s storages: %d>(t	__class__R R.R4(R((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyt__repr__�sN(
R R!R0RRRR8R=R?RA(((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyR3�s	
		
	RcBs�eZdZdHZdId�Zd�Zed��Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zer�d�Zd�Zd�Znd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'd&�Z(d'�Z)d(�Z*d)�Z+d*�Z,d+�Z-d,�Z.d-�Z/d.�Z0d/�Z1d0�Z2d1�Z3d2�Z4d3�Z5d4�Z6d5�Z7d6�Z8d7�Z9d8�Z:d9�Z;d:�Z<d;�Z=d<�Z>d=�Z?d>�Z@d?�ZAd@�ZBdA�ZCer[dB�ZDneCZDdC�ZEdD�ZFdE�ZGdF�ZHdG�ZIRS(JshActs as a proxy for a werkzeug local.  Forwards all operations to
    a proxied object.  The only operations not supported for forwarding
    are right handed operands and any kind of assignment.

    Example usage::

        from werkzeug.local import Local
        l = Local()

        # these are proxies
        request = l('request')
        user = l('user')


        from werkzeug.local import LocalStack
        _response_local = LocalStack()

        # this is a proxy
        response = _response_local()

    Whenever something is bound to l.user / l.request the proxy objects
    will forward all operations.  If no object is bound a :exc:`RuntimeError`
    will be raised.

    To create proxies to :class:`Local` or :class:`LocalStack` objects,
    call the object as shown above.  If you want to have a proxy to an
    object looked up by a function, you can (as of Werkzeug 0.6.1) pass
    a function to the :class:`LocalProxy` constructor::

        session = LocalProxy(lambda: get_current_request().session)

    .. versionchanged:: 0.6.1
       The class can be instantiated with a callable as well now.
    t__localt__dict__R t__wrapped__cCs\tj|d|�tj|d|�t|�rXt|d�rXtj|d|�ndS(Nt_LocalProxy__localR RRD(RR
tcallablethasattr(RRR((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyR$scCs^t|jd�s|j�Syt|j|j�SWn$tk
rYtd|j��nXdS(s�Return the current object.  This is useful if you want the real
        object behind the proxy at a time for performance reasons or because
        you want to pass the object into a different context.
        Rsno object bound to %sN(RGRER*R RR&(R((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyt_get_current_object,s

cCs5y|j�jSWntk
r0td��nXdS(NRC(RHRCR&R(R((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRC8s
cCs9y|j�}Wntk
r.d|jjSXt|�S(Ns<%s unbound>(RHR&R@R trepr(RR,((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRA?s

cCs-yt|j��SWntk
r(tSXdS(N(tboolRHR&tFalse(R((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyt__bool__Fs
cCs3yt|j��SWntk
r.t|�SXdS(N(tunicodeRHR&RI(R((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyt__unicode__Ls
cCs-yt|j��SWntk
r(gSXdS(N(tdirRHR&(R((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyt__dir__Rs
cCs/|dkrt|j��St|j�|�S(Nt__members__(RORHR*(RR((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRXscCs||j�|<dS(N(RH(RtkeyR((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyt__setitem__]scCs|j�|=dS(N(RH(RRR((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyt__delitem__`scCs|j�||!S(N(RH(txtitj((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyt<lambda>dscCs||j�||+dS(N(RH(RRVRWtseq((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyt__setslice__fscCs|j�||5dS(N(RH(RRVRW((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyt__delslice__iscCst|j�||�S(N(tsetattrRH(RUtntv((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRXlscCst|j�|�S(N(tdelattrRH(RUR]((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRXmscCst|j��S(N(tstrRH(RU((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRXnscCs|j�|kS(N(RH(RUto((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRXoscCs|j�|kS(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRXpscCs|j�|kS(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRXqscCs|j�|kS(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRXrscCs|j�|kS(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRXsscCs|j�|kS(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRXtscCst|j�|�S(N(tcmpRH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRXuscCst|j��S(N(thashRH(RU((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRXvscOs|j�||�S(N(RH(RUtatkw((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRXwscCst|j��S(N(R.RH(RU((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRXxscCs|j�|S(N(RH(RURV((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRXyscCst|j��S(N(RRH(RU((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRXzscCs||j�kS(N(RH(RURV((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX{scCs|j�|S(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX|scCs|j�|S(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX}scCs|j�|S(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX~scCs|j�|S(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRXscCs|j�|S(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs|j�j|�S(N(RHt
__divmod__(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs|j�|S(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs|j�|>S(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs|j�|?S(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs|j�|@S(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs|j�|AS(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs|j�|BS(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs|j�j|�S(N(RHt__div__(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs|j�j|�S(N(RHt__truediv__(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs|j�S(N(RH(RU((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs|j�
S(N(RH(RU((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCst|j��S(N(tabsRH(RU((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs|j�S(N(RH(RU((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCst|j��S(N(tcomplexRH(RU((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCst|j��S(N(tintRH(RU((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCst|j��S(N(tlongRH(RU((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCst|j��S(N(tfloatRH(RU((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCst|j��S(N(toctRH(RU((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCst|j��S(N(thexRH(RU((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs|j�j�S(N(RHt	__index__(RU((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs|j�j||�S(N(RHt
__coerce__(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs|j�j�S(N(RHt	__enter__(RU((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scOs|j�j||�S(N(RHt__exit__(RURdRe((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs||j�S(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs||j�S(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs||j�S(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs||j�S(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs|j�j|�S(N(RHt__rtruediv__(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs||j�S(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs||j�S(N(RH(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCs|j�j|�S(N(RHt__rdivmod__(RURa((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCstj|j��S(N(tcopyRH(RU((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�scCstj|j�|�S(N(RvtdeepcopyRH(RUtmemo((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyRX�s(s__locals__dict__s__name__s__wrapped__N(JR R!R0R"RRRHR1RCRARLRNRPRRSRTRt__getslice__RZR[R
Rt__str__t__lt__t__le__t__eq__t__ne__t__gt__t__ge__t__cmp__t__hash__Rt__len__t__getitem__Rt__contains__t__add__t__sub__t__mul__t__floordiv__t__mod__Rft__pow__t
__lshift__t
__rshift__t__and__t__xor__t__or__RgRht__neg__t__pos__t__abs__t
__invert__t__complex__t__int__t__long__t	__float__t__oct__t__hex__RpRqRrRst__radd__t__rsub__t__rmul__t__rdiv__Rtt
__rfloordiv__t__rmod__Rut__copy__t__deepcopy__(((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyR�s�#																																																														(R0Rvt	functoolsRt_compatRRtwsgiRtgreenletRRtImportErrortthreadt_threadRRR	R#R3R(((s2/tmp/pip-install-sTXtzD/Werkzeug/werkzeug/local.pyt<module>
s$

	&RP

https://t.me/AnonymousX5 - 2025