403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.25
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/asgiref/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/asgiref/__pycache__/local.cpython-311.pyc
�

"z�c���H�ddlZddlZddlZddlZddlZGd�d��ZdS)�Nc�R��eZdZdZd
deddfd�Zd�Zd�Zd	�Zd
�Z	�fd�Z
d�Z�xZS)�Locala�
    A drop-in replacement for threading.locals that also works with asyncio
    Tasks (via the current_task asyncio method), and passes locals through
    sync_to_async and async_to_sync.

    Specifically:
     - Locals work per-coroutine on any thread not spawned using asgiref
     - Locals work per-thread on any thread not spawned using asgiref
     - Locals are shared with the parent coroutine when using sync_to_async
     - Locals are shared with the parent thread when using async_to_sync
       (and if that thread was launched using sync_to_async, with its parent
       coroutine as well, with this working for indefinite levels of nesting)

    Set thread_critical to True to not allow locals to pass from an async Task
    to a thread it spawns. This is needed for code that truly needs
    thread-safety, as opposed to things used for helpful context (e.g. sqlite
    does not like being called from a different thread to the one it is from).
    Thread-critical code will still be differentiated per-Task within a thread
    as it is expected it does not like concurrent access.

    This doesn't use contextvars as it needs to support 3.6. Once it can support
    3.7 only, we can then reimplement the storage more nicely.
    F�thread_critical�returnNc	��||_tj��|_t	j��|_d�t|��d�	d�td��D������|_dS)Nz_asgiref_local_impl_{}_{}�c3�RK�|]"}tjtj��V��#dS�N)�random�choice�string�
ascii_letters)�.0�is  �//usr/lib/python3/dist-packages/asgiref/local.py�	<genexpr>z!Local.__init__.<locals>.<genexpr>)s/����J�J�A�F�M�&�"6�7�7�J�J�J�J�J�J��)�_thread_critical�	threading�RLock�_thread_lock�weakref�WeakSet�
_context_refs�format�id�join�range�
_attr_name)�selfrs  r�__init__zLocal.__init__!st�� /���%�O�-�-���8?��8I�8I���6�<�<��t�H�H��G�G�J�J��q���J�J�J�J�J�
�
����rc�L�ddlm}m}|���}d}|�t	j��}d}|jr|Sttj	����D]5}	|r|j
|}d}n|j
|}d}�%#t$rYnwxYwtd���|S)zC
        Get the ID we should use for looking up variables
        �)�AsyncToSync�SyncToAsyncTNFzInfinite launch_map loops)
�syncr%r&�get_current_taskr�current_threadrr�sys�getrecursionlimit�
launch_map�KeyError�RuntimeError)r!r%r&�
context_id�context_is_asyncrs      r�_get_context_idzLocal._get_context_id,s���
	3�2�2�2�2�2�2�2�!�1�1�3�3�
�����"�1�3�3�J�$��� �	����s�,�.�.�/�/�	<�	<�A�

�#�,�!,�!7�
�!C�J�',�$�$�"-�!7�
�!C�J�'+�$����
�
�
����
����
�:�;�;�;��s�"!B�
B�Bc���|���}t||j��s0t||ji��|j�|��t
||j��Sr
)r1�hasattrr �setattrr�add�getattr�r!�context_objs  r�_get_storagezLocal._get_storagePsd���*�*�,�,���{�D�O�4�4�	0��K���"�5�5�5���"�"�;�/�/�/��{�D�O�4�4�4rc��	|jD](}	t||j���#t$rY�%wxYwdS#t$rYdSwxYwr
)r�delattrr �AttributeError�	TypeErrorr7s  r�__del__z
Local.__del__Ws���		�#�1�
�
����K���9�9�9�9��%�����D�����
�
��
�	�	�	�
�D�D�	���s'�	4�"�4�
/�4�/�4�
A�Ac��|j5|���}||vr||cddd��St|�d|�����#1swxYwYdS�Nz object has no attribute �rr9r<�r!�key�storages   r�__getattr__zLocal.__getattr__cs���
�
�	R�	R��'�'�)�)�G��g�~�~��s�|�	R�	R�	R�	R�	R�	R�	R�	R�
%��%P�%P��%P�%P�Q�Q�Q�	R�	R�	R�	R����	R�	R�	R�	R�	R�	Rs� A	�A	�	A
�A
c����|dvr"t���||��S|j5|���}|||<ddd��dS#1swxYwYdS)N)rrrr )�super�__setattr__rr9)r!rC�valuerD�	__class__s    �rrHzLocal.__setattr__ks�����U�U�U��7�7�&�&�s�E�2�2�2�
�
�	!�	!��'�'�)�)�G� �G�C�L�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!�	!�	!s�A�A�Ac��|j5|���}||vr||=nt|�d|�����	ddd��dS#1swxYwYdSr@rArBs   r�__delattr__zLocal.__delattr__rs���
�
�	R�	R��'�'�)�)�G��g�~�~��C�L�L�$��%P�%P��%P�%P�Q�Q�Q�!�	R�	R�	R�	R�	R�	R�	R�	R�	R�	R�	R�	R����	R�	R�	R�	R�	R�	Rs�1A�A�A)F)
�__name__�
__module__�__qualname__�__doc__�boolr"r1r9r>rErHrL�
__classcell__)rJs@rrrs����������0	
�	
��	
��	
�	
�	
�	
�"�"�"�H5�5�5�
�
�
�R�R�R�!�!�!�!�!�R�R�R�R�R�R�Rrr)rr
r*rrr�rr�<module>rTs{��
�
�
�
�
�
�
�
�
�
�
�
���������pR�pR�pR�pR�pR�pR�pR�pR�pR�pRr

Youez - 2016 - github.com/yon3zu
LinuXploit