Your IP : 13.59.68.161


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/_threading_local.cpython-310.opt-2.pyc

o

6��f4�@s\	ddlmZddlmZdgZGdd�d�Zedd��ZGdd�d�Zdd	lm	Z	m
Z
d
S)�)�ref)�contextmanager�localc@s*eZdZ	dZdd�Zdd�Zdd�ZdS)	�
_localimpl)�key�dicts�	localargs�	locallock�__weakref__cCsdtt|��|_i|_dS)Nz_threading_local._localimpl.)�str�idrr)�self�r�7/opt/alt/python310/lib64/python3.10/_threading_local.py�__init__�s
z_localimpl.__init__cCs	t�}|jt|�dS)N�)�current_threadrr)r
�threadrrr�get_dict�sz_localimpl.get_dictcsj	i}|j}t�}t|�}|f�fdd�	}|f�fdd�	}t||��t||���|j|<�|f|j|<|S)Ncs��}|dur
|j|=dSdS�N)�__dict__)�_rr)�wrthreadrr�
local_deleted�s�z-_localimpl.create_dict.<locals>.local_deletedcs"��}|dur|j�|�}dSdSr)r�pop)r�idtr�dct)�wrlocalrr�thread_deleted�s�z._localimpl.create_dict.<locals>.thread_deleted)rrrrrr)r
Z	localdictrrrrrr)rrr�create_dict�s


z_localimpl.create_dictN)�__name__�
__module__�__qualname__�	__slots__rrrrrrrr�srccs��t�|d�}z|��}Wnty'|��}|j\}}|j|i|��Ynw|j�t�|d|�dVWd�dS1sAwYdS)N�_local__implr)	�object�__getattribute__r�KeyErrorrrrr	�__setattr__)r
�implr�args�kwrrr�_patch�s�
�"�r,c@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)r)r$rcOsX|s|r|jtjurtd��t�|�}t�}||f|_t�|_t�|d|�|�	�|S)Nz*Initialization arguments are not supportedr$)
rr%�	TypeError�__new__rr�RLockr	r(r)�clsr*r+r
r)rrrr.�s

z
local.__new__cCs8t|��t�||�Wd�S1swYdSr)r,r%r&�r
�namerrrr&�s

$�zlocal.__getattribute__cCsR|dkrtd|jj��t|��t�|||�Wd�S1s"wYdS�Nrz+%r object attribute '__dict__' is read-only)�AttributeError�	__class__r r,r%r()r
r2�valuerrrr(�s��
$�zlocal.__setattr__cCsP|dkrtd|jj��t|��t�||�Wd�S1s!wYdSr3)r4r5r r,r%�__delattr__r1rrrr7�s��

$�zlocal.__delattr__N)r r!r"r#r.r&r(r7rrrrr�s)rr/N)�weakrefr�
contextlibr�__all__rr,rZ	threadingrr/rrrr�<module>s,

&

?>