+
    Sj0                     b    ^ RI t ^ RIt^ RIt^ RIt^ RIHtHtHt  ! R R4      t ! R R4      t	R# )    N)AnyDictUnionc                   l   a a ] tR t^t oRtV3R lR ltR tV3R lV 3R lltV3R lR ltR	t	Vt
V ;t# )
_CVarzStorage utility for Local.c                   < V ^8  d   QhRR/# )   returnN )format__classdict__s   "B/var/www/idalgo/venv/lib/python3.14/site-packages/asgiref/local.py__annotate___CVar.__annotate__   s     
 
$ 
    c                <    \         P                  ! R 4      V n        R# )zasgiref.localN)contextvars
ContextVar_data)selfs   &r   __init___CVar.__init__   s    ?J?U?U@

r   c                    V P                   P                  / 4      p W!,          #   \         d    \        T : R T: 24      hi ; i) object has no attribute )r   getKeyErrorAttributeErrorr   keystorage_objects   && r   __getattr___CVar.__getattr__   sK    +	N!&& 	N D8+DSG!LMM	Ns	   % Ac                *   < V ^8  d   QhRS[ RS[RR/# )r	   r   valuer
   N)strr   )r   r   s   "r   r   r      s"     ' 's '3 '4 'r   c                   < VR 8X  d   \         SV `  W4      # V P                  P                  / 4      P	                  4       pW#V&   V P                  P                  V4       R# )r   N)super__setattr__r   r   copyset)r   r   r$   r    	__class__s   &&& r   r(   _CVar.__setattr__   sM    '>7&s22+002#s

~&r   c                $   < V ^8  d   QhRS[ RR/# )r	   r   r
   N)r%   )r   r   s   "r   r   r      s     N Ns Nt Nr   c                    V P                   P                  / 4      P                  4       pW9   d    W! V P                   P                  V4       R# \	        V : R V: 24      h)r   N)r   r   r)   r*   r   r   s   && r   __delattr___CVar.__delattr__   sP    +002 #JJNN>* D8+DSG!LMMr   )r   )__name__
__module____qualname____firstlineno____doc__r   r!   r(   r/   __static_attributes____classdictcell____classcell__r+   r   s   @@r   r   r      s4     $
 

N' 'N N Nr   r   c                   |   a a ] tR t^(t oRtR	V3R lR llt]P                  R 4       tR t	V 3R lt
R tRtVtV ;t# )
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 stricly 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
   N)bool)r   r   s   "r   r   Local.__annotate__D   s     $ $ $ $r   c                    Wn         \        P                  ! 4       V n        V  V'       d   \        P                  ! 4       V n        R # \        4       V n        R # N)_thread_critical	threadingRLock_thread_locklocal_storager   )r   r=   s   &&r   r   Local.__init__D   s6     /%OO-%OO-DM "GDMr   c              #    "   V P                   '       d   R p \        P                  ! 4        V'       g   V P                  x  R# \        V P                  R4      '       g   \        4       V P                  n        V P                  P                  x  R# V P                  ;_uu_ 4        V P                  x  RRR4       R#   \         d    Rp Li ; i  + '       g   i     R# ; i5i)TFcvarN)	rB   asyncioget_running_loopRuntimeErrorrG   hasattrr   rJ   rE   )r   is_asyncs   & r   _lock_storageLocal._lock_storageQ   s         H! ((* 
 mm# t}}f55).DMM&
 mm((( """mm# #"3   ! !2 #""sE   C(C C(A3C((C7
C(CC(CC(C%		C(c                    V P                  4       ;_uu_ 4       p\        W!4      uuR R R 4       #   + '       g   i     R # ; irA   )rP   getattrr   r   storages   && r   r!   Local.__getattr__w   s*    !!W7( "!!!s	   /A 	c                   < VR9   d   \         SV `  W4      # V P                  4       ;_uu_ 4       p\        W1V4       RRR4       R#   + '       g   i     R# ; i)_localN)rX   rG   rB   rE   )r'   r(   rP   setattr)r   r   r$   rU   r+   s   &&& r   r(   Local.__setattr__{   sF    LL7&s22!!WG%( "!!!s   AA	c                    V P                  4       ;_uu_ 4       p\        W!4       R R R 4       R #   + '       g   i     R # ; irA   )rP   delattrrT   s   && r   r/   Local.__delattr__   s*    !!WG! "!!!s	   /A 	)rG   rB   rE   )F)r1   r2   r3   r4   r5   r   
contextlibcontextmanagerrP   r!   r(   r/   r6   r7   r8   r9   s   @@r   r;   r;   (   sC     6$ $ #$ #$J))" "r   r;   )
rK   r^   r   rC   typingr   r   r   r   r;   r   r   r   <module>ra      s0        # #N N@[" ["r   