ó
    úÞ jˆ  ã                  ó€  • % S SK Jr  SrS SKrS SKJr  S SKJr  S SKJ	r	J
r
JrJrJrJrJr  S SKJr  SS	KJr  \	(       a  SS
KJr  \" S5      r\" S5      rSS jrSS jrSS jr\\" SSS9 " S S5      5       5       rSS jr\" 5       rS\S'    " S S\R>                  5      r  " S S\\   5      r! " S S\\   5      r"g) é    )Úannotations)ÚEventLoopTokenÚRunVarÚRunvarTokenÚcancel_shielded_checkpointÚ
checkpointÚcheckpoint_if_cancelledÚcurrent_tokenN)Ú	dataclass)ÚTracebackType)ÚTYPE_CHECKINGÚAnyÚGenericÚLiteralÚTypeVarÚfinalÚoverload)ÚWeakKeyDictionaryé   )Úget_async_backend)ÚAsyncBackendÚTÚDc               ƒ  óP   #   • [        5       R                  5       I Sh  v•N   g N7f)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   r   © ó    ÚH/var/www/html/gaurav/venv/lib/python3.13/site-packages/anyio/lowlevel.pyr   r      s   é € ô Ó
×
(Ñ
(Ó
*×*Ó*ùó   ‚&ž$Ÿ&c               ƒ  óP   #   • [        5       R                  5       I Sh  v•N   g N7f)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   r	   r   r   r   r	   r	   +   s   é € ô Ó
×
5Ñ
5Ó
7×7Ó7ùr   c               ƒ  óP   #   • [        5       R                  5       I Sh  v•N   g N7f)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   r   r   r   r   r   r   7   s   é € ô Ó
×
8Ñ
8Ó
:×:Ó:ùr   TF)ÚfrozenÚreprc                  ó.   • \ rS rSr% SrS\S'   S\S'   Srg)	r   éF   zU
An opaque object that holds a reference to an event loop.

.. versionadded:: 4.11.0
ztype[AsyncBackend]Úbackend_classÚobjectÚnative_tokenr   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__annotations__Ú__static_attributes__r   r   r   r   r   F   s   ‡ ñð &Ó%ØÖr   r   c                 óL   • [        5       n U R                  5       n[        X5      $ )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   r
   r   )r%   Ú	raw_tokens     r   r
   r
   S   s%   € ô &Ó'€MØ×+Ñ+Ó-€IÜ˜-Ó3Ð3r   z1WeakKeyDictionary[object, dict[RunVar[Any], Any]]Ú	_run_varsc                  ó6   • \ rS rSr\R
                  " 5       rSrg)Ú_NoValueSetéf   r   N)r(   r)   r*   r+   ÚenumÚautoÚNO_VALUE_SETr.   r   r   r   r3   r3   f   s   † Ø—9’9“;ƒLr   r3   c                  óJ   • \ rS rSrSrSrSS jrS	S jr        S
S jrSr	g)r   éj   zé
A token that can be used to restore a :class:`RunVar` to its previous value.

Returned by :meth:`RunVar.set`. Can be used as a context manager to automatically
reset the variable on exit, or passed directly to :meth:`RunVar.reset`.
)Ú	_redeemedÚ_valueÚ_varc                ó*   • Xl         X l        SU l        g )NF)r<   r;   r:   )ÚselfÚvarÚvalues      r   Ú__init__ÚRunvarToken.__init__t   s   € ØŒ	Ø=BŒØˆ�r   c                ó   • U $ ©Nr   ©r>   s    r   Ú	__enter__ÚRunvarToken.__enter__y   s   € Øˆr   c                ó:   • U R                   R                  U 5        g rD   )r<   Úreset)r>   Úexc_typeÚexc_valÚexc_tbs       r   Ú__exit__ÚRunvarToken.__exit__|   s   € ð 	�	‰	�‰˜Õr   N)r?   z	RunVar[T]r@   ú%T | Literal[_NoValueSet.NO_VALUE_SET])ÚreturnúRunvarToken[T])rJ   ztype[BaseException] | NonerK   zBaseException | NonerL   zTracebackType | NonerP   ÚNone)
r(   r)   r*   r+   r,   Ú	__slots__rA   rF   rM   r.   r   r   r   r   r   j   sC   † ñð .€Iôô
ðà,ðð &ðð %ð	ð
 
