+
    P\i&  c                  s  a  0 t $ ^ RIHt R t^ RIt^ RIHt ^ RIHt ^ RI	H
t
HtHtHtHtHt ^ R	IHt ^R
IHt ^RIHt ]! R4      t]! R4      tR R ltR R ltR R lt]]! RRR7       ! R R4      4       4       tR R lt]! 4       tR]R&    ! R R]P>                  4      t  ! R R]],          4      t! ! R R]],          4      t"R# )!i    )annotationsEventLoopTokenRunvarTokenRunVarN)	dataclass)TracebackType)AnyGenericLiteralTypeVarfinaloverload)WeakKeyDictionary)get_async_backend)AsyncBackendTDc                   V ^8  d   QhRR/#    returnNone Zformat   "3/usr/lib/python3.14/site-packages/anyio/lowlevel.py__annotate__r      s     + +$ +    c                 R   "   \        4       P                  4       G Rj  xL
  R#  L5i)z
Check for cancellation and allow the scheduler to switch to another task.

Equivalent to (but more efficient than)::

    await checkpoint_if_cancelled()
    await cancel_shielded_checkpoint()

.. versionadded:: 3.0

N)r   
checkpointr   r   r   r   r      s      

(
(
***   '%'c               r   r   r   r   r   r   r   r   )   s     	8 	8t 	8r   c                 r   )z
Enter a checkpoint if the enclosing cancel scope has been cancelled.

This does not allow the scheduler to switch to a different task.

.. versionadded:: 3.0

N)r   checkpoint_if_cancelledr   r   r   r   r   )   s      

5
5
777r   c               r   r   r   r   r   r   r   r   5   s     ; ;$ ;r   c                 r   )z
Allow the scheduler to switch to another task but without checking for cancellation.

Equivalent to (but potentially more efficient than)::

    with CancelScope(shield=True):
        await checkpoint()

.. versionadded:: 3.0

N)r   cancel_shielded_checkpointr   r   r   r    r    5   s      

8
8
:::r   TF)ZfrozenZreprc                  s0    ] tR t^Dt$ RtR]R&   R]R&   RtR# )r   zU
An opaque object that holds a reference to an event loop.

.. versionadded:: 4.11.0
ztype[AsyncBackend]backend_classZobjectnative_tokenr   N)__name__
__module____qualname____firstlineno____doc____annotations____static_attributes__r   r   r   r   r   D   s     &%r   c               r   )r   r   r   r   r   r   r   r   r   Q   s     4 4~ 4r   c                 sL    \        4       p V P                  4       p\        W4      # )z
Return a token object that can be used to call code in the current event loop from
another thread.

:raises NoEventLoopError: if no supported asynchronous event loop is running in the
    current thread

.. versionadded:: 4.11.0

)r   current_tokenr   )r!   Z	raw_tokens     r   r*   r*   Q   s%     &'M++-I-33r   z1WeakKeyDictionary[object, dict[RunVar[Any], Any]]	_run_varsc                  s8    ] tR t^dt]P
                  ! 4       tRtR# )_NoValueSetr   N)r#   r$   r%   r&   enumZautoNO_VALUE_SETr)   r   r   r   r,   r,   d   s    99;Lr   r,   c                  s>    ] tR t^htR	tR R ltR R ltR R ltRtR# )
r   c                    V ^8  d   QhRRRR/# )r   varz	RunVar[T]value%T | Literal[_NoValueSet.NO_VALUE_SET]r   r   r   r   r   RunvarToken.__annotate__k   s      I .S r   c                	s,    Wn         W n        R V n        R# )FN_var_value	_redeemed)selfr0   r1      &&&r   __init__ZRunvarToken.__init__k   s    	=Br   c               r   )r   r   RunvarToken[T]r   r   r   r   r   r3   p   s      > r   c                	s    V # Nr   r8      &r   	__enter__ZRunvarToken.__enter__p   s    r   c               s(    V ^8  d   QhRRRRRRRR/# )	r   exc_typeztype[BaseException] | Noneexc_valzBaseException | Noneexc_tbzTracebackType | Noner   r   r   r   r   r   r   r3   s   s2      , & %	
 
