+
    úwéjˆ  ã                   óÄ   € ^ RI t ^ RIt^ RIt^ RIHtHt  ! R R4      tR R lt]P                  t
 ! R R4      t] ! R	 R
4      4       t ! R R]4      t ! R R]4      tR# )é    N)ÚAnyÚfinalc                   ó:   a € ] tR t^t o RtRtV 3R lR ltRtV tR# )Ú_Storagea>  Thread-tagged storage for a non-thread-critical ``Local``.

The data is tagged with the identity of the thread that owns it. This lets
``_CVar`` ignore data that leaked into an unrelated thread.

Python 3.14 added ``sys.flags.thread_inherit_context``, which is enabled by
default on free-threaded builds. When set, a new thread starts with a copy
of the spawning thread's context instead of an empty one, so the contextvar
backing a ``Local`` would otherwise be visible in any thread spawned from
one that had set it -- breaking the documented "thread-local in sync
threads" behaviour. asgiref re-homes the storage to the current thread at
the points where it *intentionally* moves work between threads (see
``asgiref.sync._restore_context``); data merely inherited by an unrelated
thread is never re-homed and so stays isolated.
c                ó@   <€ V ^8„  d   QhRS[ RS[S[S[3,          RR/# )é   Ú	thread_idÚdataÚreturnN)ÚintÚdictÚstrr   )ÚformatÚ__classdict__s   "€ÚDD:\Novelx\Nexus_chitfund_web\venv\Lib\site-packages\asgiref/local.pyÚ__annotate__Ú_Storage.__annotate__   s*   ø€ ÷ ñ ¡#ð ©T±#±s°(­^ð Àñ ó    c                ó   € Wn         W n        R # ©N©r	   r
   )Úselfr	   r
   s   &&&r   Ú__init__Ú_Storage.__init__   s   € Ø"ŒØŽ	r   )r
   r	   Nr   )	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú	__slots__r   Ú__static_attributes__Ú__classdictcell__©r   s   @r   r   r      s   ø‡ € ñð  &€I÷ö r   r   c                ó    € V ^8„  d   QhRRRR/# )r   Ústorager   r   © )r   s   "r   r   r      s   € ÷ 9ñ 9�Zð 9 Jñ 9r   c                óT   € \        \        P                  ! 4       V P                  4      # )z7Return a copy of *storage* owned by the current thread.)r   Ú	threadingÚ	get_identr
   )r%   s   &r   Ú_rehomer*      s   € ä”I×'Ò'Ó)¨7¯<©<Ó8Ð8r   c                   ó~   a € ] tR t^'t o RtV 3R lR ltV 3R lR ltR tV 3R lR ltV 3R	 lR
 lt	V 3R lt
