ó
    F\h  ã                   ón   • S r SSKJr  SSKJr  S/r " S S5      r\S 5       r " S S5      rSS	K	J
r
Jr  g
)zÿThread-local objects.

(Note that this module provides a Python version of the threading.local
 class.  Depending on the version of Python you're using, there may be a
 faster one available.  You should always import the `local` class from
 `threading`.)
é    )Úref)ÚcontextmanagerÚlocalc                   ó.   • \ rS rSrSrSrS rS rS rSr	g)	Ú
_localimplé   z#A class managing thread-local dicts)ÚkeyÚdictsÚ	localargsÚ	locallockÚ__weakref__c                 óJ   • S[        [        U 5      5      -   U l        0 U l        g )Nz_threading_local._localimpl.)ÚstrÚidr	   r
   )Úselfs    Ú'/usr/lib/python3.13/_threading_local.pyÚ__init__Ú_localimpl.__init__   s   € ð 2´C¼¸4»³MÑAˆŒàˆ�
ó    c                 óL   • [        5       nU R                  [        U5         S   $ )zHReturn the dict for the current thread. Raises KeyError if none
defined.é   )Úcurrent_threadr
   r   )r   Úthreads     r   Úget_dictÚ_localimpl.get_dict$   s$   € ô  Ó!ˆØ�z‰zœ"˜V›*Ñ% aÑ(Ð(r   c                 óà   ^^• 0 nU R                   n[        5       n[        U5      nU4U4S jjnU4U4S jjn[        X5      m[        X65      mTUR                  U'   TU4U R
                  U'   U$ )z8Create a new dict for the current thread, and return it.c                 ó6   >• T" 5       nUb  UR                   U	 g g ©N)Ú__dict__)Ú_r	   r   Úwrthreads      €r   Úlocal_deletedÚ-_localimpl.create_dict.<locals>.local_deleted0   s!   ø€ á“ZˆFØÑ!Ø—O‘O CÑ(ð "r   c                 óR   >• T" 5       nUb  UR                   R                  U5      ng g r   )r
   Úpop)r    Úidtr   ÚdctÚwrlocals       €r   Úthread_deletedÚ._localimpl.create_dict.<locals>.thread_deleted5   s)   ø€ ñ
 “IˆEØÑ Ø—k‘k—o‘o cÓ*‘ð !r   )r	   r   r   r   r   r
   )	r   Ú	localdictr	   r   r&   r"   r)   r(   r!   s	          @@r   Úcreate_dictÚ_localimpl.create_dict*   sp   ù€ àˆ	Ø�h‰hˆÜÓ!ˆÜ�‹jˆØ!$÷ 	)ð
 #&÷ 	+ô �dÓ*ˆÜ�vÓ.ˆØ&ˆ�‰˜ÑØ" IÐ-ˆ�
‰
�3‰ØÐr   )r
   r	   N)
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú	__slots__r   r   r,   Ú__static_attributes__© r   r   r   r      s   † Ù-ØG€Iòò)õr   r   c              #   ó\  #   • [         R                  U S5      n UR                  5       nUR                     [         R                  U SU5        S v •  S S S 5        g ! [         a3    UR	                  5       nUR
                  u  p4U R                  " U0 UD6   Nmf = f! , (       d  f       g = f7f)NÚ_local__implr   )	ÚobjectÚ__getattribute__r   ÚKeyErrorr,   r   r   r   Ú__setattr__)r   Úimplr'   ÚargsÚkws        r   Ú_patchr?   D   sŽ   é € ä×"Ñ" 4¨Ó8€Dð#Ø�m‰m‹oˆð
 
�‹Ü×Ñ˜4 ¨SÔ1Û÷ 
ˆøô	 ó #Ø×ÑÓ ˆØ—>‘>‰ˆØ�Š�tÐ"˜rÔ"ð#ú÷ 
�üs>   ‚B,šA ªB,¶BÁ	B,Á:BÂB,ÂBÂB,Â
B)Â%B,c                   ó0   • \ rS rSrSrS rS rS rS rSr	g)	r   éR   )r7   r   c                ó,  • U(       d  U(       a(  U R                   [        R                   L a  [        S5      e[        R                  U 5      n[	        5       nX4Ul        [        5       Ul        [        R                  USU5        UR                  5         U$ )Nz*Initialization arguments are not supportedr7   )
r   r8   Ú	TypeErrorÚ__new__r   r   ÚRLockr   r;   r,   )Úclsr=   r>   r   r<   s        r   rD   Úlocal.__new__U   sn   € Þ–B˜SŸ\™\¬V¯_©_Ò<ÜÐHÓIÐIÜ�~‰~˜cÓ"ˆÜ‹|ˆØ˜ˆŒÜ›ˆŒÜ×Ñ˜4 °Ô6ð 	×ÑÔØˆr   c                 óx   • [        U 5         [        R                  X5      sS S S 5        $ ! , (       d  f       g = fr   )r?   r8   r9   ©r   Únames     r   r9   Úlocal.__getattribute__c   s!   € Ü�D�\Ü×*Ñ*¨4Ó6÷ �\�\ús   Œ+«
9c                 óÊ   • US:X  a"  [        SU R                  R                  -  5      e[        U 5         [        R                  XU5      sS S S 5        $ ! , (       d  f       g = f©Nr   z+%r object attribute '__dict__' is read-only)ÚAttributeErrorÚ	__class__r.   r?   r8   r;   )r   rJ   Úvalues      r   r;   Úlocal.__setattr__g   sO   € Ø�:ÓÜ Ø=Ø—.‘.×)Ñ)ñ*ó+ð +ô �D�\Ü×%Ñ% d°%Ó8÷ �\�\ús   ´AÁ
A"c                 óÈ   • US:X  a"  [        SU R                  R                  -  5      e[        U 5         [        R                  X5      sS S S 5        $ ! , (       d  f       g = frM   )rN   rO   r.   r?   r8   Ú__delattr__rI   s     r   rS   Úlocal.__delattr__o   sM   € Ø�:ÓÜ Ø=Ø—.‘.×)Ñ)ñ*ó+ð +ô �D�\Ü×%Ñ% dÓ1÷ �\�\ús   ´AÁ
A!r5   N)
r.   r/   r0   r1   r3   rD   r9   r;   rS   r4   r5   r   r   r   r   R   s   † Ø*€Iòò7ò9õ2r   )r   rE   N)r2   Úweakrefr   Ú
contextlibr   Ú__all__r   r?   r   Ú	threadingr   rE   r5   r   r   Ú<module>rY      sK   ðñõ Ý %àˆ)€÷)ñ )ðX ñ
ó ð
÷#2ñ #2÷L ,Ð +r   