Ë ‚Ö¦iÉãóÈ—ddlZddlmZddlmZmZmZddlmZddlm Z ddlm Z dZ Gd „d ej«Z eGd „d ««Zd eedefd„Zdeedefd„Zy)éN)Ú TracebackType)ÚfinalÚOptionalÚTypeé)Úevents)Ú exceptions)Útasks)ÚTimeoutÚtimeoutÚ timeout_atcó —eZdZdZdZdZdZdZy)Ú_StateÚcreatedÚactiveÚexpiringÚexpiredÚfinishedN)Ú__name__Ú __module__Ú __qualname__ÚCREATEDÚENTEREDÚEXPIRINGÚEXPIREDÚEXITED©óú)/usr/lib64/python3.12/asyncio/timeouts.pyrrs„Ø€GØ€GØ€HØ€GØ �Frrc ó¬—eZdZdZdeeddfd„Zdeefd„Zdeeddfd„Zde fd„Z de fd „Z dd „Z d eeed eed eedee fd„Zdd„Zy)r zšAsynchronous context manager for cancelling overdue coroutines. Use `timeout()` or `timeout_at()` rather than instantiating this class directly. ÚwhenÚreturnNcóX—tj|_d|_d|_||_y)zòSchedule 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)rrÚ_stateÚ_timeout_handlerÚ_taskÚ_when)Úselfr!s rÚ__init__zTimeout.__init__!s%€ô—n‘nˆŒ à>BˆÔØ+/ˆŒ ؈� rcó—|jS)zReturn the current deadline.)r'©r(s rr!z Timeout.when.s €à�z‰zÐrcó—|jtjurJ|jtjur t d«‚t d|jj ›d�«‚||_|j�|jj«|€d|_ytj«}||j«kr!|j|j«|_y|j||j«|_y)zReschedule the timeout.zTimeout has not been enteredzCannot change state of z TimeoutN)r$rrrÚ RuntimeErrorÚvaluer'r%ÚcancelrÚget_running_loopÚtimeÚ call_soonÚ _on_timeoutÚcall_at)r(r!Úloops rÚ reschedulezTimeout.reschedule2sÒ€à �;‰;œfŸn™nÑ ,Ø�{‰{œfŸn™nÑ,Ü"Ð#AÓBÐBÜØ)¨$¯+©+×*;Ñ*;Ð)<¸HÐEóð ðˆŒ à × Ñ Ð ,Ø × !Ñ !× (Ñ (Ô *à ˆ<Ø$(ˆDÕ !ä×*Ñ*Ó,ˆDØ�t—y‘y“{Ò"Ø(,¯©°t×7GÑ7GÓ(H�Õ%à(,¯ © °T¸4×;KÑ;KÓ(L�Õ%rcóZ—|jtjtjfvS)z$Is timeout expired during execution?)r$rrrr+s rrzTimeout.expiredIs€à�{‰{œvŸ™´·±Ð?Ð?Ð?rcó —dg}|jtjur8|j�t |jd«nd}|j d|›�«dj |«}d|jj›d|›d�S)NÚézwhen=Ú z )r$rrr'ÚroundÚappendÚjoinr.)r(Úinfor!Úinfo_strs rÚ__repr__zTimeout.__repr__Mss€ØˆtˆØ �;‰;œ&Ÿ.™.Ñ (Ø+/¯:©:Ð+A”5˜Ÿ™ QÔ'ÀtˆDØ �K‰K˜% ˜v˜Ô 'Ø—8‘8˜D“>ˆØ˜DŸK™K×-Ñ-Ð.¨a°¨z¸Ð;Ð;rcƒóJK—|jtjur td«‚t j «}|€ td«‚tj |_||_|jj«|_ |j|j«|S­w)Nz Timeout has already been enteredz$Timeout should be used inside a task) r$rrr-r Ú current_taskrr&Ú cancellingÚ _cancellingr6r')r(Útasks rÚ __aenter__zTimeout.__aenter__Us}èø€Ø �;‰;œfŸn™nÑ ,ÜÐAÓBÐ BÜ×!Ñ!Ó#ˆØ ˆ<ÜÐEÓFÐ FÜ—n‘nˆŒ ؈Œ ØŸ:™:×0Ñ0Ó2ˆÔØ �‰˜Ÿ ™ Ô#؈ ùs‚B!B#Úexc_typeÚexc_valÚexc_tbcƒó¬K—|j�!|jj«d|_|jtjurVtj |_|j j«|jkr|tjurt|‚y|jtjurtj|_y­w©N)r%r/r$rrrr&ÚuncancelrGr ÚCancelledErrorÚ TimeoutErrorrr)r(rJrKrLs rÚ __aexit__zTimeout.__aexit__as èø€ð × Ñ Ð ,Ø × !Ñ !× (Ñ (Ô *Ø$(ˆDÔ !à �;‰;œ&Ÿ/™/Ñ )Ü Ÿ.™.ˆDŒKà�z‰z×"Ñ"Ó$¨×(8Ñ(8Ò8¸XÌ×IbÑIbÑ=bô#¨Ð/ðð�[‰[œFŸN™NÑ *Ü Ÿ-™-ˆDŒKàùs‚CCcóp—|jj«tj|_d|_yrN)r&r/rrr$r%r+s rr3zTimeout._on_timeoutys%€à � ‰ ×ÑÔÜ—o‘oˆŒ à $ˆÕr)r"r )r"N)rrrÚ__doc__rÚfloatr)r!r6ÚboolrÚstrrCrIrÚ BaseExceptionrrRr3rrrr r s¯„ñð ˜X e™_ð °ó ð�h˜u‘oóðM˜x¨™ðM°4óMð.@˜ó@ð<˜#ó<ó ðà˜4  Ñ.Ñ/ðð˜-Ñ(ðð˜Ñ'ð ð �$‰ó ô0%rr Údelayr"cór—tj«}t|�|j«|z«Sd«S)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)rr0r r1)rYr5s rr r �s5€ô × "Ñ "Ó $€DÜ ¨%Ð*;�4—9‘9“; Ñ&Ó FÐFÀÓ FÐFrr!có—t|«S)abSchedule 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 rr r •s€ô& �4‹=Ðr)ÚenumÚtypesrÚtypingrrrr9rr r Ú__all__ÚEnumrr rUr r rrrÚrasðÛ åß(Ñ(åÝÝð €ôˆT�Y‰Yôð÷c%ðc%óðc%ðLG�8˜E‘?ðG wóGð(�X˜e‘_ð¨ôr