e-8FSrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK r SSK r SSK r SSK r SSK r SSKrSSKrSSKrSSKrSSKrSSKJr SSKJr SSKJr SSKJr SSKJr SS KJr SS KJr SS KJr SS KJr SS KJr SSKJr SSKJ r SSK!J"r" Sr#Sr$Sr%\&"\ S5r'Sr(Sr)Sr*Sr+S&Sjr,S'Sjr-Sr.\&"\ S5(aSr/OSr/Sr0"S S!\Rb5r2"S"S#\Rf5r4"S$S%\Rj5r6g!\a SrNf=f)(aBase implementation of event loop. The event loop can be broken up into a multiplexer (the part responsible for notifying us of I/O events) and the event loop proper, which wraps a multiplexer with functionality for scheduling callbacks, immediately or at a given time in the future. Whenever a public API takes a callback, subsequent positional arguments will be passed to the callback if/when it is called. This avoids the proliferation of trivial lambdas implementing closures. Keyword arguments for the callback are not supported; this is a conscious design decision, leaving the door open for keyword arguments to modify the meaning of the API call itself. N) constants) coroutines)events) exceptions)futures) protocols)sslproto) staggered)tasks)timeouts) transports)trsock)logger) BaseEventLoopServerdg?AF_INET6iQcURn[[USS5[R5(a[ UR 5$[U5$)N__self__) _callback isinstancegetattrr Taskreprrstr)handlecbs 9/opt/imh/python3.13/lib/python3.13/asyncio/base_events.py_format_handler Gs@   B'"j$/<<BKK  6{clU[R:XagU[R:Xag[U5$)Nzz) subprocessPIPESTDOUTr)fds r _format_piper'Ps+ Z__ z  Bxr!c[[S5(d [S5eUR[R[R S5 g![ a [S5ef=f)N SO_REUSEPORTz)reuse_port not supported by socket modulerzTreuse_port not supported by socket module, SO_REUSEPORT defined but not implemented.)hasattrsocket ValueError setsockopt SOL_SOCKETr)OSErrorsocks r_set_reuseportr2Ysc 6> * *DEE J OOF--v/B/BA F JIJ J Js /AA(c [[S5(dgUS[R[R1;dUcgU[R:Xa[RnO&U[R :Xa[RnOgUcSnOH[ U[5(a US:XaSnO*[ U[5(a US:XaSnO [U5nU[R:Xa<[R/n[(aUR[R 5 OU/n[ U[5(aUR#S5nSU;agUHJn[R$"X5 [(aU[R :Xa XUSXXV44s $XUSX44s $ g![[4a gf=f![&a Mrf=f)N inet_ptonrr!idna%)r*r+ IPPROTO_TCP IPPROTO_UDP SOCK_STREAM SOCK_DGRAMrbytesrint TypeErrorr, AF_UNSPECAF_INET _HAS_IPv6appendrdecoder4r/) hostportfamilytypeprotoflowinfoscopeidafsafs r _ipaddr_inforMds 6; ' ' Q**F,>,>?? L v!!!"" "" """ | D% TS[ D#  42: t9D!!!~~ 9 JJv 'h${{6" d{    R &yR6??2T,KKKTL88 ;:&  2   s* F*(_interleave_addrinfos..s  a   s ) collections OrderedDictrBlistvaluesextend itertoolschain from_iterable zip_longest) addrinfosfirst_address_family_countaddrinfos_by_familyaddrrFaddrinfos_lists reordereds r_interleave_addrinfosres&113a  ,*,  '#**40  .5578OI!A%+,K-G!-KLM A > :Q >> ? ??00  ! !? 3  r!cUR5(d,UR5n[U[[45(ag[ R "U5R5 grP) cancelled exceptionr SystemExitKeyboardInterruptr _get_loopstop)futexcs r_run_until_complete_cbrosG ==??mmo cJ(9: ; ;  c!r! TCP_NODELAYc<UR[R[R1;anUR[R :XaOUR [R:Xa0UR[R[RS5 gggg)Nr) rFr+r@rrGr:rHr8r-rpr0s r _set_nodelayrrsj KKFNNFOO< < V/// f000 OOF..0B0BA F10 =r!cgrPrQr0s rrrrrs r!ch[b+[U[R5(a [S5egg)Nz"Socket cannot be of type SSLSocket)sslr SSLSocketr>r0s r_check_ssl_socketrws* :dCMM::<==;r!cJ\rSrSrSrSrSrSrSrSr Sr S r S r S r g ) _SendfileFallbackProtocolc[U[R5(d [S5eXlUR 5UlUR5UlURUl UR5 URU5 UR(a*URRR5UlgSUlg)Nz.transport should be _FlowControlMixin instance)rr_FlowControlMixinr> _transport get_protocol_proto is_reading_should_resume_reading_protocol_paused_should_resume_writing pause_reading set_protocol_loop create_future_write_ready_fut)selftransps r__init__"_SendfileFallbackProtocol.__init__s&*">">??LM M ))+ &,&7&7&9#&,&=&=#D!  & &$(OO$9$9$G$G$ID !$(D !r!c# URR5(a [S5eURnUcgUIShvN gN7f)NzConnection closed by peer)r} is_closingConnectionErrorr)rrms rdrain_SendfileFallbackProtocol.drains> ?? % % ' '!"=> >## ;  sAA AA c[S5e)Nz?Invalid state: connection should have been established already. RuntimeErrorr transports rconnection_made)_SendfileFallbackProtocol.connection_madesNO Or!cURbCUc%URR[S55 OURRU5 URR U5 g)NzConnection is closed by peer)r set_exceptionrrconnection_lost)rrns rr)_SendfileFallbackProtocol.connection_losts[  ,{%%33#$BCE%%33C8 ##C(r!crURbgURRR5UlgrP)rr}rrrs r pause_writing'_SendfileFallbackProtocol.pause_writings,  ,  $ 5 5 C C Er!cdURcgURRS5 SUlgNF)r set_resultrs rresume_writing(_SendfileFallbackProtocol.resume_writings-  (  ((/ $r!c[S5eNz'Invalid state: reading should be pausedr)rdatas r data_received'_SendfileFallbackProtocol.data_receivedDEEr!c[S5errrs r eof_received&_SendfileFallbackProtocol.eof_receivedrr!cR# URRUR5 UR(aURR 5 UR bUR R 5 UR(aURR5 gg7frP) r}rrrresume_readingrcancelrrrs rrestore!_SendfileFallbackProtocol.restoresr $$T[[1  & & OO * * ,  ,  ! ! ( ( *  & & KK & & ( 'sB%B')rrrr}rN)__name__ __module__ __qualname____firstlineno__rrrrrrrrr__static_attributes__rQr!rryrys3 )O )F % FF )r!ryc~\rSrSrSSjrSrSrSrSrSr S r S r \ S 5r S rS rSrSrSrSrSrg)riNcXlX l[R"5Ul/UlX0lXPlX@lX`l Xpl SUl SUl gr) r_socketsweakrefWeakSet_clients_waiters_protocol_factory_backlog _ssl_context_ssl_handshake_timeout_ssl_shutdown_timeout_serving_serving_forever_fut)rloopsocketsprotocol_factory ssl_contextbacklogssl_handshake_timeoutssl_shutdown_timeouts rrServer.__init__sO   )  !1 '&;#%9" $(!r!cRSURRSUR<S3$)N) __class__rrrs r__repr__Server.__repr__%s'4>>**+9T\\4DAFFr!cXURceURRU5 grP)rraddrs r_attachServer._attach(s$}}((( )$r!cURRU5 [UR5S:XaURcUR 5 gggNr)rdiscardlenr_wakeuprs r_detachServer._detach,s? i( t}}  "t}}'< LLN(= "r!cURnSUlUH+nUR5(aMURS5 M- grP)rdoner)rwaiterswaiters rrServer._wakeup1s5-- F;;==!!$'r!c 4UR(agSUlURHonURUR5 URR UR XRXRURUR5 Mq g)NT) rrlistenrr_start_servingrrrr)rr1s rrServer._start_serving8sl ==  MMD KK & JJ % %&&.?.?mmT%@%@** ,"r!cUR$rP)rrs rget_loopServer.get_loopCs zzr!cUR$rP)rrs r is_servingServer.is_servingFs }}r!cVURcg[SUR55$)NrQc3N# UHn[R"U5v M g7frP)rTransportSocket)rRss rrT!Server.sockets..MsF 1V++A.. s#%)rtuplers rrServer.socketsIs$ == F FFFr!cvURnUcgSUlUHnURRU5 M SUlURb@URR 5(d!URR 5 SUl[UR5S:XaUR5 gg)NFr) rr _stop_servingrrrrrrr)rrr1s rclose Server.closeOs-- ?  D JJ $ $T *  % % 1--2244  % % , , .(,D % t}}  " LLN #r!cfURR5HnUR5 M grP)rcopyrrs r close_clientsServer.close_clientsb#++-I OO .r!cfURR5HnUR5 M grP)rrabortrs r abort_clientsServer.abort_clientsfrr!cl# UR5 [R"S5IShvN gN7fr)rr sleeprs r start_servingServer.start_servingjs$ kk!ns *424c# URb[SU<S35eURc[SU<S35eUR5 URR 5UlURIShvN SUlgN ![ Ra1 UR5 UR5IShvN e!e=ff=f!SUlf=f7f)Nzserver z, is already being awaited on serve_forever()z is closed) rrrrrrrCancelledErrorr wait_closedrs r serve_foreverServer.serve_foreverps  $ $ 0$!MNP P ==  ;< < $(JJ$<$<$>! -++ + +)-D % ,((   &&(((  )-D %s`A*C -B <B =B C  B C!#C CC  C C  CC CC c# URcgURR5nURRU5 UIShvN gN7f)aWait until server is closed and all connections are dropped. - If the server is not closed, wait. - If it is closed, but there are still active connections, wait. Anyone waiting here will be unblocked once both conditions (server is closed and all connections have been dropped) have become true, in either order. Historical note: In 3.11 and before, this was broken, returning immediately if the server was already closed, even if there were still active connections. An attempted fix in 3.12.0 was still broken, returning immediately if the server was still open and there were no active connections. Hopefully in 3.12.1 we have it right. N)rrrrB)rrs rr Server.wait_closeds?* == ))+ V$ sA A A A) rrrrrrrrrrrrP)rrrrrrrrrrrrpropertyrrrrrr r rrQr!rrrse>B) G% ( ,GG & -*r!rc\rSrSrSrSrSrSrSrSr S_SSS .S jjr S_S SSSSSS S .Sjjr S`Sjr SaSjr SaSjrS_SjrSrSrSrSrSrSrSrS_SjrSrSrSrSrSrS rS!rS"rS#r \!RD4S$jr#S%r$S&r%SS'.S(jr&SS'.S)jr'SS'.S*jr(S+r)S,r*S-r+SS'.S.jr,S/r-S0r.S1r/S2S2S2S2S3.S4jr0SbS5jr1ScS S6.S7jjr2S8r3S9r4S:r5S_S;jr6SaSS2S2S2SSSSSSSS S<. S=jjr7SdS>jr8ScS S6.S?jjr9S@r:SAr;S SSSSB.SCjr<SaS2S2S2SSSSD.SEjjr=S2\>R~S2S2S3.SFjr@SGrASa\>R\>RSSHSSSSSSS SI. SJjjrDSSSSK.SLjrESMrFSNrGSOrH\IR\IR\IRS S S2SSSSP. SQjrK\IR\IR\IRS S S2SSSSP. SRjrLSSrMSTrNSUrOSVrPSWrQSXrRSYrSSZrTS[rUS\rVS]rWS^rXg)ericSUlSUlSUl[R"5Ul/UlSUlSUlSUl [R"S5RUl SUlUR[ R""55 SUlSUlSUlSUlSUlSUl[0R2"5UlSUlSUlg)NrF monotonicg?)_timer_cancelled_count_closed _stoppingrVdeque_ready _scheduled_default_executor _internal_fds _thread_idtimeget_clock_info resolution_clock_resolution_exception_handler set_debugr_is_debug_mode_old_agen_hooksslow_callback_duration_current_handle _task_factory"_coroutine_origin_tracking_enabled&_coroutine_origin_tracking_saved_depthrr _asyncgens_asyncgens_shutdown_called_executor_shutdown_calledrs rrBaseEventLoop.__init__s&'# !'') !%!%!4!4[!A!L!L"& z0023#'*##!27/6:3"//+*/').&r!c SURRSUR5SUR5SUR 5S3 $)Nrz running=z closed=z debug=r)rr is_running is_closed get_debugrs rrBaseEventLoop.__repr__sP''( $//2C1DEnn&'wt~~/?.@ C r!c*[R"US9$)z,Create a Future object attached to the loop.r)rFuturers rrBaseEventLoop.create_futures~~4((r!c UR5 URbUR"X40UD6$[R"U4SU0UD6nUR(a URS UA$!Af=f)z4Schedule a coroutine object. Return a task object. r) _check_closedr%r r_source_traceback)rcorokwargstasks r create_taskBaseEventLoop.create_tasksr     )%%d;F; ;zz$4T4V4  ! !&&r* s )A,,A/cLUb[U5(d [S5eXlg)aSet a task factory that will be used by loop.create_task(). If factory is None the default task factory will be set. If factory is a callable, it should have a signature matching '(loop, coro, **kwargs)', where 'loop' will be a reference to the active event loop, 'coro' will be a coroutine object, and **kwargs will be arbitrary keyword arguments that should be passed on to Task. The callable must return a Task. Nz'task factory must be a callable or None)callabler>r%)rfactorys rset_task_factoryBaseEventLoop.set_task_factorys&  x'8'8EF F$r!cUR$)zB) C B'CD #C%B)'C)C/B2 0 C<CADD DD ctURRSS9 UR5(d"UR[R US5 gg![ aZnUR5(d;UR5(d!URURU5 SnAgSnAgSnAgSnAff=f)NTr) rrr.ryr_set_result_unless_cancelledrrgr)rrexs rrBaseEventLoop._do_shutdownks D  " " + + + 6>>##))'*N*N*0$8$ D>>##F,<,<,>,>))&*>*>CC-?# DsAA B7AB22B7cUR5(a [S5e[R"5b [S5eg)Nz"This event loop is already runningz7Cannot run the event loop while another loop is running)r-rr_get_running_looprs r_check_runningBaseEventLoop._check_runningusA ??  CD D  # # % 1IK K 2r!c`UR5 UR5 URUR5 [R "5Ul[R"5Ul [R"URURS9 [R"U5 g)zPrepare the run loop to process events. This method exists so that custom custom event loop subclasses (e.g., event loops that integrate a GUI event loop with Python's event loop) have access to all the loop setup logic. ) firstiter finalizerN)r7r_set_coroutine_origin_tracking_debugsysget_asyncgen_hooksr"r get_identrset_asyncgen_hooksrr}r_set_running_looprs r_run_forever_setup BaseEventLoop._run_forever_setup|s   ++DKK8"557#--/ 3333   &r!cSUlSUl[R"S5 UR S5 UR b%[ R"UR 6 SUlgg)zClean up after an event loop finishes the looping over events. This method exists so that custom custom event loop subclasses (e.g., event loops that integrate a GUI event loop with Python's event loop) have access to all the loop cleanup logic. FN)rrrrrr"rrrs r_run_forever_cleanup"BaseEventLoop._run_forever_cleanups[  & ++E2    +  " "D$8$8 9#'D  ,r!cUR5 UR5 UR(aOM$UR5 g!UR5 f=f)zRun until stop() is called.N)r _run_oncerrrs r run_foreverBaseEventLoop.run_foreversJ ! ( >>  % % 'D % % 's %AAcVUR5 UR5 [R"U5(+n[R "XS9nU(aSUlUR[5 UR5 UR[5 UR5(d [S5eUR5$! U(a:UR5(a%UR5(dUR5 e=f!UR[5 f=f)a,Run until the Future is done. If the argument is a coroutine, it is wrapped in a Task. WARNING: It would be disastrous to call run_until_complete() with the same coroutine twice -- it would wrap it in two different Tasks and that can't be good. Return the Future's result, or raise its exception. r2Fz+Event loop stopped before Future completed.)r7rrisfuturer ensure_future_log_destroy_pendingadd_done_callbackrorrrgrhremove_done_callbackrr)rrnew_tasks rrun_until_complete BaseEventLoop.run_until_completes  ''//$$V7 +0F '  !78 @      ' '(> ?{{}}LM M}} FKKMM&2B2B2D2D  "   ' '(> ?s4C ADDD(cSUlg)zStop running the event loop. Every callback already scheduled will still run. This simply informs run_forever to stop looping after a complete iteration. TN)rrs rrlBaseEventLoop.stops r!cUR5(a [S5eUR(agUR(a[R "SU5 SUlUR R5 URR5 SUl URnUbSUl URSS9 gg)zClose the event loop. This clears the queues and shuts down the executor, but does not wait for the executor to finish. The event loop must not be running. z!Cannot close a running event loopNzClose %rTFr) r-rrrrdebugrrrr*rrrexecutors rrBaseEventLoop.closes ??  BC C <<  ;; LLT *   )-&))  %)D "   5  ) r!cUR$)z*Returns True if the event loop was closed.)rrs rr.BaseEventLoop.is_closeds ||r!cUR5(d7U"SU<3[US9 UR5(dUR5 ggg)Nzunclosed event loop r)r.rr-r)r_warns r__del__BaseEventLoop.__del__sC~~ (1?4 P??$$ % r!cURSL$)z*Returns True if the event loop is running.N)rrs rr-BaseEventLoop.is_runningst+,r!c,[R"5$)zReturn the time according to the event loop's clock. This is a float expressed in seconds since an epoch, but the epoch, precision, accuracy and drift are unspecified and may differ per event loop. )rrrs rrBaseEventLoop.times~~r!)contextcUc [S5eUR"UR5U-U/UQ7SU06nUR(a URS U$)aArrange for a callback to be called at a given time. Return a Handle: an opaque object with a cancel() method that can be used to cancel the call. The delay can be an int or float, expressed in seconds. It is always relative to the current time. Each callback will be called exactly once. If two callbacks are scheduled for exactly the same time, it is undefined which will be called first. Any positional arguments after the callback will be passed to the callback when it is called. zdelay must not be Nonerr6)r>call_atrr8)rdelaycallbackrrdtimers r call_laterBaseEventLoop.call_laters] =45 5 TYY[50(.T.%,.  " "''+ r!cdUc [S5eUR5 UR(a"UR5 UR US5 [ R "XX@U5nUR(a URS [R"URU5 SUl U$)zlLike call_later(), but uses an absolute time. Absolute time corresponds to the event loop's time() method. zwhen cannot be Nonerr6T) r>r7r _check_thread_check_callbackr TimerHandler8heapqheappushr)rwhenrrrdrs rrBaseEventLoop.call_ats <12 2  ;;     9 5""44wG  " "''+ t. r!cUR5 UR(a"UR5 URUS5 UR XU5nUR (a UR S U$)a$Arrange for a callback to be called as soon as possible. This operates as a FIFO queue: callbacks are called in the order in which they are registered. Each callback will be called exactly once. Any positional arguments after the callback will be passed to the callback when it is called. call_soonr6)r7rrr _call_soonr8rrrrdrs rrBaseEventLoop.call_soon1s_  ;;     ; 79  # #((, r!c[R"U5(d"U5(a[SUS35e[ U5(d[SUSU<35eg)Nzcoroutines cannot be used with z()z"a callable object was expected by z(), got )r iscoroutineiscoroutinefunctionr>r?)rrmethods rrBaseEventLoop._check_callbackDsp  " "8 , ,..x881&<> >!!4VH=l$% %"r!c[R"XX5nUR(a URS URR U5 U$)Nr6)rHandler8rrB)rrrdrrs rrBaseEventLoop._call_soonNs@xt=  # #((, 6" r!c~URcg[R"5nXR:wa [S5eg)aGCheck that the current thread is the thread running the event loop. Non-thread-safe methods of this class make this assumption and will likely behave incorrectly when the assumption is violated. Should only be called when (self._debug == True). The caller is responsible for checking this condition for performance reasons. NzMNon-thread-safe operation invoked on an event loop other than the current one)rrrr)r thread_ids rrBaseEventLoop._check_threadUs@ ?? " '')  ''( ( (r!cUR5 UR(aURUS5 URXU5nUR(a URS UR 5 U$)z"Like call_soon(), but thread-safe.ryr6)r7rrrr8rmrs rry"BaseEventLoop.call_soon_threadsafefs^  ;;  +A B9  # #((,  r!c>UR5 UR(aURUS5 UcBURnUR 5 Uc#[ R RSS9nXl[ R"UR"U/UQ76US9$)Nrun_in_executorasyncio)thread_name_prefixr2) r7rrrrv concurrentrThreadPoolExecutor wrap_futuresubmit)rrfuncrds rrBaseEventLoop.run_in_executorqs  ;;  '8 9  --H  ( ( *%--@@'0A*2&"" OOD (4 (t5 5r!cx[U[RR5(d [ S5eXlg)Nz,executor must be ThreadPoolExecutor instance)rrrrr>rrs rset_default_executor"BaseEventLoop.set_default_executors-(J$6$6$I$IJJJK K!)r!cXUSU<3/nU(aURSU<35 U(aURSU<35 U(aURSU<35 U(aURSU<35 SRU5n[R"SU5 UR 5n[ R "XX4XV5n UR 5U- n SUS U S -S S U <3nXR:a[R"U5 U $[R"U5 U $) N:zfamily=ztype=zproto=zflags=, zGet address info %szGetting address info z took g@@z.3fzms: ) rBrrrrr+ getaddrinfor#info) rrDrErFrGrHflagsmsgt0addrinfodts r_getaddrinfo_debug BaseEventLoop._getaddrinfo_debugsq!"  JJ + ,  JJth' (  JJy) *  JJy) *iin *C0 YY[%%d&M YY[2 %cU&c#d8,O ,, , KK  LL r!rrFrGrHrc # UR(a URnO[RnUR SXqX#XEU5IShvN $N7frP)rrr+rr)rrDrErFrGrHr getaddr_funcs rrBaseEventLoop.getaddrinfosN ;;22L!--L)) ,dDHH HHsAA A Ac`# URS[RX5IShvN $N7frP)rr+ getnameinfo)rsockaddrrs rrBaseEventLoop.getnameinfos/)) &$$h77 77s %.,.)fallbackcf# UR(aUR5S:wa [S5e[U5 UR XX45 UR XX45IShvN $N![ RanU(deSnAOSnAff=fURXX45IShvN $7f)Nrzthe socket must be non-blocking) r gettimeoutr,rw_check_sendfile_params_sock_sendfile_nativerSendfileNotAvailableError_sock_sendfile_fallback)rr1fileoffsetcountr!rns r sock_sendfileBaseEventLoop.sock_sendfiles ;;4??,1>? ?$ ##D> 33D4:CC CC33  11$28AAA AsNAB1A-&A+'A-*B1+A--BB B1BB1+B.,B1cH# [R"SU<SU<S35e7f)Nz-syscall sendfile is not available for socket z and file z combinationrr&rr1r(r)r*s rr%#BaseEventLoop._sock_sendfile_natives322;D8Dx| -. .s "cr# U(aURU5 U(a[U[R5O[Rn[ U5nSnU(a[XG- U5nUS::aO][ U5SUnUR SURU5IShvN n U (dO"URXSU 5IShvN Xy- nMyUUS:a&[US5(aURX7-5 $$$N\N:!US:a&[US5(aURX7-5 fff=f7f)Nrseek) r2minr!SENDFILE_FALLBACK_READBUFFER_SIZE bytearray memoryviewrreadinto sock_sendallr*) rr1r(r)r* blocksizebuf total_sentviewreads rr'%BaseEventLoop._sock_sendfile_fallbacks+  IIf  yBB C#EE  "  / #E$6 BI A~!#z 2!11$ tLL''5Dk:::" A~'$"7"7 &-.#8~M;A~'$"7"7 &-.#8~sCAD7A D%D&#D D D-D7DD.D44D7cS[USS5;a [S5eUR[R:Xd [S5eUbO[ U[ 5(d[SRU55eUS::a[SRU55e[ U[ 5(d[SRU55eUS:a[SRU55eg)Nbmodez$file should be opened in binary modez+only SOCK_STREAM type sockets are supportedz+count must be a positive integer (got {!r})rz0offset must be a non-negative integer (got {!r})) rr,rGr+r:rr=r>formatr/s rr$$BaseEventLoop._check_sendfile_paramss gdFC0 0CD DyyF...JK K  eS))AHHOQQz AHHOQQ&#&&BII  A:BII  r!c# /nUR"U5 UupVpxn Sn [R"XVUS9n U RS5 UbNUH!un pX:waMU RU 5 O) U(aUR5e[ SU<S35eURX5IShvN U S=p$![aRn SU <S[ U 5R 53n[ U RU5n URU 5 Sn A MSn A ff=fNh![a*n URU 5 U bU R5 eSn A f U bU R5 e=f!S=pf=f7f)z$Create, bind and connect one socket.NrFrGrHF*error while attempting to bind on address : z&no matching local address with family=z found) rBr+ setblockingbindr/rlowererrnopop sock_connectr)rr addr_infolocal_addr_infos my_exceptionsrFtype_rH_rXr1lfamilyladdrrnrs r _connect_sockBaseEventLoop._connect_socks} -(+4(u# .==%HD   U #+/?+GQ1(  2 %( 0@%+//11%(OyPV&WXX##D2 2 2*. -J1#2'',ir#c(..2B1CE&cii5%,,S11 2 3    %   )- -JskE):DB5,?D+D,D1E)5 D?AD D DD E %EEE!!E&&E)) rurFrHrr1 local_addrrPrrhappy_eyeballs_delay interleave all_errorsc ^^^^# U bU(d [S5eU cU(aU(d [S5eUn U bU(d [S5eU bU(d [S5eUb [U5 U bUcSnUcUGbUb [S5eTRX#4U[RXgTS9IShvN nU(d [ S 5eU b<TRX[RUUTS9IShvN mT(d [ S 5eOSmU(a [ UU5n/mU c&UHnTRTUT5IShvN n O0 O-[R"UUU4S jU5U TS 9IShvN S nUcTVVs/sHnUHnUPM M snnmU(a [S T5e[T5S:XaTS e[TS 5m[U4SjT55(aTS e[ SRSRST5555eO;Uc [S5eUR [R:wa[SU<35eTR#XXJU U S9IShvN unnTR$(a+UR'S5n[(R*"SXUUU5 UU4$GNGNGN}![ a GMf=fGNcs snnf!Smf=fNr7f)aConnect to a TCP server. Create a streaming transport connection to a given internet host and port: socket family AF_INET or socket.AF_INET6 depending on host (or family if specified), socket type SOCK_STREAM. protocol_factory must be a callable returning a protocol instance. This method is a coroutine which will try to establish the connection in the background. When successful, the coroutine returns a (transport, protocol) pair. Nz+server_hostname is only meaningful with sslz:You must set server_hostname when using ssl without a host1ssl_handshake_timeout is only meaningful with ssl0ssl_shutdown_timeout is only meaningful with sslr8host/port and sock can not be specified at the same timerFrGrHrr!getaddrinfo() returned empty listc3:># UHnU4UUU4Sjjv M g7f)c*>TRTUT5$rP)rU)rr laddr_infosrs r;BaseEventLoop.create_connection...ys$2D2D&+3r!NrQ)rRrrrcrs rrT2BaseEventLoop.create_connection..vs& ).H)1).sr2rzcreate_connection failedc3@># UHn[U5T:Hv M g7frPr)rRrnmodels rrTrfsGJSs3x50JszMultiple exceptions: {}rc38# UHn[U5v M g7frPrh)rRrns rrTrfs%E*3c#hh*sz5host and port was not specified and no sock specified"A Stream Socket was expected, got )rrr+z%r connected to %s:%r: (%r, %r))r,rw_ensure_resolvedr+r:r/rerUr staggered_raceExceptionGrouprrallrBrrG_create_connection_transportrget_extra_inforr)rrrDrErurFrHrr1rWrPrrrXrYrZinfosrsubrnrrKrrcris` @@@rcreate_connectionBaseEventLoop.create_connectionsp(  &sJK K  "s "ABB"O ,SCE E +CBD D   d #  + 0BJ  t/ NPP// V''u0NNEABB%$($9$9++5d%:%,, #!"EFF## -eZ@J#+ %H!%)%7%7&+&? ? !&(66 ). )   |-7GZc3Cc3cZG &!,-GTT:!+(m+!$JqM 2GJGGG",Q-/&&?&F&F II%E*%EE'GHH(| KMMyyF...!8ACC%)$E$E C"7!5%F%77 8 ;;++H5D LL:T9h @(""mN," ?#! ! H "&J 7sB.K$4J75=K$2J:36K$*KJ=K*K$/K0K$?KK$BKAK$/K"0AK$:K$=K K K$KK$K$KK$c 2# URS5 U"5nUR5n U(a-[U[5(aSOUn UR XXXTUUS9n OUR XU 5n U IShvN X4$N! U R 5 e=f7f)NFrOrPrr)rHrrboolrUrLr) rr1rrurPrOrrrKrrTrs rrp*BaseEventLoop._create_connection_transports #%##% !+C!6!6CJ00 '&;%9 1;I 33DFKI LL ""   OO  s0A/B2B7A?8B<B?BBBc# UR5(a [S5e[US[RR 5nU[RR La[SU<35eU[RR LaURXX45IShvN $U(d[SU<35eURXX45IShvN $N4![RanU(deSnANSSnAff=fN/7f)a Send a file to transport. Return the total number of bytes which were sent. The method uses high-performance os.sendfile if available. file must be a regular file object opened in binary mode. offset tells from where to start reading the file. If specified, count is the total number of bytes to transmit as opposed to sending the file until EOF is reached. File position is updated on return or also in case of error in which case file.tell() can be used to figure out the number of bytes which were sent. fallback set to True makes asyncio to manually read and send the file when the platform does not support the sendfile syscall (e.g. Windows or SSL socket on Unix). Raise SendfileNotAvailableError if the system does not support sendfile syscall and fallback is False. zTransport is closing_sendfile_compatiblez(sendfile is not supported for transport NzHfallback is disabled and native sendfile is not supported for transport ) rrrr _SendfileMode UNSUPPORTED TRY_NATIVE_sendfile_nativerr&_sendfile_fallback)rrr(r)r*r!rArns rsendfileBaseEventLoop.sendfiles0    ! !56 6y"8 ..::< 9**66 6:9-HJ J 9**55 5 !22939BBB ++4-9: :,,Y-3<< <B77   F' F#!F''F*rwc # [c [S5e[U[R5(d[ SU<35e[ USS5(d[ SU<S35eUR 5n[R"XX8XEUUSS9 n UR5 URU 5 URU RU5n URUR5n UIShvN U R"$N![a2 UR5 U R!5 U R!5 ef=f7f) zbUpgrade transport to TLS. Return a new transport that *protocol* should start using immediately. Nz"Python ssl module is not availablez@sslcontext is expected to be an instance of ssl.SSLContext, got _start_tls_compatibleFz transport z is not supported by start_tls())rrrQ)rurr SSLContextr>rrr SSLProtocolrrrrr BaseExceptionrr_app_transport) rrrKrTrOrPrrr ssl_protocol conmade_cb resume_cbs r start_tlsBaseEventLoop.start_tlss< ;CD D*cnn55!n&' 'y"95AAYM)IJL L##%++ J "7!5!& (  !|,^^L$@$@)L NN9#;#;<  LL***   OO            s0C$D>'C?,C=-C?1 D>=C??)rFrHr reuse_portallow_broadcastr1c n # U bU R[R:Xa[SU <35eU(d*U(d#U(dU(dU(dU(dU(aB[ X#XEUUUS9n SR SU R 555n [SU S35eU RS5 Sn GOU(d U(dUS :Xa [S 5eXE4S 44n GO[[S 5(aU[R:XaX#4H(nUcM[U[5(aM[S 5e U(aYUS S;aP[R"[R"U5R 5(a[R""U5 XE4X#444n GO0nS U4SU44HunnUcM [U[,5(a[/U5S:Xd [S5eUR1X[R2XVUS9IShvN nU(d ['S5eUH"unnnnnUU4nUU;aSS/UU'UUUU'M$ M UR 5VVs/sH(unnU(aUS cMU(aUScM$UU4PM* n nnU (d [S5e/nU HuupEunnSn Sn [R"U[R2US9n U(a [5U 5 U(a/U R7[R8[R:S5 U RS5 U(aU R=U5 U(a#U(dUR?U U5IShvN Un O US eU"5nURE5nURGU UU U5nURH(a:U(a[(RJ"SX#UU5 O[(RL"SUUU5 UIShvN UU4$![$a GNx[&a"n[(R*"SX/5 SnAGNSnAff=fGN6s snnfN![&a1nU bU RA5 URB"U5 SnAGMSnAf U bU RA5 e=fN! URA5 e=f7f)zCreate datagram connection.Nz$A datagram socket was expected, got )rW remote_addrrFrHrrrrc3F# UHupU(dMUSU3v M g7f)=NrQ)rRkvs rrT9BaseEventLoop.create_datagram_endpoint..Ys $NLDAAZs!A3ZLs !!zKsocket modifier keyword arguments can not be used when sock is specified. ()Frzunexpected address familyNNAF_UNIXzstring is expected)rz2Unable to check or remove stale UNIX socket %r: %rrrz2-tuple is expectedr_r`zcan not get address informationrEz@Datagram endpoint local_addr=%r remote_addr=%r created: (%r, %r)z2Datagram endpoint remote_addr=%r created: (%r, %r))'rGr+r:r,dictritemsrHr*rrrr>statS_ISSOCKosst_moderemoveFileNotFoundErrorr/rerrorrrrlr;r2r-r. SO_BROADCASTrIrMrrBrrYrrr) rrrWrrFrHrrrr1optsproblemsr_addraddr_pairs_inforberr addr_infosidxrrfamrRprorXkey addr_pairr local_addressremote_addressrnrKrrs rcreate_datagram_endpoint&BaseEventLoop.create_datagram_endpointGs  yyF... :4(CEEkeu/z#)e'1,;= 99$NDJJL$NN 008z<==   U #F+Q;$%@AA%+O\#B"D++&..0H'5D' 40E0E'(<==6*Q-{"B 6==)<)D)DEEIIj1&,O%/$=$?#B #$j/A{3C!DIC' *4 7 7CIN"+,A"BB&*&;&; f6G6G"'4'<'A!A %")*M"NN7<3CCG#&*C"*437, 33:JsOC0 8="E&Uc [S5eURX[(RZ:wa[SU<35eU/nUHnUR]S 5 M [_XUXU U 5nU(a.URa5 [Rb"S5IShvN UR,(a[.Rd"SU5 U$s snfGN![(R*a. UR,(a[.R0"S UUUS S 9 GMf=f![LanSU<S[U5RO5<3nURP[PRR:XaNURU5 URW5 UR,(a[.R0"U5 SnAGMI[MURPU5SeSnAff=fs snf!U(dUHnURW5 M ff=fGN]7f)aCreate a TCP server. The host parameter can be a string, in that case the TCP server is bound to host and port. The host parameter can also be a sequence of strings and in that case the TCP server is bound to all hosts of the sequence. If a host appears multiple times (possibly indirectly e.g. when hostnames resolve to the same IP address), the server is only bound once to that host. Return a Server object which can be used to stop the service. This method is a coroutine. z*ssl argument must be an SSLContext or NoneNr\r]r^posixcygwinr5)rFrFz:create_server() failed to create socket.socket(%r, %r, %r)Texc_info IPPROTO_IPV6rFrGz%could not bind on any address out of z)Neither host/port nor sock were specifiedrkrz %r is serving)3rrxr>r,rwrnamerplatformrrVabcIterablerr rsetr[r\r]r+rrrwarningrBr-r. SO_REUSEADDRr@rr2 SO_KEEPALIVErAr*r IPV6_V6ONLYrIr/rJrK EADDRNOTAVAILrLrrGr:rHrrrr)rrrDrErFrr1rrurrrrrrrhostsfsrr completedresrLsocktyperH canonnamesarrrrGs r create_serverBaseEventLoop.create_serversE: c4 HI I ,CE E + BD D   d #  t/ NPP$ "7 2 Os||x7O GrzT3'' {'?'?@@$%#d11$V8=2?# % ,,++E 55e<=EI7 % C9<6B%B!%}}R5ANN4($"--v/B/BDJ"bV^^V__,M&M&t,!"--v/B/BDJ " &//1#FN;;(;(;(.(:(:(,. @ " A!\!:?%@%$d1g%%@#CDD!  ' !(| !LMMyyF... #EdX!NOOfGD   U #'7&;,.   ! ! #++a. ;; KK 0 i%,"<<!;;"NN,G+-xO! !:# @#%c#hnn&6 899(;(;;#KKM JJL#{{ &s 3$%cii54? @&A! ' !(!( !sC*S',N6S'N; .S'R>N>6DR> PR>4R9  R>B8S'S$4S'>=P;R>?PR> R6 BR1R>R11R66R>>#S!!S')rurrc # UR[R:wa[SU<35eUbU(d [S5eUbU(d [S5eUb [ U5 UR X!USSUUS9IShvN upgUR (a)URS5n[R"SX&U5 Xg4$NC7f) Nrkr\r]r5T)rOrrr+z%r handled: (%r, %r)) rGr+r:r,rwrprrqrr)rrr1rurrrrKs rconnect_accepted_socket%BaseEventLoop.connect_accepted_socketrs 99** *A$JK K ,SCE E +CBD D   d #$($E$E C"7!5%F%77  ;;++H5D LL/( K""7sA=C?CACc# U"5nUR5nURX#U5nUIShvN UR(a&[R "SUR 5XS5 XS4$N>! UR5 e=f7f)Nz Read pipe %r connected: (%r, %r))rr^rrrrfilenorrr]rKrrs rconnect_read_pipeBaseEventLoop.connect_read_pipes}#%##%2246J  LL ;; LL;  =""   OO  +*B A3A1A3:B 1A33BB c# U"5nUR5nURX#U5nUIShvN UR(a&[R "SUR 5XS5 XS4$N>! UR5 e=f7f)Nz!Write pipe %r connected: (%r, %r))rrarrrrrrs rconnect_write_pipe BaseEventLoop.connect_write_pipes}#%##%33DFK  LL ;; LL<  =""   OO  rc~U/nUbURS[U535 Ub2U[R:XaURS[U535 O@UbURS[U535 UbURS[U535 [R "SR U55 g)Nzstdin=zstdout=stderr=zstdout=zstderr= )rBr'r#r%rrr)rrrfrgrhrs r_log_subprocessBaseEventLoop._log_subprocesssu   KK&e!4 56 7  &J,=,="= KK.f)=(>? @! gl6&:%;<=! gl6&:%;<= SXXd^$r!) rfrgrhuniversal_newlinesreriencodingerrorstextc # [U[[45(d [S5eU(a [S5eU(d [S5eUS:wa [S5eU (a [S5eU b [S5eU b [S5eU"5n SnUR(aS U-nUR XXE5 UR "XS X4XX40U D6IShvN nUR(aUb[R"S X5 X4$N27f) Nzcmd must be a string universal_newlines must be Falsezshell must be Truerbufsize must be 0text must be Falseencoding must be Noneerrors must be Nonezrun shell command %rT%s: %r) rr<rr,rrrjrr)rrcmdrfrgrhrrerirrrr:rK debug_logrs rsubprocess_shellBaseEventLoop.subprocess_shells #s|,,34 4 ?@ @12 2 a<01 1 12 2  45 5  23 3#% ;;/4I  6 B99 4KCIKK ;;90 KK) 7"" KsCD D 3D c # U(a [S5eU(a [S5eUS:wa [S5eU (a [S5eU b [S5eU b [S5eU4U -nU"5nSnUR(aSU<3nURUX4U5 UR"XS X4UU40U D6IShvN nUR(aUb[R "S UU5 UU4$N47f) Nrzshell must be Falserrrrrzexecute program Fr)r,rrrjrr)rrprogramrfrgrhrrerirrrrdr: popen_argsrKrrs rsubprocess_execBaseEventLoop.subprocess_execs ?@ @ 23 3 a<01 1 12 2  45 5  23 3Z$& #% ;;+7+6I  E6 B99 %   ;;90 KK)Y 7("" sB7C09C.:5C0cUR$)zKReturn an exception handler, or None if the default one is in use. )rrs rget_exception_handler#BaseEventLoop.get_exception_handlers&&&r!cTUb[U5(d[SU<35eXlg)asSet handler as the new event loop exception handler. If handler is None, the default exception handler will be set. If handler is a callable object, it should have a signature matching '(loop, context)', where 'loop' will be a reference to the active event loop, 'context' will be a dict object (see `call_exception_handler()` documentation for details about context). Nz+A callable object or None is expected, got )r?r>r)rhandlers rset_exception_handler#BaseEventLoop.set_exception_handlers6  x'8'8##*+/0 0")r!cURS5nU(dSnURS5nUb[U5X3R4nOSnSU;aAURb4URR(aURRUS'U/n[ U5HnUS;aM XnUS:Xa:S R [R"U55nS nXxR5- nOKUS:Xa:S R [R"U55nS nXxR5- nO [U5nURUS U35 M [R"S R U5US9 g)aDefault exception handler. This is called when an exception occurs and no exception handler is set, and can be called by a custom exception handler that wants to defer to the default behavior. This default handler logs the error message and other context-dependent information. In debug mode, a truncated stack trace is also appended showing where the given object (e.g. a handle or future or task) was created, if any. The context parameter has the same meaning as in `call_exception_handler()`. rz!Unhandled exception in event looprhNFsource_tracebackhandle_traceback>rrhr5z+Object created at (most recent call last): z+Handle created at (most recent call last): rG r)getrG __traceback__r$r8sortedr traceback format_listrstriprrBrr) rrrrhr log_linesrvaluetbs rdefault_exception_handler'BaseEventLoop.default_exception_handlersS++i(9GKK ,  Y4K4KLHH g -$$0$$66$$66 & 'I '?C..LE((WWY2259:F$**WWY2259:F$U    uBug. /#  TYYy)H=r!cURcURU5 gSnURS5nUcURS5nUcURS5nUb![US5(aUR5nUb.[US 5(aURURX5 gURX5 g![[4a e[a [ R "SSS9 gf=f![[4a e[aYnURS UUS .5 SnAg![[4a e[a [ R "S SS9 SnAgf=fSnAff=f) aCall the current event loop's exception handler. The context argument is a dict containing the following keys: - 'message': Error message; - 'exception' (optional): Exception object; - 'future' (optional): Future instance; - 'task' (optional): Task instance; - 'handle' (optional): Handle instance; - 'protocol' (optional): Protocol instance; - 'transport' (optional): Transport instance; - 'socket' (optional): Socket instance; - 'asyncgen' (optional): Asynchronous generator that caused the exception. New keys maybe introduced in the future. Note: do not overload this method in an event loop subclass. For custom exception handling, use the `set_exception_handler()` method. Nz&Exception in default exception handlerTrr;rr get_contextrunz$Unhandled error in exception handler)rrhrzeException in default exception handler while handling an unexpected error in custom exception handler) rrrirjrrrr r*rr)rrctxthingrns rr$BaseEventLoop.call_exception_handlerKsr,  " " * ,..w7$ 0 F+=$KK1E=#KK1E$ )F)F++-C?wsE':':GGD33TC++D:3 12   , E&*,  ,0 12   0022#I%(#*4 #$56$0LL"?+/000 0sGCBC92C9/C65C69E,D../E$E'#E$$E''E,c^UR(dURRU5 gg)zAdd a Handle to _ready.N) _cancelledrrBrrs r _add_callbackBaseEventLoop._add_callbacks"  KK  v &!r!cFURU5 UR5 g)z6Like _add_callback() but called from a signal handler.N)rrmrs r_add_callback_signalsafe&BaseEventLoop._add_callback_signalsafes 6" r!cRUR(aU=RS- slgg)z3Notification that a TimerHandle has been cancelled.rN)rrrs r_timer_handle_cancelled%BaseEventLoop._timer_handle_cancelleds!     ' '1 , ' r!c[UR5nU[:a{URU- [:ad/nURH.nUR (a SUlMUR U5 M0 [R"U5 X lSUlOUR(aURSR (amU=RS-sl[R"UR5nSUlUR(a URSR (aMmSnUR(dUR(aSnOTUR(aCURSRUR5- nU[:a[nOUS:aSnURR!U5nUR#U5 SnUR5UR$-nUR(auURSnURU:aOU[R"UR5nSUlURR U5 UR(aMu[UR5n['U5HnURR)5nUR (aM0UR*(asX0lUR5n UR/5 UR5U - n XR0:a![2R4"S[7U5U 5 SUlMUR/5 M Sng!SUlf=f)zRun one full iteration of the event loop. This calls all currently ready callbacks, polls for I/O, schedules the resulting callbacks, and finally schedules 'call_later' callbacks. FrrNzExecuting %s took %.3f seconds)rr_MIN_SCHEDULED_TIMER_HANDLESr%_MIN_CANCELLED_TIMER_HANDLES_FRACTIONrrBrheapifyheappoprr_whenrMAXIMUM_SELECT_TIMEOUT _selectorselectrqrrangepopleftrr$_runr#rrr ) r sched_count new_scheduledrrrpend_timentodoirrs rrBaseEventLoop._run_onces$//* 6 6  ' '+ 55 6M//$$(-F%!((0 * MM- (+O*+D '//dooa&8&C&C++q0+t7$)!//dooa&8&C&C&C  ;;$..G __ooa(..06:$26&%("=A 5 * 2"#!1H7 A(, A./4*).X59Q#14T"&!%!%$Q#j*/"&!% #8-<#'-<^1"4%*(,.2-1 .+bEID#./q267;$ D#N'(f.@.@%&a D59O####"&!%Of"&!% #<# # %&0__&0oo&0oo27%)1(,T "#J%/OOJOO%/__$)1'+Dt #D' *"0>dF0P'  - Qf :Tr!r)rr)r)7__doc__rVcollections.abcconcurrent.futuresrrKrr[rr+rr#rrr rrrru ImportErrorr5rrrrrr r r r r rrlogr__all__r&r'r*rAr+r r'r2rMrerorrrwProtocolryAbstractServerrAbstractEventLooprrQr!rrLs0      $ #),% FJ ' #J8v," 6=!!G  > A) 2 2A)HKV " "K\jTF,,jT}  CsDD D