+
    Sj+                     R    ^ RI t ^ RIt^ RIHt ^ RIHt ^ RIHtHt  ! R R4      tR# )    N)TracebackType)Any)OptionalTypec                      a  ] tR t^t o RtRR/V 3R lR l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]
V 3R lR l4       tV 3R lR ltV 3R lR ltV 3R lR ltRtV tR# )timeoutaw  timeout 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:

>>> with timeout(0.001):
...     async with aiohttp.get('https://github.com') as r:
...         await r.text()


timeout - value in seconds or None to disable timeout logic
loop - asyncio compatible event loop
loopNc                ^   < V ^8  d   QhRS[ S[,          RS[ S[P                  ,          RR/# )   r   r	   returnN)r   floatasyncioAbstractEventLoop)format__classdict__s   "D/var/www/idalgo/venv/lib/python3.14/site-packages/asgiref/timeout.py__annotate__timeout.__annotate__   s8      % w001	
 
    c                   Wn         Vf   \        P                  ! 4       pM\        P                  ! R\
        4       W n        R V n        RV n        R V n	        R V n
        R # )Nz-The loop argument to timeout() is deprecated.F)_timeoutr   get_running_loopwarningswarnDeprecationWarning_loop_task
_cancelled_cancel_handler
_cancel_at)selfr   r	   s   &&$r   __init__timeout.__init__   sR      <++-DMMCEW 

#r   c                   < V ^8  d   QhRR/# r   r   r    )r   r   s   "r   r   r   2   s        9  r   c                "    V P                  4       # N	_do_enterr!   s   &r   	__enter__timeout.__enter__2   s    ~~r   c          	      R   < V ^8  d   QhRS[ S[,          RS[RS[RS[S[,          /# )r   exc_typeexc_valexc_tbr   )r   BaseExceptionr   r   bool)r   r   s   "r   r   r   5   s<      }%  	
 
$r   c                (    V P                  V4       R # r(   _do_exitr!   r/   r0   r1   s   &&&&r   __exit__timeout.__exit__5   s     	hr   c                   < V ^8  d   QhRR/# r%   r&   )r   r   s   "r   r   r   >   s        )  r   c                *   "   V P                  4       # 5ir(   r)   r+   s   &r   
__aenter__timeout.__aenter__>   s     ~~s   c                @   < V ^8  d   QhRS[ S[,          RS[RS[RR/# )r   r/   r0   r1   r   N)r   r2   r   )r   r   s   "r   r   r   A   s8        }%    	 
 
 r   c                0   "   V P                  V4       R # 5ir(   r5   r7   s   &&&&r   	__aexit__timeout.__aexit__A   s      	hs   c                    < V ^8  d   QhRS[ /# r   r   )r3   )r   r   s   "r   r   r   J   s       r   c                    V P                   # r(   )r   r+   s   &r   expiredtimeout.expiredI   s    r   c                0   < V ^8  d   QhRS[ S[,          /# rC   )r   r   )r   r   s   "r   r   r   N   s      8E? r   c                    V P                   e6   \        V P                   V P                  P                  4       ,
          R4      # R # )Ng        )r    maxr   timer+   s   &r   	remainingtimeout.remainingM   s0    ??&t)::C@@r   c                   < V ^8  d   QhRR/# r%   r&   )r   r   s   "r   r   r   T   s      9 r   c                   V P                   f   V # \        P                  ! V P                  4      V n        V P                  f   \        R4      hV P                   ^ 8:  d(   V P                  P                  V P                  4       V # V P                  P                  4       V P                   ,           V n	        V P                  P                  V P                  V P                  4      V n        V # )Nz4Timeout context manager should be used inside a task)r   r   current_taskr   r   RuntimeError	call_soon_cancel_taskrJ   r    call_atr   r+   s   &r   r*   timeout._do_enterT   s     == K))$**5
::I  ==AJJ  !2!23K**//+dmm;#zz11$//4CTCTUr   c                4   < V ^8  d   QhRS[ S[,          RR/# )r   r/   r   N)r   r2   )r   r   s   "r   r   r   h   s      	 	m!4 	 	r   c                   V\         P                  J d1   V P                  '       d   R V n        R V n        \         P
                  hV P                  e0   V P                  e"   V P                  P                  4        R V n        R V n        R # r(   )r   CancelledErrorr   r   r   TimeoutErrorr   cancel)r!   r/   s   &&r   r6   timeout._do_exith   sl    w---$///#'D DJ&&&==$)=)=)I  '')#'D 
r   c                   < V ^8  d   QhRR/# )r   r   Nr&   )r   r   s   "r   r   r   s   s     # #d #r   c                h    V P                   e$   V P                   P                  4        RV n        R # R # )NT)r   rY   r   r+   s   &r   rR   timeout._cancel_tasks   s(    ::!JJ"DO "r   )r    r   r   r   r   r   )__name__
__module____qualname____firstlineno____doc__r"   r,   r8   r<   r@   propertyrE   rK   r*   r6   rR   __static_attributes____classdictcell__)r   s   @r   r   r      s      59	 &               (	 	# #r   r   )	r   r   typesr   typingr   r   r   r   r&   r   r   <module>rh      s"        !f# f#r   