+
     Bi]                         ^ RI t ^ RIHt ^RIHt ^RIHt ^RIHt Rt ! R R] P                  4      t	 ! R	 R4      t
R
 R ltR R ltR# )    N)TracebackType)events)
exceptions)tasksTimeoutc                   *    ] tR t^tRtRtRtRtRtRt	R# )_Statecreatedactiveexpiringexpiredfinished N)
__name__
__module____qualname____firstlineno__CREATEDENTEREDEXPIRINGEXPIREDEXITED__static_attributes__r       '/usr/lib/python3.14/asyncio/timeouts.pyr	   r	      s    GGHGFr   r	   c                      a  ] tR t^t o RtV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR	 ltV 3R
 lR lt	V 3R lR lt
V 3R lR ltV 3R lR lt]V 3R lR l4       tRtV tR# )r   zAsynchronous context manager for cancelling overdue coroutines.

Use `timeout()` or `timeout_at()` rather than instantiating this class directly.
c                2   < V ^8  d   QhRS[ R,          RR/#    whenNreturnfloat)format__classdict__s   "r   __annotate__Timeout.__annotate__   s      UT\ d r   c                X    \         P                  V n        RV n        RV n        Wn        R# )zSchedule a timeout that will trigger at a given loop time.

- If `when` is `None`, the timeout will never trigger.
- If `when < loop.time()`, the timeout will trigger on the next
  iteration of the event loop.
N)r	   r   _state_timeout_handler_task_when)selfr    s   &&r   __init__Timeout.__init__   s#     nn;?(,

