+
    i]  c                   s    ^ 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# )i    N)TracebackType)events)
exceptions)tasksTimeoutc                   s*    ] tR t^tRtRtRtRtRtRt	R# )_StateZcreatedZactiveZexpiringexpiredZfinished N)
__name__
__module____qualname____firstlineno__CREATEDENTEREDEXPIRINGEXPIREDEXITED__static_attributes__r       )/usr/lib64/python3.14/asyncio/timeouts.pyr   r      s    GGHGFr   r   c                   s   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__   "r   __annotate__Timeout.__annotate__   s      UT\ d r   c                sX    \         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__ZTimeout.__init__   s#     nn;?(,

r   c                s.   < V ^8  d   QhRS[ R,          /# r   r   Nr   r   r   r   r   r    ,   s      edl r   c                s    V P                   # )zReturn the current deadline.)r$   r%      &r   r   ZTimeout.when,   s    zzr   c                r   r   r   r   r   r   r   r    0   s#     M Mut| M Mr   c                s&   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timeZ	call_soon_on_timeoutZcall_at)r%   r   loops   && r   
rescheduleZ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   )boolr   r   r   r   r    G   s     @ @ @r   c                s\    V P                   \        P                  \        P                  39   # )z$Is timeout expired during execution?)r!   r   r   r   r(   r)   r   r   ZTimeout.expiredG   s    {{v???r   c                r2   r3   )Zstrr   r   r   r   r    K   s     < <# <r   c                s   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 z
<Timeout [Z]Z>)r!   r   r   r$   ZroundZappendZjoinr+   )r%   Zinfor   Zinfo_strs   &   r   __repr__Z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   r   r   r    S   s     
 
) 
r   c                sR  "   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   r*   r   Zcurrent_taskr   r#   Z
cancelling_cancellingr1   r$   )r%   Ztask   & r   
__aenter__ZTimeout.__aenter__S   sz     ;;fnn,ABB!!#<EFFnn
::002

#s   B%B'c          	      sz   < 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   )ZtypeBaseExceptionr    r4   r   r   r   r   r    _   sK      }%, % $	
 
r   c                s  "   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"   r,   r!   r   r   r   r#   Zuncancelr8   Z
issubclassr   CancelledErrorTimeoutError_insert_timeout_error
isinstanceZExceptionGroupr   r   )r%   r;   r<   r=   Zexcs   &&&& r   	__aexit__Z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                r7   r'   r   r   r   r   r   r    }   s     % %T %r   c                sr    V P                   P                  4        \        P                  V n        R V n        R # r?   )r#   r,   r   r   r!   r"   r(   r)   r   r/   ZTimeout._on_timeout}   s%    

oo $r   c                s$   < V ^8  d   QhRS[ RR/# )r   r<   r   N)r>   r   r   r   r   r       s     * *} * *r   c                s    V P                   ec   \        V P                   \        P                  4      '       d+   \	        4       pV P                   ;Vn         Vn        Wn         R # V P                   p Kp  R # r?   )Z__context__rC   r   r@   rA   Z	__cause__)r<   Zter9   r   rB   ZTimeout._insert_timeout_error   s[    !!-'--z/H/HII!^070C0CC&(#))G .r   )r8   r!   r#   r"   r$   N)r   r	   r
   r   Z__doc__r&   r   r1   r   r6   r:   rD   r/   ZstaticmethodrB   r   Z__classdictcell__)r   s   @r   r   r      sr     
  M M.@ @< <
 
 <% % * *r   c                >    V ^8  d   QhR\         R,          R\        /# )r   delayNr   r   r   r      "r   r   r      s"     G G54< GG Gr   c                s    \         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.   )rF   r0   r9   r   timeoutrJ      s5      ""$D%*;499;&FFFFr   c                rE   r   rG   rH   rI   r   r   r      s      UT\ g r   c                s    \        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   r)   r   
timeout_atrK      s    & 4=r   )r   rJ   rK   )ZenumZtypesr    r5   r   r   r   Z__all__ZEnumr   r   rJ   rK   r   r   r   <module>rL      sC        TYY s* s*lG(r   