r   c                	s<    V P                   P                  V 4       R # r<   )r5   reset)r8   r@   rA   rB   s   &&&&r   __exit__ZRunvarToken.__exit__s   s     			r   )r7   r6   r5   Nr4   )	r#   r$   r%   r&   	__slots__r:   r?   rD   r)   r   r   r   r   r   h   s    -I
 r   c                  s    ] tR t^|t$ RtRt]P                  tR]R&   ]3R R llt	]
R R l4       t]R R	 l4       t]R
 R l4       t]3R R lltR R ltR R ltR R ltRtR# )r   z
Like a :class:`~contextvars.ContextVar`, except scoped to the running event loop.

Can be used as a context manager, Just like :class:`~contextvars.ContextVar`, that
will reset the variable to its previous value when the context block is exited.
z!Literal[_NoValueSet.NO_VALUE_SET]r.   c               r/   )r   namestrdefaultr2   r   r   r   r   r   RunVar.__annotate__   s         "G r   c                	s    Wn         W n        R # r<   _name_default)r8   rF   rH   r9   r   r:   ZRunVar.__init__   s     
r   c               r   )r   r   zdict[RunVar[T], T]r   r   r   r   r   rI      s      1 r   c                	s    \        4       P                  p \        V,          #   \         d    / ;p\        T&   Tu # i ; ir<   )r*   r"   r+   KeyError)r8   r"   Zrun_varss   &  r   _current_varsZRunVar._current_vars   sB    $33	\** 	133Hy.O	s   # >>c               r/   )r   rH   r   r   T | Dr   r   r   r   r   rI      s    ++1++r   c                	    R # r<   r   r8   rH      &&r   get
RunVar.get   s    (+r   c               r   )r   r   r   r   r   r   r   r   rI      s    Qr   c                	rP   r<   r   r=   r>   r   rS   rT      s    r   c               r/   )r   rH   z%D | Literal[_NoValueSet.NO_VALUE_SET]r   rO   r   r   r   r   r   rI      s     
 
<
	
r   c                	s    V P                   V ,          #   \         dH    T\        P                  Jd   Tu # T P                  \        P                  Jd   T P                  u #  Mi ; i\        R T P                   R24      h)zRun variable "z!" has no value and no default set)rN   rM   r   r.   rL   ZLookupErrorrK   rQ   rR   r   rS   rT      s{    	%%%d++ 	%f111f&9&99}}$ :	% TZZL(IJ
 	
s    !A'*A'&A'c               r/   )r   r1   r   r   r;   r   r   r   r   r   rI      s       ~ r   c                	sx    V P                   p\        WP                  V \        P                  4      4      pWV &   V# r<   )rN   r   rS   r   r.   )r8   r1   Zcurrent_varstokens   &&  r   setZ
RunVar.set   s7    ))D"2"249L9L"MN"Tr   c               r/   )r   rU   r;   r   r   r   r   r   r   r   rI      s      > d r   c                	s2   VP                   V Jd   \        R 4      hVP                  '       d   \        R4      hVP                  \        P
                  J d    V P                  V  MVP                  V P                  V &   RVn        R#   \         d     Li ; i)z)This token does not belong to this RunVarz This token has already been usedTN)r5   Z
ValueErrorr7   r6   r,   r.   rN   rM   )r8   rU   rR   r   rC   ZRunVar.reset   s    ::T!HII????@@<<;333&&t, (-||Dt$  s   B BBc               r   )r   r   rG   r   r   r   r   r   rI      s     / /# /r   c                	s$    R V P                   : R2# )z<RunVar name=Z>)rK   r=   r>   r   __repr__ZRunVar.__repr__   s    tzznA..r   )rL   rK   NrJ   )r#   r$   r%   r&   r'   rE   r,   r.   r(   r:   ZpropertyrN   r   rS   rV   rC   rW   r)   r   r   r   r   r   |   s}     $I6A6N6NL3N KW    + +  @L
"/ /r   )r   r   r   r   r   r    r*   )#__conditional_annotations__Z
__future__r    Z__all__r-   Zdataclassesr   Ztypesr   Ztypingr   r   r   r	   r
   r   Zweakrefr   Z_core._eventloopr   Zabcr   r   r   r   r   r    r   r*   r+   r(   ZEnumr,   r   r   )rX   s   @r   <module>rY      s    " "  !  B B % / CLCL+	8; 
$U#  $ 4  @Q?R	< R$)) '!* (H/WQZ H/r   