RtV tR# )Ú_CVarzStorage utility for Local.c                ó   <€ V ^8„  d   QhRR/# )r   r   Nr&   )r   r   s   "€r   r   Ú_CVar.__annotate__,   s   ø€ ÷ Pñ P˜$ñ Pr   c                óH   € \        V R \        P                  ! R4      4       R# )Ú_datazasgiref.localN)Ú_object_setattrÚcontextvarsÚ
ContextVar©r   s   &r   r   Ú_CVar.__init__,   s   € Ü˜˜g¤{×'=Ò'=¸oÓ'NÖOr   c                ó   <€ V ^8„  d   QhRR/# )r   r   r   r&   )r   r   s   "€r   r   r.   /   s   ø€ ÷ ñ ˜*ñ r   c                óÊ   € V P                   P                  R 4      pVe%   VP                  \        P                  ! 4       8w  d    \        \        P                  ! 4       / 4      # V# r   )r0   Úgetr	   r(   r)   r   )r   r%   s   & r   Ú_storageÚ_CVar._storage/   sL   € ð —*‘*—.‘. Ó&ˆØŠ?˜g×/Ñ/´9×3FÒ3FÓ3HÔHÜœI×/Ò/Ó1°2Ó6Ð6Øˆr   c                óˆ   €  V P                  4       P                  V,          #   \         d    \        T : R T: 24      hi ; i)ú object has no attribute )r9   r
   ÚKeyErrorÚAttributeError©r   Úkeys   &&r   Ú__getattr__Ú_CVar.__getattr__8   sG   € ð	NØ—=‘=“?×'Ñ'¨Õ,Ð,øÜô 	NÜ  D¡8Ð+DÀSÁGÐ!LÓMÐMð	Nús	   ‚ # £Ac                ó*   <€ V ^8„  d   QhRS[ RS[RR/# )r   r@   Úvaluer   N©r   r   )r   r   s   "€r   r   r.   >   s"   ø€ ÷ >ñ >™sð >©3ð >°4ñ >r   c                óò   € VR 8X  d   \        R4      hV P                  4       P                  P                  4       pW#V&   V P                  P                  \        \        P                  ! 4       V4      4       R# )r0   z%Cannot set attribute '_data' on LocalN)	r>   r9   r
   Úcopyr0   Úsetr   r(   r)   )r   r@   rD   r
   s   &&& r   Ú__setattr__Ú_CVar.__setattr__>   sV   € Ø�'Œ>Ü Ð!HÓIÐIà�}‰}‹×#Ñ#×(Ñ(Ó*ˆØˆS‰	Ø�
‰
�‰”x¤	× 3Ò 3Ó 5°tÓ<Ö=r   c                ó$   <€ V ^8„  d   QhRS[ RR/# )r   r@   r   N)r   )r   r   s   "€r   r   r.   F   s   ø€ ÷ Nñ N™sð N tñ Nr   c                óú   € V P                  4       P                  P                  4       pW9   d=   W! V P                  P	                  \        \        P                  ! 4       V4      4       R# \        V : R V: 24      h)r<   N)	r9   r
   rG   r0   rH   r   r(   r)   r>   )r   r@   r
   s   && r   Ú__delattr__Ú_CVar.__delattr__F   s]   € Ø�}‰}‹×#Ñ#×(Ñ(Ó*ˆØŒ;Ø�	Ø�J‰J�N‰Nœ8¤I×$7Ò$7Ó$9¸4Ó@ÖAä  D¡8Ð+DÀSÁGÐ!LÓMÐMr   c                ó$   <€ V ^8„  d   Qh/ R;R&   # )r   z contextvars.ContextVar[_Storage]r0   r&   )r   r   s   "€r   r   r.   '   s   ø‡ ‚ ð .Ñ-ò r   r&   N)r   r   r   r   r   r   r9   rA   rI   rM   Ú__annotate_func__r!   r"   r#   s   @r   r,   r,   '   sA   ø‡ € Ù$÷Pð P÷ð òN÷>ð >÷Nð N÷? ƒ r   r,   c                   ó†   a € ] tR t^Ot o RtRV 3R lR lltRV 3R lR lltV 3R lR ltV 3R lR	 ltV 3R
 lR lt	Rt
V tR# )ÚLocala·  Local storage for async tasks.

This is a namespace object (similar to `threading.local`) where data is
also local to the current async task (if there is one).

In async threads, local means in the same sense as the `contextvars`
module - i.e. a value set in an async frame will be visible:

- to other async code `await`-ed from this frame.
- to tasks spawned using `asyncio` utilities (`create_task`, `wait_for`,
  `gather` and probably others).
- to code scheduled in a sync thread using `sync_to_async`

In "sync" threads (a thread with no async event loop running), the
data is thread-local, but additionally shared with async code executed
via the `async_to_sync` utility, which schedules async code in a new thread
and copies context across to that thread.

If `thread_critical` is True, then the local will only be visible per-thread,
behaving exactly like `threading.local` if the thread is sync, and as
`contextvars` if the thread is async. This allows genuinely thread-sensitive
code (such as DB handles) to be kept strictly to their initial thread and
disable the sharing across `sync_to_async` and `async_to_sync` wrapped calls.