÷r   r   c                  óÆ   • \ rS rSr% SrSr\R                  rS\S'   \4   SS jjr	\
SS j5       r\SS j5       r\SS	 j5       r\4   SS
 jjrSS jrSS jrSS jrSrg)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.
)Ú_defaultÚ_namez!Literal[_NoValueSet.NO_VALUE_SET]r7   c                ó   • Xl         X l        g rD   )rW   rV   )r>   ÚnameÚdefaults      r   rA   ÚRunVar.__init__‘   s   € ð Œ
Ø�r   c                óx   • [        5       R                  n [        U   $ ! [         a    0 =n[        U'   Us $ f = frD   )r
   r'   r1   ÚKeyError)r>   r'   Úrun_varss      r   Ú_current_varsÚRunVar._current_vars—   sB   € ä$“×3Ñ3ˆð	Ü˜\Ñ*Ð*øÜó 	Ø13Ð3ˆH”y Ñ.ØŠOð	ús   – Ÿ9¸9c                ó   • g rD   r   ©r>   rZ   s     r   ÚgetÚ
RunVar.get    s   € Ø(+r   c                ó   • g rD   r   rE   s    r   rc   rd   £   s   € Ør   c                óø   •  U R                   U    $ ! [         aE    U[        R                  La  Us $ U R                  [        R                  La  U R                  s $  Of = f[        SU R                   S35      e)a
  
Return the current value of this run variable.

:param default: a fallback value to return if no value has been set
:return: the current value, the provided default, or the variable's own default
:raises LookupError: if no value is set and no default is available

zRun variable "z!" has no value and no default set)r_   r]   r   r7   rV   ÚLookupErrorrW   rb   s     r   rc   rd   ¦   s{   € ð	%Ø×%Ñ% dÑ+Ð+øÜó 	%Øœf×1Ñ1Ò1Ø’Ø—‘¤f×&9Ñ&9Ò9Ø—}‘}Ò$ñ :ð	%úô Ø˜TŸZ™Z˜LÐ(IÐJó
ð 	
s   ‚ ‘A ²)A ÁA c                óx   • U R                   n[        XR                  U [        R                  5      5      nXU '   U$ )zž
Set the value of this run variable for the current event loop.

:param value: the new value
:return: a token that can be used to restore the previous value

)r_   r   rc   r   r7   )r>   r@   Úcurrent_varsÚtokens       r   ÚsetÚ
RunVar.set½   s9   € ð ×)Ñ)ˆÜ˜D×"2Ñ"2°4¼×9LÑ9LÓ"MÓNˆØ"�TÑØˆr   c                ó(  • UR                   U La  [        S5      eUR                  (       a  [        S5      eUR                  [        R
                  L a   U R                  U 	 OUR                  U R                  U '   SUl        g! [         a     Nf = f)zò
Restore this run variable to the value it held before the matching :meth:`set`.

:param token: the token returned by :meth:`set`
:raises ValueError: if the token belongs to a different :class:`RunVar` or the token
    has already been used

z)This token does not belong to this RunVarz This token has already been usedTN)r<   Ú
ValueErrorr:   r;   r3   r7   r_   r]   )r>   rj   s     r   rI   ÚRunVar.resetÊ   s…   € ð �:‰:˜TÒ!ÜÐHÓIÐIà�?�?ÜÐ?Ó@Ð@à�<‰<œ;×3Ñ3Ò3ðØ×&Ñ& tÑ,ð (-§|¡|ˆD×Ñ˜tÑ$àˆ�øô ó Ùðús   ÁB Â
BÂBc                ó$   • SU R                   < S3$ )Nz<RunVar name=Ú>)rW   rE   s    r   Ú__repr__ÚRunVar.__repr__ã   s   € Ø˜tŸz™z™n¨AÐ.Ð.r   N)rY   ÚstrrZ   rO   )rP   zdict[RunVar[T], T])rZ   r   rP   úT | D)rP   r   )rZ   z%D | Literal[_NoValueSet.NO_VALUE_SET]rP   ru   )r@   r   rP   rQ   )rj   rQ   rP   rR   )rP   rt   )r(   r)   r*   r+   r,   rS   r3   r7   r-   rA   Úpropertyr_   r   rc   rk   rI   rr   r.   r   r   r   r   r   …   s˜   ‡ ñð $€Ià6A×6NÑ6N€LÐ3ÓNð KWð Øð Ø"Gõ ð óó ðð Û+ó Ø+àÛó Øð @Lð
Ø<ð
à	õ
ô.ô÷2/r   r   )rP   rR   )rP   r   )#Ú
__future__r   Ú__all__r5   Údataclassesr   Útypesr   Útypingr   r   r   r   r   r   r   Úweakrefr   Ú_core._eventloopr   Úabcr   r   r   r   r	   r   r   r
   r1   r-   ÚEnumr3   r   r   r   r   r   Ú<module>r€      sÁ   ðÞ "ð€ó Ý !Ý ß Q× QÑ QÝ %å /æÝ!áˆCƒL€ÙˆCƒL€ô+ô	8ô;ð Ù
�$˜UÑ#÷ð ó $ó ðô4ñ  @QÓ?R€	Ð<Ó Rô�$—)‘)ô ô�'˜!‘*ô ô6_/ˆW�Q‰Zõ _/r   