Files
old-saburly-wagtail-web/env/lib/python3.10/site-packages/asgiref/__pycache__/timeout.cpython-310.pyc

48 lines
3.2 KiB
Plaintext
Raw Normal View History

2024-08-27 20:33:44 +02:00
o
<00><><EFBFBD>f+<00>@sJddlZddlZddlmZddlmZddlmZmZGdd<06>d<06>ZdS)<07>N)<01> TracebackType)<01>Any)<02>Optional<61>Typec @s<>eZdZdZdd<03>deedeejddfdd<07>Zddd <09>Z d
e
e d e d e dee fd d<0E>Zddd<10>Zd
e
e d e d e ddfdd<12>Zede fdd<14><04>Zedeefdd<16><04>Zddd<18>Zd
e
e ddfdd<1A>Zddd<1C>ZdS)<1F>timeouta<74>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
N)<01>loopr<00>returncCsF||_|dur t<01><02>}nt<03>dt<05>||_d|_d|_d|_ d|_
dS)Nz-The loop argument to timeout() is deprecated.F) <0B>_timeout<75>asyncio<69>get_running_loop<6F>warnings<67>warn<72>DeprecationWarning<6E>_loop<6F>_task<73>
_cancelled<EFBFBD>_cancel_handler<65>
_cancel_at)<03>selfrr<00>r<00>Q/home/amir/Desktop/saburlyweb/env/lib/python3.10/site-packages/asgiref/timeout.py<70>__init__s
<04>
ztimeout.__init__cCs|<00><00>S<00>N<><01> _do_enter<65>rrrr<00> __enter__2sztimeout.__enter__<5F>exc_type<70>exc_val<61>exc_tbcCs|<00>|<01>dSr<00><01>_do_exit<69>rrrrrrr<00>__exit__5s
ztimeout.__exit__c<00>s
<00>|<00><00>Srrrrrr<00>
__aenter__>s<02>ztimeout.__aenter__c<00>s<00>|<00>|<01>dSrr r"rrr<00> __aexit__As<02>ztimeout.__aexit__cCs|jSr)rrrrr<00>expiredIsztimeout.expiredcCs$|jdurt|j|j<02><03>d<01>SdS)Ng)r<00>maxr<00>timerrrr<00> remainingMs
ztimeout.remainingcCst|jdur|St<01>|j<03>|_|jdurtd<01><01>|jdkr%|j<03>|j<07>|S|j<03><08>|j|_ |j<03>
|j |j<07>|_ |S)Nz4Timeout context manager should be used inside a taskr) r r
<00> current_taskrr<00> RuntimeError<6F> call_soon<6F> _cancel_taskr(r<00>call_atrrrrrrTs

<04>
ztimeout._do_entercCsP|tjur|jrd|_d|_tj<05>|jdur#|jdur#|j<03><07>d|_d|_dSr)r
<00>CancelledErrorrrr<00> TimeoutErrorr <00>cancel)rrrrrr!hs
ztimeout._do_exitcCs"|jdur|j<00><01>d|_dSdS)NT)rr1rrrrrr-ss


<04>ztimeout._cancel_task)rr)rN)<17>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__r<00>floatr
<00>AbstractEventLooprrr<00> BaseExceptionr<00>boolr#r$r%<00>propertyr&r)rr!r-rrrrrsJ<06><02><02>
<EFBFBD>
<02><02><02>
<EFBFBD>
<02><02><02>
<EFBFBD>
 r) r
r <00>typesr<00>typingrrrrrrrr<00><module>s