Unlike plain `contextvars` objects, this utility is threadsafe.
c                ó$   <€ V ^8„  d   QhRS[ RR/# )r   Úthread_criticalr   rR   ©Úbool)r   r   s   "€r   r   ÚLocal.__annotate__l   s   ø€ ÷ -ñ -¡dð -°wñ -r   c                ó    € V \         Jd   \        R 4      hV'       d   \        P                  \        4      # \        P                  \
        4      # )z(asgiref.local.Local cannot be subclassed)rR   Ú	TypeErrorÚobjectÚ__new__Ú_ThreadCriticalLocalÚ_DefaultLocal)ÚclsrT   s   &&r   r[   ÚLocal.__new__l   s8   € Ø”eÓÜÐFÓGÐGçÜ—>‘>Ô"6Ó7Ð7Ü�~‰~œmÓ,Ð,r   c                ó$   <€ V ^8„  d   QhRS[ RR/# ©r   rT   r   NrU   )r   r   s   "€r   r   rW   t   s   ø€ ÷ ñ ©ð ¸ñ r   c                ó   € R # r   r&   )r   rT   s   &&r   r   ÚLocal.__init__t   s   € ñ 	r   c                ó&   <€ V ^8„  d   QhRS[ RS[/# ©r   r@   r   rE   )r   r   s   "€r   r   rW   }   ó   ø€ ×/Ñ/™sÐ/¡sÑ/r   c                ó   € R # r   r&   r?   s   &&r   rA   ÚLocal.__getattr__}   ó   € ©Cr   c                ó,   <€ V ^8„  d   QhRS[ RS[RS[/# )r   r@   rD   r   rE   )r   r   s   "€r   r   rW      s   ø€ ×;Ñ;™sÐ;©3Ð;±3Ñ;r   c                ó   € R # r   r&   ©r   r@   rD   s   &&&r   rI   ÚLocal.__setattr__   s   € ¹r   c                ó&   <€ V ^8„  d   QhRS[ RS[/# re   rE   )r   r   s   "€r   r   rW   �   rf   r   c                ó   € R # r   r&   r?   s   &&r   rM   ÚLocal.__delattr__�   ri   r   r&   N©F)r   r   r   r   r   r[   r   rA   rI   rM   r!   r"   r#   s   @r   rR   rR   O   s2   ø‡ € ñ÷6-ò -÷ò ÷ 0Ð/ç;Ð;ç/Ö/r   rR   c                   óX   a a€ ] tR t^„t oRtRV3R lV 3R llltR tR tR tRt	Vt
V ;t# )	r]   zCLocal with thread_critical=False: CVar storage protected by a lock.c                ó$   <€ V ^8„  d   QhRS[ RR/# ra   rU   )r   r   s   "€r   r   Ú_DefaultLocal.__annotate__‡   s   ø€ ÷ 3ñ 3©ð 3¸ñ 3r   c                ó”   <€ \         SV `  V4       \        4       p\        V R \        P
                  ! 4       4       \        V RV4       R# )Ú_lockr9   N)Úsuperr   r,   r1   r(   ÚRLock)r   rT   r%   Ú	__class__s   && €r   r   Ú_DefaultLocal.__init__‡   s6   ø€ Ü‰Ñ˜Ô)Ü“'ˆÜ˜˜g¤y§¢Ó'8Ô9Ü˜˜j¨'Ö2r   c                óÖ   € V P                   P                  4         \        V P                  V4      V P                   P	                  4        #   T P                   P	                  4        i ; ir   )rv   ÚacquireÚgetattrr9   Úreleaser?   s   &&r   rA   Ú_DefaultLocal.__getattr__�   sF   € à�
‰
×ÑÔð	!Ü˜4Ÿ=™=¨#Ó.à�J‰J×ÑÕ øˆD�J‰J×ÑÕ ús   œA ÁA(c                óÚ   € V P                   P                  4         \        V P                  W4       V P                   P	                  4        R #   T P                   P	                  4        i ; ir   )rv   r|   Úsetattrr9   r~   rl   s   &&&r   rI   Ú_DefaultLocal.__setattr__•   sF   € à�
‰
×ÑÔð	!Ü�D—M‘M 3Ô.à�J‰J×ÑÖ øˆD�J‰J×ÑÕ úó   œA ÁA*c                óÚ   € V P                   P                  4         \        V P                  V4       V P                   P	                  4        R #   T P                   P	                  4        i ; ir   )rv   r|   Údelattrr9   r~   r?   s   &&r   rM   Ú_DefaultLocal.__delattr__�   sF   € à�
‰
×ÑÔð	!Ü�D—M‘M 3Ô'à�J‰J×ÑÖ øˆD�J‰J×ÑÕ úrƒ   r&   rq   )r   r   r   r   r   r   rA   rI   rM   r!   r"   Ú__classcell__©ry   r   s   @@r   r]   r]   „   s&   ù‡ € ÙM÷3õ 3ò!ò!÷!ò !r   r]   c                   ó^   a a€ ] tR t^¦t oRtR	V3R lV 3R llltR tR tR tR t	Rt
VtV ;t# )
r\   zELocal with thread_critical=True: thread-local storage, CVar in async.c                ó$   <€ V ^8„  d   QhRS[ RR/# ra   rU   )r   r   s   "€r   r   Ú!_ThreadCriticalLocal.__annotate__©   s   ø€ ÷ =ñ =©ð =¸ñ =r   c                óf   <€ \         SV `  V4       \        V R \        P                  ! 4       4       R# )r9   N)rw   r   r1   r(   Úlocal)r   rT   ry   s   &&€r   r   Ú_ThreadCriticalLocal.__init__©   s#   ø€ Ü‰Ñ˜Ô)Ü˜˜j¬)¯/ª/Ó*;Ö<r   c                óþ   €  \         P                  ! 4        \	        T P                  R 4      '       g   \        4       T P                  n        T P                  P                  #   \         d    T P                  u # i ; i)Úcvar)ÚasyncioÚget_running_loopÚRuntimeErrorr9   Úhasattrr,   r�   r4   s   &r   Ú_get_storageÚ!_ThreadCriticalLocal._get_storage­   sc   € ð	!Ü×$Ò$Ô&ô �t—}‘} f×-Ò-Ü!&£ˆD�M‰MÔð
 �}‰}×!Ñ!Ð!øô' ô 	!ð
 —=‘=Ò ð	!ús   ‚A" Á"A<Á;A<c                ó6   € \        V P                  4       V4      # r   )r}   r•   r?   s   &&r   rA   Ú _ThreadCriticalLocal.__getattr__Å   s   € Ü�t×(Ñ(Ó*¨CÓ0Ð0r   c                ó:   € \        V P                  4       W4       R # r   )r�   r•   rl   s   &&&r   rI   Ú _ThreadCriticalLocal.__setattr__È   s   € Ü�×!Ñ!Ó# SÖ0r   c                ó:   € \        V P                  4       V4       R # r   )r…   r•   r?   s   &&r   rM   Ú _ThreadCriticalLocal.__delattr__Ë   s   € Ü�×!Ñ!Ó# SÖ)r   r&   rq   )r   r   r   r   r   r   r•   rA   rI   rM   r!   r"   r‡   rˆ   s   @@r   r\   r\   ¦   s+   ù‡ € ÙO÷=õ =ò"ò01ò1÷*ò *r   r\   )r‘   r2   r(   Útypingr   r   r   r*   rZ   rI   r1   r,   rR   r]   r\   r&   r   r   Ú<module>rž      sm   ðÛ Û Û ß ÷ñ õ09ð
 ×$Ñ$€÷%Nñ %NðP ÷10ð 10ó ð10ôh!�Eô !ôD&*˜5ö &*r   