r   c                .   < V ^8  d   QhRS[ R,          /# r   r!   Nr"   )r$   r%   s   "r   r&   r'   ,   s      edl r   c                    V P                   # )zReturn the current deadline.)r,   r-   s   &r   r    Timeout.when,   s    zzr   c                2   < V ^8  d   QhRS[ R,          RR/# r   r"   )r$   r%   s   "r   r&   r'   0   s#     M Mut| M Mr   c                &   V P                   \        P                  JdM   V P                   \        P                  J d   \	        R4      h\	        RV P                   P
                   R24      hWn        V P                  e   V P                  P                  4        Vf
   RV n        R# \        P                  ! 4       pWP                  4       8:  d#   VP                  V P                  4      V n        R# VP                  WP                  4      V n        R# )zReschedule the timeout.zTimeout has not been enteredzCannot change state of z TimeoutN)r)   r	   r   r   RuntimeErrorvaluer,   r*   cancelr   get_running_looptime	call_soon_on_timeoutcall_at)r-   r    loops   && r   
rescheduleTimeout.reschedule0   s    ;;fnn,{{fnn,"#ABB)$++*;*;)<HE  
  ,!!((*<$(D!**,Dyy{"(,t7G7G(H%(,T;K;K(L%r   c                    < V ^8  d   QhRS[ /# r   r!   )bool)r$   r%   s   "r   r&   r'   G   s     @ @ @r   c                \    V P                   \        P                  \        P                  39   # )z$Is timeout expired during execution?)r)   r	   r   r   r3   s   &r   r   Timeout.expiredG   s    {{v???r   c                    < V ^8  d   QhRS[ /# rC   )str)r$   r%   s   "r   r&   r'   K   s     < <# <r   c                   R .pV P                   \        P                  J d;   V P                  e   \	        V P                  ^4      MRpVP                  RV 24       RP                  V4      pRV P                   P                   RV R2# ) Nzwhen= z
<Timeout []>)r)   r	   r   r,   roundappendjoinr8   )r-   infor    info_strs   &   r   __repr__Timeout.__repr__K   ss    t;;&..(+/::+A5Q'tDKK%v'88D>DKK--.az;;r   c                   < V ^8  d   QhRR/# )r   r!   r   r   )r$   r%   s   "r   r&   r'   S   s     
 
) 
r   c                R  "   V P                   \        P                  Jd   \        R 4      h\        P
                  ! 4       pVf   \        R4      h\        P                  V n         Wn        V P                  P                  4       V n	        V P                  V P                  4       V # 5i)z Timeout has already been enteredz$Timeout should be used inside a task)r)   r	   r   r7   r   current_taskr   r+   
cancelling_cancellingr@   r,   )r-   tasks   & r   
__aenter__Timeout.__aenter__S   sz     ;;fnn,ABB!!#<EFFnn
::002

#s   B%B'c          	      z   < V ^8  d   QhRS[ S[,          R,          RS[R,          RS[R,          RS[R,          /# )r   exc_typeNexc_valexc_tbr!   )typeBaseExceptionr   rD   )r$   r%   s   "r   r&   r'   _   sK      }%, % $	
 
r   c                  "   V P                   e"   V P                   P                  4        R V n         V P                  \        P                  J d   \        P
                  V n        V P                  P                  4       V P                  8:  d{   Vew   \        V\        P                  4      '       d   \        VhVeL   V P                  V4       \        V\        4      '       d%   VP                   F  pV P                  V4       K  	  R # V P                  \        P                   J d   \        P"                  V n        R # 5iN)r*   r9   r)   r	   r   r   r+   uncancelrY   
issubclassr   CancelledErrorTimeoutError_insert_timeout_error
isinstanceExceptionGroupr   r   )r-   r^   r_   r`   excs   &&&& r   	__aexit__Timeout.__aexit___   s        ,!!((*$(D!;;&//) ..DKzz""$(8(88X=Q h
(A(ABB&G3(..w7!'>::#*#5#5C 66s; $6
  [[FNN* --DKs   D=D?c                   < V ^8  d   QhRR/# r1   r   )r$   r%   s   "r   r&   r'   }   s     % %T %r   c                r    V P                   P                  4        \        P                  V n        R V n        R # rd   )r+   r9   r	   r   r)   r*   r3   s   &r   r=   Timeout._on_timeout}   s%    

oo $r   c                $   < V ^8  d   QhRS[ RR/# )r   r_   r!   N)rb   )r$   r%   s   "r   r&   r'      s     * *} * *r   c                    V P                   ec   \        V P                   \        P                  4      '       d+   \	        4       pV P                   ;Vn         Vn        Wn         R # V P                   p Kp  R # rd   )__context__rj   r   rg   rh   	__cause__)r_   tes   & r   ri   Timeout._insert_timeout_error   s[    !!-'--z/H/HII!^070C0CC&(#))G .r   )rY   r)   r+   r*   r,   N)r   r   r   r   __doc__r.   r    r@   r   rS   r[   rm   r=   staticmethodri   r   __classdictcell__)r%   s   @r   r   r      sr     
  M M.@ @< <
 
 <% % * *r   c                >    V ^8  d   QhR\         R,          R\        /# )r   delayNr!   r#   r   )r$   s   "r   r&   r&      s"     G G54< GG Gr   c                    \         P                  ! 4       p\        V e   VP                  4       V ,           4      # R4      # )a  Timeout async context manager.

Useful in cases when you want to apply timeout logic around block
of code or in cases when asyncio.wait_for is not suitable. For example:

>>> async with asyncio.timeout(10):  # 10 seconds timeout
...     await long_running_task()


delay - value in seconds or None to disable timeout logic

long_running_task() is interrupted by raising asyncio.CancelledError,
the top-most affected timeout() context manager converts CancelledError
into TimeoutError.
N)r   r:   r   r;   )r|   r?   s   & r   timeoutr      s5      ""$D%*;499;&FFFFr   c                >    V ^8  d   QhR\         R,          R\        /# r   r}   )r$   s   "r   r&   r&      s      UT\ g r   c                    \        V 4      # )a6  Schedule the timeout at absolute time.

Like timeout() but argument gives absolute time in the same clock system
as loop.time().

Please note: it is not POSIX time but a time with
undefined starting base, e.g. the time of the system power on.

>>> async with asyncio.timeout_at(loop.time() + 10):
...     await long_running_task()


when - a deadline when timeout occurs or None to disable timeout logic

long_running_task() is interrupted by raising asyncio.CancelledError,
the top-most affected timeout() context manager converts CancelledError
into TimeoutError.
)r   )r    s   &r   
timeout_atr      s    & 4=r   )r   r   r   )enumtypesr   rJ   r   r   r   __all__Enumr	   r   r   r   r   r   r   <module>r      sC        TYY s* s*lG(r   