+
    i+; c                   sH   ^ RI t ^ RIt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt ^ RIt^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^R	IHt ^R
IHt ^RIHt ^RIHt ^RIHt ^RI H!t! R!t"^dt#Rt$]%! ]R4      t&R"t'R t(R t)R t*R#R lt+R$R lt,R t-]%! ]R4      '       d   R t.MR t.R t/ ! R R]P`                  4      t1 ! R R]Pd                  4      t3 ! R  R]Ph                  4      t5R#   ] d    Rt Li ; i)%    N)	constants)
coroutines)events)
exceptions)futures)	protocols)sslproto)	staggered)tasks)timeouts)
transports)trsock)loggerBaseEventLoopServerg      ?AF_INET6c                 s    V P                   p\        \        VR R4      \        P                  4      '       d   \        VP                  4      # \        V 4      # )__self__N)Z	_callback
isinstancegetattrr	   Taskreprr   str)handleZcb   & ,/usr/lib64/python3.14/asyncio/base_events.py_format_handler   G   s@    			B'"j$/<<BKK  6{    c                 st    V \         P                  8X  d   R # V \         P                  8X  d   R# \        V 4      # )z<pipe>z<stdout>)
subprocessPIPESTDOUTr   )Zfd   &r   _format_piper    P   s+    	Z__	z  	 Bxr   c                 s    \        \        R 4      '       g   \        R4      h V P                  \        P                  \        P
                  ^4       R#   \         d    \        R4      hi ; i)SO_REUSEPORTz)reuse_port not supported by socket modulezTreuse_port not supported by socket module, SO_REUSEPORT defined but not implemented.N)hasattrsocket
ValueError
setsockopt
SOL_SOCKETr!   OSErrorsockr   r   _set_reuseportr*   Y   sc    6>**DEE	JOOF--v/B/BAF 	J I J J	Js   /A A+c           	      s   \        \        R 4      '       g   R# V^ \        P                  \        P                  09  g   V f   R# V\        P                  8X  d   \        P                  pM(V\        P
                  8X  d   \        P                  pMR# Vf   ^ pML\        V\        4      '       d   VR8X  d   ^ pM,\        V\        4      '       d   VR8X  d   ^ pM \        V4      pV\        P                  8X  d>   \        P                  .p\        '       d    VP                  \        P                   4       MV.p\        V \        4      '       d   V P#                  R4      p RV 9   d   R# V FL  p \        P$                  ! W4       \        '       d    V\        P                   8X  d   WVRWWV33u # WVRW33u # 	  R#   \        \        3 d     R# i ; i  \&         d     Kx  i ; i)	inet_ptonNr    ZidnaZ%)r"   r#   IPPROTO_TCPZIPPROTO_UDPSOCK_STREAM
SOCK_DGRAMr   bytesr   int	TypeErrorr$   	AF_UNSPECAF_INET	_HAS_IPv6appendr   Zdecoder+   r'   )	hostportfamilytypeprotoZflowinfoZscopeidZafsafs	   &&&&&&&  r   _ipaddr_infor=   d   s    6;''Q**F,>,>??Lv!!!""	""	"""|	D%	 	 TS[	D#		42:	t9D !!!~~9JJv'h${{6"
d{ 	R&yR6??2T,KKKTL88  ; :& 		2  		s*   F? 1>G2G?GGG&%G&c           	      s   \         P                  ! 4       pV  F-  pV^ ,          pWB9  d   . W$&   W$,          P                  V4       K/  	  \        VP	                  4       4      p. pV^8  d6   VP                  V^ ,          RV^,
           4       V^ ,          RV^,
          1 VP                  R \        P                  P                  \        P                  ! V!  4       4       4       V# )r    Nc              3   s2   "   T F  pVf   K	  Vx  K  	  R # 5iN ).0Zar   r   	<genexpr>Z(_interleave_addrinfos.<locals>.<genexpr>   s       
a 	
 
s   
)
collectionsZOrderedDictr6   listZvaluesZextend	itertoolschainfrom_iterableZzip_longest)Z	addrinfosZfirst_address_family_countZaddrinfos_by_familyaddrr9   Zaddrinfos_listsZ	reordereds   &&     r   _interleave_addrinfosrH      s     &113a,*,'#**40	 
 .5578OI!A%+,K-G!-KLMA> :Q >>? ??00!!?3
  r   c                 s    V P                  4       '       g/   V P                  4       p\        V\        \        34      '       d   R # \
        P                  ! V 4      P                  4        R # r>   )	cancelled	exceptionr   
SystemExitKeyboardInterruptr   Z	_get_loopstop)futexcr   r   _run_until_complete_cbrP      sG    ==??mmocJ(9:;; c!r   TCP_NODELAYc                 sJ   V P                   \        P                  \        P                  09   dt   V P                  \        P
                  8X  dS   V P                  \        P                  8X  d2   V P                  \        P                  \        P                  ^4       R# R# R# R#    N)
r9   r#   r4   r   r:   r.   r;   r-   r%   rQ   r(   r   r   _set_nodelayrT      sj    KKFNNFOO<<		V///

f000OOF..0B0BAF 1 0 =r   c                 s    R # r>   r?   r(   r   r   rT   rT      s    r   c                 sp    \         e.   \        V \         P                  4      '       d   \        R4      hR # R # )Nz"Socket cannot be of type SSLSocket)sslr   Z	SSLSocketr2   r(   r   r   _check_ssl_socketrV      s*    
:dCMM::<== ;r   c                   sV   a  ] tR t^t o R tR tR tR tR tR t	R t
R tR	 tR
tV tR# )_SendfileFallbackProtocolc                s   \        V\        P                  4      '       g   \        R 4      hWn        VP                  4       V n        VP                  4       V n        VP                  V n
        VP                  4        VP                  V 4       V P                  '       d,   V P                  P                  P                  4       V n        R# RV n        R# )z.transport should be _FlowControlMixin instanceN)r   r   Z_FlowControlMixinr2   
_transportZget_protocol_protoZ
is_reading_should_resume_readingZ_protocol_paused_should_resume_writingpause_readingset_protocol_loopcreate_future_write_ready_fut)selftransp   &&r   __init__Z"_SendfileFallbackProtocol.__init__   s    &*">">??LMM ))+&,&7&7&9#&,&=&=#D!&&&$(OO$9$9$G$G$ID!$(D!r   c                s   "   V P                   P                  4       '       d   \        R 4      hV P                  pVf   R# VG Rj  xL
  R#  L5i)zConnection closed by peerN)rX   
is_closingConnectionErrorr`   )ra   rN   r   r   drainZ_SendfileFallbackProtocol.drain   s>     ??%%''!"=>>##;		s   AAAAc                    \        R 4      h)z?Invalid state: connection should have been established already.RuntimeErrorra   	transportrc   r   connection_madeZ)_SendfileFallbackProtocol.connection_made   s     N O 	Or   c                s    V P                   eE   Vf&   V P                   P                  \        R4      4       MV P                   P                  V4       V P                  P	                  V4       R # )NzConnection is closed by peer)r`   set_exceptionrf   rY   connection_lost)ra   rO   rc   r   ro   Z)_SendfileFallbackProtocol.connection_lost   s[      , {%%33#$BCE %%33C8##C(r   c                sx    V P                   e   R # V P                  P                  P                  4       V n         R # r>   )r`   rX   r^   r_   ra   r   r   pause_writingZ'_SendfileFallbackProtocol.pause_writing   s,      , $ 5 5 C C Er   c                sj    V P                   f   R # V P                   P                  R4       R V n         R # NF)r`   
set_resultrp   r   r   resume_writingZ(_SendfileFallbackProtocol.resume_writing   s-      (((/ $r   c                rh   z'Invalid state: reading should be pausedri   )ra   Zdatarc   r   data_receivedZ'_SendfileFallbackProtocol.data_received       DEEr   c                rh   ru   ri   rp   r   r   eof_receivedZ&_SendfileFallbackProtocol.eof_received  rw   r   c                s\  "   V P                   P                  V P                  4       V P                  '       d   V P                   P	                  4        V P
                  e   V P
                  P                  4        V P                  '       d   V P                  P                  4        R # R # 5ir>   )	rX   r]   rY   rZ   resume_readingr`   cancelr[   rt   rp   r   r   restoreZ!_SendfileFallbackProtocol.restore  sx     $$T[[1&&&OO**,  , !!((*&&&KK&&( 's   BB,B,)rY   rZ   r[   rX   r`   N)__name__
__module____qualname____firstlineno__rd   rg   rm   ro   rq   rt   rv   rx   r{   __static_attributes____classdictcell__Z__classdict__   @r   rW   rW      s;     )O	)F
%FF
) 
)r   rW   c                   s   a  ] tR tRt o RR ltR tR tR tR tR t	R	 t
R
 t]R 4       tR tR tR tR tR tR tRtV tR# )r   i  Nc                s    Wn         W n        \        P                  ! 4       V n        . V n        W0n        WPn        W@n        W`n	        Wpn
        R V n        RV n        R# FN)r^   _socketsweakrefWeakSet_clients_waiters_protocol_factory_backlog_ssl_context_ssl_handshake_timeout_ssl_shutdown_timeout_serving_serving_forever_fut)ra   loopsocketsprotocol_factoryZssl_contextbacklogssl_handshake_timeoutssl_shutdown_timeouts   &&&&&&&&r   rd   ZServer.__init__  sO    
  )!1'&;#%9"$(!r   c                sR    R V P                   P                   RV P                  : R2# )<z	 sockets=>)	__class__r|   r   rp   r   r   __repr__ZServer.__repr__%  s'    4>>**+9T\\4DAFFr   c                s<    V P                   P                  V4       R # r>   )r   addrk   rc   r   _attachZServer._attach(  s    )$r   c                s    V P                   P                  V4       \        V P                   4      ^ 8X  d#   V P                  f   V P	                  4        R# R# R# r    N)r   discardlenr   _wakeuprk   rc   r   _detachZServer._detach,  s?    i(t}}"t}}'<LLN (="r   c                s    V P                   pR V n         V F,  pVP                  4       '       d   K  VP                  R 4       K.  	  R # r>   )r   doners   )ra   Zwaiterswaiter   &  r   r   ZServer._wakeup1  s5    --F;;==!!$' r   c           
     s:   V P                   '       d   R # RV n         V P                   Fo  pVP                  V P                  4       V P                  P                  V P                  WP                  W P                  V P                  V P                  4       Kq  	  R # )NT)
r   r   Zlistenr   r^   _start_servingr   r   r   r   )ra   r)   r   r   r   ZServer._start_serving8  sn    ===MMDKK&JJ%%&&.?.?mmT%@%@**, "r   c                    V P                   # r>   )r^   rp   r   r   get_loopZServer.get_loopC  s    zzr   c                r   r>   )r   rp   r   r   
is_servingZServer.is_servingF  s    }}r   c                s    V P                   f   R# \        ;QJ d    . R V P                    4       F  NK  	  5# ! R V P                    4       4      # )Nc              3   sN   "   T F  p\         P                  ! V4      x  K  	  R # 5ir>   )r   ZTransportSocket)r@   Zsr   r   rA   Z!Server.sockets.<locals>.<genexpr>M  s     F1V++A..s   #%r?   )r   tuplerp   r   r   r   ZServer.socketsI  s;    == IuFFuFuFFFFr   c                s   V P                   pVf   R # R V n         V F  pV P                  P                  V4       K   	  RV n        V P                  eB   V P                  P                  4       '       g"   V P                  P                  4        R V n        \        V P                  4      ^ 8X  d   V P                  4        R # R # rr   )
r   r^   Z_stop_servingr   r   r   rz   r   r   r   )ra   r   r)   r   r   closeZServer.closeO  s    --?DJJ$$T*  %%1--2244%%,,.(,D%t}}"LLN #r   c                h    V P                   P                  4        F  pVP                  4        K  	  R # r>   )r   copyr   rk   r   r   close_clientsZServer.close_clientsb  #    ++-IOO .r   c                r   r>   )r   r   Zabortrk   r   r   abort_clientsZServer.abort_clientsf  r   r   c                sn   "   V P                  4        \        P                  ! ^ 4      G Rj  xL
  R#  L5ir   )r   r	   sleeprp   r   r   start_servingZServer.start_servingj  s$      kk!ns   *535c                s  "   V P                   e   \        RV : R24      hV P                  f   \        RV : R24      hV P                  4        V P                  P                  4       V n          V P                   G R j  xL
   R T n         R #  L  \        P                   d2     T P                  4        T P                  4       G R j  xL 
  h   h ; ii ; i  R T n         i ; i5i)Nzserver z, is already being awaited on serve_forever()z
 is closed)
r   rj   r   r   r^   r_   r   ZCancelledErrorr   wait_closedrp   r   r   serve_foreverZServer.serve_foreverp  s     $$0$!MNP P== 
;<<$(JJ$<$<$>!		-++++ )-D% ,(( 	

&&(((	 )-D%s`   A,C$/B >B?B 	C$B C%#CC	CCCCC 	C!!C$c                s   "   V P                   f   R # V P                  P                  4       pV P                   P                  V4       VG R j  xL
  R #  L5ir>   )r   r^   r_   r6   )ra   r   r   r   r   ZServer.wait_closed  s?     * == ))+V$s   AAAA)r   r   r^   r   r   r   r   r   r   r   r   r>   )r|   r}   r~   r   rd   r   r   r   r   r   r   r   Zpropertyr   r   r   r   r   r   r   r   r   r   r   r   r   r     sg     ) G%
(	, G G
&-* r   c                   sj  a  ] tR tRt o R tR tR tR tR tR t	RtR	RR
R/R llt
RtRRRRR	RR
RRRRRRR/R lltRuR ltRvR ltRvR ltRtR ltR tR tR tR tR tR tR tRtR ltR  tR! tR" tR# tR$ tR% tR& tR' tR( t ]!PD                  3R) lt#R* t$R+ t%R,R/R- lt&R,R/R. lt'R,R/R/ lt(R0 t)R1 t*R2 t+R,R/R3 lt,R4 t-R5 t.R6 t/R7^ R8^ R9^ R:^ /R; lt0RwR< lt1RxR=R/R> llt2R? t3R@ t4RA t5RtRB lt6RvRCRR7^ R9^ R:^ RDRRERRRRRRRRFRRGRRHR/RI llt7RyRJ lt8RxR=R/RK llt9RL t:RM t;RRRRRRRR/RN lt<RvR7^ R9^ R:^ RORRPRRDR/RQ llt=R7^ R8]>P~                  R9^ R:^ /RR lt@RS tARvR7]>P                  R:]>P                  RDRRT^dRCRRURRORRVRRRRRRWR/RX lltDRCRRRRR/RY ltERZ tFR[ tGR\ tHR]]IP                  R^]IP                  R_]IP                  R`RRaRRb^ RcRRdRReR/	Rf ltKR]]IP                  R^]IP                  R_]IP                  R`RRaRRb^ RcRRdRReR/	Rg ltLRh tMRi tNRj tORk tPRl tQRm tRRn tSRo tTRp tURq tVRr tWRstXV tYR# )zr   i  c                s   ^ V n         RV n        RV n        \        P                  ! 4       V n        . V n        RV n        ^ V n        RV n	        \        P                  ! R4      P                  V n        RV n        V P                  \         P"                  ! 4       4       RV n        RV n        RV n        RV n        RV n        RV n        \0        P2                  ! 4       V n        RV n        RV n        R# )r    FN	monotonicg?)_timer_cancelled_count_closed	_stoppingrB   Zdeque_ready
_scheduled_default_executor_internal_fds
_thread_idtimeZget_clock_infoZ
resolution_clock_resolution_exception_handler	set_debugr   Z_is_debug_mode_old_agen_hooksslow_callback_duration_current_handle_task_factory"_coroutine_origin_tracking_enabled&_coroutine_origin_tracking_saved_depthr   r   
_asyncgens_asyncgens_shutdown_called_executor_shutdown_calledrp   r   r   rd   ZBaseEventLoop.__init__  s    &'#!'')!% !%!4!4[!A!L!L"&z0023# '*##!27/6:3 "//+*/').&r   c           	     s    R V P                   P                   RV P                  4        RV P                  4        RV P	                  4        R2	# )r   z	 running=z closed=z debug=r   )r   r|   
is_running	is_closed	get_debugrp   r   r   r   ZBaseEventLoop.__repr__  sP    ''(	$//2C1D Enn&'wt~~/?.@C	
r   c                s0    \         P                  ! V R 7      # )r   )r   ZFuturerp   r   r   r_   ZBaseEventLoop.create_future  s    ~~4((r   c                s    V P                  4        V P                  e   V P                  ! W3/ VB # \        P                  ! V3RV /VB pVP                  '       d   VP                  R  T?#   ?i ; i)Nr   )_check_closedr   r	   r   _source_traceback)ra   Zcorokwargstasks   &&, r   create_taskZBaseEventLoop.create_task  su    
 	)%%d;F;;zz$4T4V4!!!&&r*	 s   +A. .A1c                sR    Ve   \        V4      '       g   \        R4      hWn        R # )Nz'task factory must be a callable or None)callabler2   r   )ra   Zfactoryrc   r   set_task_factoryZBaseEventLoop.set_task_factory  s&     x'8'8EFF$r   c                r   r>   )r   rp   r   r   get_task_factoryZBaseEventLoop.get_task_factory  s    !!!r   Nextraserverc                   \         hr>   ZNotImplementedError)ra   r)   protocolr   r   r   s   &&&&$$r   _make_socket_transportZ$BaseEventLoop._make_socket_transport  
     "!r   server_sideFserver_hostnamer   r   call_connection_madeTc               r   r>   r   )ra   Zrawsockr   
sslcontextr   r   r   r   r   r   r   r   s   &&&&&$$$$$$$r   _make_ssl_transportZ!BaseEventLoop._make_ssl_transport  s
     "!r   c                r   r>   r   )ra   r)   r   addressr   r   s   &&&&&&r   _make_datagram_transportZ&BaseEventLoop._make_datagram_transport  r   r   c                r   r>   r   ra   piper   r   r      &&&&&r   _make_read_pipe_transportZ'BaseEventLoop._make_read_pipe_transport  r   r   c                r   r>   r   r   r   r   _make_write_pipe_transportZ(BaseEventLoop._make_write_pipe_transport  r   r   c	                s   "   \         h5ir>   r   )
ra   r   argsshellstdinstdoutstderrbufsizer   r   s
   &&&&&&&&&,r   _make_subprocess_transportZ(BaseEventLoop._make_subprocess_transport  s      "!s   	c                r   r>   r   rp   r   r   _write_to_selfZBaseEventLoop._write_to_self  s
     "!r   c                r   r>   r   )ra   
event_listrc   r   _process_eventsZBaseEventLoop._process_events   s    !!r   c                @    V P                   '       d   \        R 4      hR# )zEvent loop is closedN)r   rj   rp   r   r   r   ZBaseEventLoop._check_closed$  s    <<<566 r   c                r   )z!Executor shutdown has been calledN)r   rj   rp   r   r   _check_default_executorZ%BaseEventLoop._check_default_executor(  s    )))BCC *r   c                s    V P                   P                  V4       V P                  4       '       g-   V P                  V P                  VP                  4       4       R # R # r>   )r   r   r   call_soon_threadsafer   aclosera   agenrc   r   _asyncgen_finalizer_hookZ&BaseEventLoop._asyncgen_finalizer_hook,  sB    %~~%%d&6&6F  r   c                s    V P                   '       d#   \        P                  ! R V: R2\        V R7       V P                  P                  V4       R# )zasynchronous generator z3 was scheduled after loop.shutdown_asyncgens() callZsourceN)r   warningswarnResourceWarningr   r   r   rc   r   _asyncgen_firstiter_hookZ&BaseEventLoop._asyncgen_firstiter_hook1  sD    ***MM)$ 21 2.
 	D!r   c           	     s  "   R V n         \        V P                  4      '       g   R# \        V P                  4      pV P                  P	                  4        \
        P                  ! V Uu. uF  q"P                  4       NK  	  upRR / G Rj  xL
 p\        W14       F8  w  rE\        V\        4      '       g   K  V P                  RRV: 2RVRV/4       K:  	  R# u upi  LR5i)TNZreturn_exceptionsmessagez;an error occurred during closing of asynchronous generator rJ   Zasyncgen)r   r   r   rC   clearr	   gatherr   Zzipr   	Exceptioncall_exception_handler)ra   Zclosing_agensZagZresultsresultr   s   &     r   shutdown_asyncgensZ BaseEventLoop.shutdown_asyncgens:  s     *.'4??## T__-$12MbiikM2$"$ $  7LF&),,++ "99= B	-  8 3$s$   A(C!*C
C!C'C!9'C!c                sH  "   R V n         V P                  f   R# V P                  4       p\        P                  ! V P
                  V3R7      pVP                  4         \        P                  ! V4      ;_uu_4       GRj  xL
  VG Rj  xL
  RRR4      GRj  xL
  VP                  4        R#  L0 L( L  + GRj  xL 
 '       g   i     L1; i  \         dB    \        P                  ! RT R2\        ^R7       T P                  P                  RR7        R# i ; i5i)TN)Ztargetr   z:The executor did not finishing joining its threads within z	 seconds.)Z
stacklevelFZwait)r   r   r_   	threadingZThread_do_shutdownZstartr
   timeoutjoinTimeoutErrorr   r   ZRuntimeWarningshutdown)ra   r
  futureZthreads   &&  r   shutdown_default_executorZ'BaseEventLoop.shutdown_default_executorS  s      *.&!!)##%!!):):&K		''000 10 KKM 1 1000 	8MM 007y	C(Q8 ""+++7		8s   AD""C  B1C B7
B3B7C B5C D"1C 3B75C 7C	=C >
C		C	C ADD"DD"c                s    V P                   P                  R R7       V P                  4       '       g$   V P                  \        P
                  VR4       R# R#   \         d`   pT P                  4       '       g?   TP                  4       '       g#   T P                  TP                  T4        Rp?R#  Rp?R#  Rp?R# Rp?ii ; i)Tr  N)	r   r  r   r   r   Z_set_result_unless_cancelledr  rI   rn   )ra   r  Zex   && r   r	  ZBaseEventLoop._do_shutdownk  s    	D""+++6>>##))'*N*N*0$8 $  	D>>##F,<,<,>,>))&*>*>CC -?#	Ds"   1A !A C$+B>B>>Cc                s    V P                  4       '       d   \        R 4      h\        P                  ! 4       e   \        R4      hR# )z"This event loop is already runningNz7Cannot run the event loop while another loop is running)r   rj   r   Z_get_running_looprp   r   r   _check_runningZBaseEventLoop._check_runningu  sA    ??CDD##%1IK K 2r   c                sh   V P                  4        V P                  4        V P                  V P                  4       \        P
                  ! 4       V n        \        P                  ! 4       V n	        \        P                  ! V P                  V P                  R 7       \        P                  ! V 4       R# ))Z	firstiterZ	finalizerN)r   r  _set_coroutine_origin_tracking_debugsysZget_asyncgen_hooksr   r  	get_identr   set_asyncgen_hooksr   r   r   _set_running_looprp   r   r   _run_forever_setupZ BaseEventLoop._run_forever_setup|  s     	++DKK8"557#--/3333	

 	  &r   c                s    R V n         RV n        \        P                  ! R4       V P	                  R 4       V P
                  e(   \        P                  ! V P
                  !   RV n        R# R# r   )r   r   r   r  r  r   r  r  rp   r   r   _run_forever_cleanupZ"BaseEventLoop._run_forever_cleanup  s[       &++E2+""D$8$89#'D  ,r   c                s    V P                  4          V P                  4        V P                  '       g   K%   T P                  4        R#   T P                  4        i ; iTN)r  	_run_oncer   r  rp   r   r   run_foreverZBaseEventLoop.run_forever  sE    !	( >>>%%'D%%'s    A
 A
 
Ac                sf   V P                  4        V P                  4        \        P                  ! V4      '       * p\        P
                  ! WR 7      pV'       d   RVn        VP                  \        4        V P                  4         TP                  \        4       TP                  4       '       g   \        R4      hTP                  4       #    T'       d=   TP                  4       '       d'   TP                  4       '       g   TP                  4        h ; i  TP                  \        4       i ; i)r   Fz+Event loop stopped before Future completed.)r   r  r   Zisfuturer	   Zensure_futureZ_log_destroy_pendingZadd_done_callbackrP   r  r   rI   rJ   Zremove_done_callbackrj   r  )ra   r  Znew_taskr  r   run_until_completeZ BaseEventLoop.run_until_complete  s     	''//$$V7 +0F'  !78
	@ ''(>?{{}}LMM}}	FKKMM&2B2B2D2D   "''(>?s$   8C D/DDD D0c                s    R V n         R# r  )r   rp   r   r   rM   ZBaseEventLoop.stop  s     r   c                s   V P                  4       '       d   \        R 4      hV P                  '       d   R# V P                  '       d   \        P
                  ! RV 4       RV n        V P                  P                  4        V P                  P                  4        RV n	        V P                  pVe   RV n
        VP                  RR7       R# R# )z!Cannot close a running event loopNzClose %rTFr  )r   rj   r   r  r   debugr   r  r   r   r   r  ra   executorr   r   r   ZBaseEventLoop.close  s     ??BCC<<<;;;LLT*)-&))%)D"5)  r   c                r   r>   )r   rp   r   r   r   ZBaseEventLoop.is_closed  s    ||r   c                s    V P                  4       '       g>   V! R V : 2\        V R7       V P                  4       '       g   V P                  4        R# R# R# )zunclosed event loop r   N)r   r   r   r   )ra   Z_warnrc   r   __del__ZBaseEventLoop.__del__  sC    ~~(1?4P??$$

 %  r   c                s    V P                   R J# r>   )r   rp   r   r   r   ZBaseEventLoop.is_running  s    t+,r   c                s,    \         P                  ! 4       # r>   )r   r   rp   r   r   r   ZBaseEventLoop.time  s     ~~r   contextc               s    Vf   \        R4      hV P                  ! V P                  4       V,           V.VO5RV/ pVP                  '       d   VP                  R V# )Nzdelay must not be Noner"  r   )r2   call_atr   r   )ra   Zdelaycallbackr"  r   timer   &&&$* r   
call_laterZBaseEventLoop.call_later  s`      =455TYY[50( .T .%,."""''+r   c               sj   Vf   \        R4      hV P                  4        V P                  '       d#   V P                  4        V P	                  VR4       \
        P                  ! WW@V4      pVP                  '       d   VP                  R \        P                  ! V P                  V4       RVn
        V# )Nzwhen cannot be Noner#  Tr   )r2   r   r  _check_thread_check_callbackr   ZTimerHandler   heapqZheappushr   )ra   Zwhenr$  r"  r   r%  r&  r   r#  ZBaseEventLoop.call_at  s    
 <122;;;   95""44wG"""''+t.r   c               s    V P                  4        V P                  '       d#   V P                  4        V P                  VR 4       V P	                  WV4      pVP
                  '       d   VP
                  R V# )	call_soonr   )r   r  r(  r)  
_call_soonr   ra   r$  r"  r   r      &&$* r   r+  ZBaseEventLoop.call_soon1  sd     	;;;   ;79###((,r   c                s    \         P                  ! V4      '       g   \         P                  ! V4      '       d   \        R V R24      h\	        V4      '       g   \        RV RV: 24      hR# )zcoroutines cannot be used with z()z"a callable object was expected by z(), got N)r   ZiscoroutineZ_iscoroutinefunctionr2   r   )ra   r$  Zmethod   &&&r   r)  ZBaseEventLoop._check_callbackD  sp    ""8,,//991&<> >!!4VH =l$% % "r   c                s    \         P                  ! WW4      pVP                  '       d   VP                  R V P                  P	                  V4       V# )rS   r   )r   ZHandler   r   r6   )ra   r$  r   r"  r   s   &&&& r   r,  ZBaseEventLoop._call_soonN  sC    xt=###((,6"r   c                s    V P                   f   R # \        P                  ! 4       pWP                   8w  d   \        R4      hR # )NzMNon-thread-safe operation invoked on an event loop other than the current one)r   r  r  rj   )ra   Z	thread_idr   r   r(  ZBaseEventLoop._check_threadU  s@     ??"'')	''( ( (r   c               sn   V P                  4        V P                  '       d   V P                  VR 4       \        P                  ! WW4      pV P
                  P                  V4       VP                  '       d   VP                  R VP                  '       d   VP                  R V P                  4        V# )r   r   )	r   r  r)  r   Z_ThreadSafeHandler   r6   r   r   r-  r.  r   r   Z"BaseEventLoop.call_soon_threadsafef  s    ;;;  +AB))($H6"###((,###((,r   c                sR   V P                  4        V P                  '       d   V P                  VR 4       VfG   V P                  pV P	                  4        Vf'   \
        P                  P                  RR7      pWn        \        P                  ! VP                  ! V.VO5!  V R7      # )run_in_executorZasyncio)Zthread_name_prefixr   )
r   r  r)  r   r   
concurrentr   ThreadPoolExecutorZwrap_futureZsubmit)ra   r   Zfuncr   s   &&&*r   r0  ZBaseEventLoop.run_in_executort  s    ;;;  '89--H((*%--@@'0 A  *2&""OOD(4(t5 	5r   c                s|    \        V\        P                  P                  4      '       g   \	        R 4      hWn        R# )z,executor must be ThreadPoolExecutor instanceN)r   r1  r   r2  r2   r   r  rc   r   set_default_executorZ"BaseEventLoop.set_default_executor  s-    (J$6$6$I$IJJJKK!)r   c                sr   V R V: 2.pV'       d   VP                  RV: 24       V'       d   VP                  RV: 24       V'       d   VP                  RV: 24       V'       d   VP                  RV: 24       RP                  V4      p\        P                  ! RV4       V P	                  4       p\
        P                  ! WW4WV4      p	V P	                  4       V,
          p
RV RV
R	,          R
 RV	: 2pWP                  8  d   \        P                  ! V4       V	# \        P                  ! V4       V	# )Z:zfamily=ztype=zproto=zflags=, zGet address info %szGetting address info z took g     @@z.3fzms: )	r6   r  r   r  r   r#   getaddrinfor   info)ra   r7   r8   r9   r:   r;   flagsmsgt0addrinfodts   &&&&&&&    r   _getaddrinfo_debugZ BaseEventLoop._getaddrinfo_debug  s   q!"JJ
+,JJth'(JJy)*JJy)*iin*C0YY[%%d&MYY[2%cU&c#d8,O,,,KK  LLr   r9   r:   r;   r7  c          
     s   "   V P                   '       d   V P                  pM\        P                  pV P	                  R WqW#WEV4      G R j  xL
 #  L5ir>   )r  r<  r#   r5  r0  )ra   r7   r8   r9   r:   r;   r7  Zgetaddr_funcs   &&&$$$$ r   r5  ZBaseEventLoop.getaddrinfo  sP     ;;;22L!--L)),dDH H 	H Hs   AA
AAc                s`   "   V P                  R \        P                  W4      G R j  xL
 #  L5ir>   )r0  r#   getnameinfo)ra   Zsockaddrr7  r/  r   r=  ZBaseEventLoop.getnameinfo  s/     ))&$$h7 7 	7 7s   %.,.fallbackc               sn  "   V P                   '       d!   VP                  4       ^ 8w  d   \        R4      h\        V4       V P	                  WW44        V P                  WW44      G Rj  xL
 #  L  \        P                   d   pT'       g   h  Rp?MRp?ii ; iT P                  YY44      G Rj  xL 
 # 5i)r    zthe socket must be non-blockingN)	r  Z
gettimeoutr$   rV   _check_sendfile_params_sock_sendfile_nativer   SendfileNotAvailableError_sock_sendfile_fallback)ra   r)   fileoffsetcountr>  rO   s   &&&&&$ r   sock_sendfileZBaseEventLoop.sock_sendfile  s     ;;;4??,1>??$##D>	33D4:C C C C33 	 	 11$28A A A 	AsN   AB5A/ (A-)A/ ,B5-A/ /B	BB5BB5/B20B5c                sH   "   \         P                  ! R V: RV: R24      h5i)z-syscall sendfile is not available for socket z
 and file z combinationr   rA  ra   r)   rC  rD  rE  r   r   r@  Z#BaseEventLoop._sock_sendfile_native  s3      22;D8 Dx|-. 	.s    "c                s  "   V'       d   VP                  V4       V'       d   \        V\        P                  4      M\        P                  p\	        V4      p^ p  V'       d   \        WG,
          V4      pV^ 8:  d   Mb\        V4      RV pV P                  RVP                  V4      G Rj  xL
 p	V	'       g   M&V P                  WRV	 4      G Rj  xL
  Wy,          pK  TV^ 8  d,   \        VR4      '       d   VP                  W7,           4       # # #  Lg LD  T^ 8  d,   \        TR4      '       d   TP                  Y7,           4       i i i ; i5i)r    Nseek)
rI  minr   Z!SENDFILE_FALLBACK_READBUFFER_SIZE	bytearray
memoryviewr0  readintoZsock_sendallr"   )
ra   r)   rC  rD  rE  	blocksizebuf
total_sentviewreads
   &&&&&     r   rB  Z%BaseEventLoop._sock_sendfile_fallback  s$    IIf  yBBC#EE 	 	"
	/ #E$6	 BI A~!#z	2!11$tLL''5Dk:::"
A~'$"7"7		&-. #8~ M ; A~'$"7"7		&-. #8~sS   !E7ED %AD -D.D :D DD "3ED D 4EEc                s   R \        VRR 4      9  d   \        R4      hVP                  \        P                  8X  g   \        R4      hVeR   \        V\        4      '       g   \        RP                  V4      4      hV^ 8:  d   \        RP                  V4      4      h\        V\        4      '       g   \        RP                  V4      4      hV^ 8  d   \        RP                  V4      4      hR# )Zbmodez$file should be opened in binary modez+only SOCK_STREAM type sockets are supportedNz+count must be a positive integer (got {!r})z0offset must be a non-negative integer (got {!r}))	r   r$   r:   r#   r.   r   r1   r2   formatrH  r   r   r?  Z$BaseEventLoop._check_sendfile_params  s    gdFC00CDDyyF...JKKeS))AHHOQ Qz AHHOQ Q&#&&BII  A:BII  r   c                s  "   . pVP                   ! V4       Vw  rVrxp	R p
  \        P                  ! WVVR7      p
V
P                  R4       VeQ   V F"  w  p  rW8w  d   K   V
P                  V4        M*	  V'       d   VP                  4       h\	        RV: R24      hV P                  W4      G R j  xL
  V
R ;r#   \         dS   pRT: R\        T4      P                  4        2p\	        TP                  T4      pTP                  T4        R p?K  R p?ii ; i Li  \         d   pTP                  T4       h R p?ii ; i   T
e$    T
P                  4        h   \         d     h i ; ih ; i  R ;ri ; i5i)Nr9   r:   r;   F*error while attempting to bind on address : z&no matching local address with family=z found)r6   r#   setblockingbindr'   r   lowererrnopopsock_connectr   )ra   r   Z	addr_infoZlocal_addr_infosZmy_exceptionsr9   Ztype_r;   _r   r)   ZlfamilyZladdrrO   r8  s   &&&&           r   _connect_sockZBaseEventLoop._connect_sock  s    -(+4(u(	.}}FeL  '#/3C/Aq",$	6 IIe,! 4D )"/"3"3"55"),SF9TZ*["\\''666 *.-J9  ' 6#++0)2c#hnn6F5G!I   #*#))S"9C)00556 7 $$S)		JJL    
 )--Js   E8?D !B<2D >4D 2D3D 8E8<DADD DD E )D;;E  E E-
EE-E)&E-(E))E--E0 0E55E8rU   r)   
local_addrhappy_eyeballs_delay
interleave
all_errorsc          	     s  a aaa"   V
e   V'       g   \        R4      hV
f   V'       d   V'       g   \        R4      hTp
Ve   V'       g   \        R4      hVe   V'       g   \        R4      hVe   \        V4       Ve   Vf   ^pVf   VEe   Ve   \        R4      hS P                  W#3V\        P                  WgS R7      G R j  xL
 pV'       g   \        R4      hV	eA   S P                  W\        P                  VVS R7      G R j  xL
 oS'       g   \        R4      hMR oV'       d   \        VV4      p. oVf'   V F  p S P                  SVS4      G R j  xL
 p M7	  M4\        P                  ! VVV 3R lV 4       VS R	7      G R j  xL
 ^ ,          pVf   S UUu. uF  pV F  pVNK  	  K  	  uppo V'       d   \        R
S4      h\        S4      ^8X  d
   S^ ,          hS'       d   \        S^ ,          4      o\        ;QJ d    V3R lS 4       F  '       d   K   RM	  RM! V3R lS 4       4      '       d
   S^ ,          h\        RP                  RP                  R S 4       4      4      4      h\!        R
4      hM=Vf   \        R4      hVP"                  \        P                  8w  d   \        RV: 24      hS P%                  WWJVVR7      G R j  xL
 w  ppS P&                  '       d,   VP)                  R4      p\*        P,                  ! RWVVV4       VV3#  EL^ EL EL  \
         d     EK  i ; i ELu uppi   R oi ; i Lt5i)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 ssl8host/port and sock can not be specified at the same timer9   r:   r;   r7  r   !getaddrinfo() returned empty listc              3   s:   <"   T F  pV3VVV3R  llx  K  	  R# 5i)c                 s*   < SP                  SV S4      # r>   )r_  )r:  r   laddr_infosra   s   &r   Z<lambda>Z;BaseEventLoop.create_connection.<locals>.<genexpr>.<lambda>  s    $2D2D&+3r   Nr?   )r@   r:  r   ri  ra   s   & r   rA   2BaseEventLoop.create_connection.<locals>.<genexpr>~  s&       ).H )1   ).s   r   zcreate_connection failedc              3   s@   <"   T F  p\        V4      S8H  x  K  	  R # 5ir>   r   )r@   rO   models   & r   rA   rj    s     GJSs3x50Js   FTzMultiple exceptions: {}r4  c              3   s8   "   T F  p\        V4      x  K  	  R # 5ir>   rk  )r@   rO   r   r   rA   rj    s     %E*3c#hh*s   z5host and port was not specified and no sock specified"A Stream Socket was expected, got )r   r   r#   z%r connected to %s:%r: (%r, %r))r$   rV   _ensure_resolvedr#   r.   r'   rH   r_  r   Zstaggered_raceZExceptionGroupr   r   ZallrT  r  r  r:   _create_connection_transportr  get_extra_infor   r  )ra   r   r7   r8   rU   r9   r;   r7  r)   r`  r   r   r   ra  rb  rc  infosr:  ZsubrO   rl   r   r   ri  rl  s   f&&&$$$$$$$$$$$$      @@@r   create_connectionZBaseEventLoop.create_connection$  s    ( &sJKK"s   "A B B"O ,SCE E  +CBD D d#+
0BJt/ NP P //V''u 0 N NE ABB%$($9$9++5d %: %, , #!"EFF # #-eZ@J#+ %H!%)%7%7&+&?  ?	 !& (66 ). )   |-7GZc3Cc3cZG
&!,-GTT:!+(m+# #JqM 23GJG333GJGGG",Q-/ &&?&F&F II%E*%EE'G H H ++EFF% . | KM MyyF... !8AC C %)$E$EC"7!5 %F %7 7	8 ;;; ++H5DLL:T9h@(""sN," ? # ! ! H& "&J 7s   MMMMM"A$ML$M6M	L'
MM,ML-L*L--MM M!M5M:M	 ,M	 /1M	 #M	 AM	 AMMM50M'M*L--L=8M<L==MM	MMc                s<  "   VP                  R 4       V! 4       pV P                  4       p	V'       d2   \        V\        4      '       d   RMTp
V P	                  WWWTVVR7      pMV P                  WV	4      p V	G Rj  xL
  W3#  L   TP                  4        h ; i5i)FN)r   r   r   r   )rX  r_   r   boolr   r   r   )ra   r)   r   rU   r   r   r   r   r   r   r   rl   s   &&&&&&&&    r   ro  Z*BaseEventLoop._create_connection_transport  s      	#%##%!+C!6!6CJ00
'&;%9	 1 ;I 33DFKI	LL
 "" 	OOs0   A4B7B <B=B BB BBc               s"  "   VP                  4       '       d   \        R 4      h\        VR\        P                  P
                  4      pV\        P                  P
                  J d   \        RV: 24      hV\        P                  P                  J d    V P                  WW44      G Rj  xL
 # V'       g   \        RV: 24      hV P                  WW44      G Rj  xL
 #  L5  \        P                   d   pT'       g   h  Rp?LVRp?ii ; i L15i)zTransport is closingZ_sendfile_compatiblez(sendfile is not supported for transport NzHfallback is disabled and native sendfile is not supported for transport )re   rj   r   r   Z_SendfileModeZUNSUPPORTEDZ
TRY_NATIVE_sendfile_nativer   rA  _sendfile_fallback)ra   rl   rC  rD  rE  r>  rS  rO   s   &&&&&$  r   sendfileZBaseEventLoop.sendfile  s    0 !!566y"8 ..::<9**666:9-HJ J9**555!22939B B B ++4-9: : ,,Y-3< < 	<B77   <sT   BDC" *C +C" .D7$DDD C" "D
7	D DD

Dc                s6   "   \         P                  ! R 4      h5i)z!sendfile syscall is not supportedrG  )ra   rb   rC  rD  rE  r   r   rt  ZBaseEventLoop._sendfile_native  s     22/1 	1s   c                s  "   V'       d   VP                  V4       V'       d   \        VR 4      MR p\        V4      p^ p\        V4      p  V'       dd   \        WG,
          V4      pV^ 8:  dK   TV^ 8  d*   \	        VR4      '       d   VP                  W7,           4       VP                  4       G Rj  xL
  # \        V4      RV p	V P                  RVP                  V	4      G Rj  xL
 p
V
'       gK   TV^ 8  d*   \	        VR4      '       d   VP                  W7,           4       VP                  4       G Rj  xL
  # VP                  V	RV
 4       VP                  4       G Rj  xL
  Wz,          pEK(   L L L@ L  T^ 8  d*   \	        TR4      '       d   TP                  Y7,           4       TP                  4       G Rj  xL 
  i ; i5i)i @  rI  N)rI  rJ  rK  rW   r"   r{   rL  r0  rM  Zwriterg   )ra   rb   rC  rD  rE  rN  rO  rP  r;   rQ  rR  s   &&&&&      r   ru  Z BaseEventLoop._sendfile_fallback	  sn    IIf).Cu%E		"
)&1	" #E$6	 BI A~) A~'$"7"7		&-.--/!! "#z	2!11$tLL%
 A~'$"7"7		&-.--/!! T%4[)kkm##"
 " M " $ A~'$"7"7		&-.--/!!s   !G	&G	E; E; .AG	1E32G	7.E; %E5&E; 2E; 3AG	6E77G	<'E; #E9$E; 3G	5E; 7G	9E; ;AG?G GG	c               s  "   \         f   \        R4      h\        V\         P                  4      '       g   \	        RV: 24      h\        VRR4      '       g   \	        RV: R24      hV P                  4       p\        P                  ! WW8WEVVRR7	      p	VP                  4        VP                  V	4       V P                  V	P                  V4      p
V P                  VP                  4      p VG R j  xL
  V	P"                  #  L  \         d3    TP                  4        T
P!                  4        TP!                  4        h i ; i5i)Nz"Python ssl module is not availablez@sslcontext is expected to be an instance of ssl.SSLContext, got Z_start_tls_compatibleFz
transport z  is not supported by start_tls())r   r   r   )rU   rj   r   Z
SSLContextr2   r   r_   r   ZSSLProtocolr\   r]   r+  rm   ry   BaseExceptionr   rz   Z_app_transport)ra   rl   r   r   r   r   r   r   r   Zssl_protocolZ
conmade_cbZ	resume_cbs   &&&&$$$$    r   	start_tlsZBaseEventLoop.start_tls"  s<     ;CDD*cnn55!n&' ' y"95AAYM)IJL L ##%++J"7!5!&( 	!|,^^L$@$@)L
NN9#;#;<		LL ***  	OO		s0   C*E-D 2D3D 7ED =EE
reuse_portallow_broadcastc          
     s	  "   V	e   V	P                   \        P                  8X  d   \        RV	: 24      hV'       g1   V'       g)   V'       g!   V'       g   V'       g   V'       g	   V'       dF   \	        W#WEVVVR7      p
RP                  R V
P                  4        4       4      p\        RV R24      hV	P                  R4       R pEMV'       g#   V'       g   V^ 8X  d   \        R4      hWE3R33pEM\        \        R	4      '       d   V\        P                  8X  d   W#3 F*  pVf   K	  \        V\        4      '       d   K!  \        R
4      h	  V'       d`   V^ ,          R9  dR    \        P                  ! \        P                  ! V4      P                   4      '       d   \        P"                  ! V4       WE3W#333pEM/ p^ V3^V33 F  w  ppVf   K  \        V\,        4      '       d   \/        V4      ^8X  g   \        R4      hV P1                  W\        P2                  WVV R7      G R j  xL
 pV'       g   \'        R4      hV F'  w  pppppVV3pVV9  d   R R .VV&   VVV,          V&   K)  	  K  	  VP                  4        UUu. uF4  w  ppV'       d   V^ ,          f   K  V'       d   V^,          f   K0  VV3NK6  	  pppV'       g   \        R4      h. pV F  w  w  rEw  ppR p	R p \        P                  ! V\        P2                  VR7      p	V'       d   \5        V	4       V'       d0   V	P7                  \        P8                  \        P:                  ^4       V	P                  R4       V'       d   V	P=                  V4       V'       d%   V'       g   V P?                  V	V4      G R j  xL
  Tp M	  V^ ,          hV! 4       pV PE                  4       pV PG                  V	VVV4      pV PH                  '       d<   V'       d   \(        PJ                  ! RW#VV4       M\(        PL                  ! RVVV4        VG R j  xL
  VV3#   \$         d     EL\&         d#   p\(        P*                  ! RY/4        R p?ELR p?ii ; i ELXu uppi  L  \&         d3   pT	e   T	PA                  4        TPB                  ! T4        R p?EK  R p?i T	e   T	PA                  4        h ; i L   TPA                  4        h ; i5i)Nz$A datagram socket was expected, got )r`  remote_addrr9   r;   r7  ry  rz  r4  c              3   sH   "   T F  w  rV'       g   K  V R V 2x  K  	  R# 5i)Z=Nr?   )r@   ZkZvr   r   rA   Z9BaseEventLoop.create_datagram_endpoint.<locals>.<genexpr>d  s      $NLDAAZs!A3ZLs   ""zKsocket modifier keyword arguments can not be used when sock is specified. (Z)Fzunexpected address familyAF_UNIXzstring is expectedz2Unable to check or remove stale UNIX socket %r: %rz2-tuple is expectedrg  rh  zcan not get address informationrU  z@Datagram endpoint local_addr=%r remote_addr=%r created: (%r, %r)z2Datagram endpoint remote_addr=%r created: (%r, %r)NN)r    Z )'r:   r#   r.   r$   Zdictr  ZitemsrX  r"   r|  r   r   r2   statZS_ISSOCKosZst_modeZremoveZFileNotFoundErrorr'   r   errorr   r   rn  r/   r*   r%   r&   ZSO_BROADCASTrY  r]  r   r6   r_   r   r  r6  r  ) ra   r   r`  r{  r9   r;   r7  ry  rz  r)   ZoptsZproblemsZr_addrZaddr_pairs_inforG   errZ
addr_infosZidxrq  Zfamr^  Zpror   keyZ	addr_pairr   Zlocal_addressZremote_addressrO   r   r   rl   s    &&&&$$$$$$                      r   create_datagram_endpointZ&BaseEventLoop.create_datagram_endpointR  s     yyF... :4(CE Ekeu/z#)e'1,;=  99$NDJJL$NN 008z<= = U#F+Q;$%@AA%+O\#B"D++&..0H'5D'
40E0E'(<== 6 *Q-{"B	6==)<)D)DEEIIj1 &,O%/$=$? #B  
#$j/A{3C!DIC' *4 7 7CIN"+,A"BB&*&;&; f6G6G"'4 '< 'A !A  %")*M"NN7<3CCG#&*C"*437,
33:JsOC0	 8= "E& <F;K;K;M#E;Mi'IaL %(Yq\ %S)$;M   #E
 '$%FGGJ 6E2&0-!==%F,=,=ULD!&t,&"--v/B/BAG$$U+!		-0"."&"3"3D."III!/ 9 6E< !m##%##%11(FF,	;;; 0&YJ  (()X?	LL
 (""} - " 6 &5%/6 66 !A#E8 J +'

%%c**'

* 	OOsa  :S:S:S:S:S:S:%S:-A!S:S:AS:(S: S:S:$9Q Q 4S:AS:*R+S:7AS:RR#R+R8R )S:*AR,AR4RRR*R+R1A	S:;S:3S:7S$ <S"=S$ S:Q?S:Q?Q?Q:4S::Q??S:S:RS&S>S:SS:"S$ $S77S:c          	     s   "   VR ,          w  rx\        WxW#V.VR,          O5!  p	V	e   V	.# VP                  WxW#WER7      G Rj  xL
 #  L5i):N   N:r  NNN)r9   r:   r;   r7  )r=   r5  )
ra   r   r9   r:   r;   r7  r   r7   r8   r6  s
   &&$$$$$   r   rn  ZBaseEventLoop._ensure_resolved  sc      R[
DeJgbkJ6M))$V05 * D D D Ds   A A	AA	c                s   "   V P                  W3V\        P                  W@R 7      G Rj  xL
 pV'       g   \        RV: R24      hV#  L5i))r9   r:   r7  r   Nzgetaddrinfo(z) returned empty list)rn  r#   r.   r'   )ra   r7   r8   r9   r7  rq     &&&&& r   _create_server_getaddrinfoZ(BaseEventLoop._create_server_getaddrinfo  sX     ++TL171C1C27 , D D L0EFGGDs   (AA	AAr   reuse_address
keep_aliver   c          
     s&
  "   \        V\        4      '       d   \        R 4      hVe   Vf   \        R4      hVe   Vf   \        R4      hVe   \	        V4       Vf   VEe   Ve   \        R4      hV	f/   \
        P                  R8H  ;'       d    \        P                  R8g  p	. pVR8X  d   R.pMF\        V\        4      '       g+   \        V\        P                  P                  4      '       g   V.pMTpV Uu. uF  pV P                  W#VVR7      NK  	  pp\        P                  ! V!  G Rj  xL
 p\!        \"        P$                  P'                  V4      4      pR	p V EFT  pVw  ppppp \(        P(                  ! VVV4      pTP3                  T4       T	'       d0   TP5                  \(        P6                  \(        P8                  R4       T
'       d1   T\(        P:                  \(        P<                  39   d   \?        T4       T'       d0   TP5                  \(        P6                  \(        P@                  R4       \B        '       d[   T\(        P<                  8X  dF   \E        \(        R4      '       d0   TP5                  \(        PF                  \(        PH                  R4        TPK                  T4       EKW  	  V'       g'   \M        RV Uu. uF  pV^,          NK  	  up: 24      hRpV'       g   V F  pVPW                  4        K  	  M@Vf   \        R4      hVPX                  \(        PZ                  8w  d   \        RV: 24      hV.pV F  pVP]                  R	4       K  	  \_        WVWVV4      pV'       d/   VPa                  4        \        Pb                  ! ^ 4      G Rj  xL
  V P,                  '       d   \.        Pd                  ! RV4       V# u upi  EL  \(        P*                   d3    T P,                  '       d   \.        P0                  ! R
TTTRR7        EK  i ; i  \L         d   pRT: R\        T4      PO                  4       : 2pTPP                  \P        PR                  8X  dP   TPU                  4        TPW                  4        T P,                  '       d   \.        P0                  ! T4        Rp?EKa  \M        TPP                  T4      RhRp?ii ; iu upi   T'       g   T F  pTPW                  4        K  	  i i ; i ELg5i)z*ssl argument must be an SSLContext or NoneNrd  re  rf  ZposixZcygwinr,   )r9   r7  Fz:create_server() failed to create socket.socket(%r, %r, %r)Texc_infoIPPROTO_IPV6rV  rW  z%could not bind on any address out of z)Neither host/port nor sock were specifiedrm  z%r is serving)3r   rs  r2   r$   rV   r  Znamer  Zplatformr   rB   ZabcZIterabler  r	   r  ZsetrD   rE   rF   r#   r  r  r   warningr6   r%   r&   ZSO_REUSEADDRr4   r   r*   ZSO_KEEPALIVEr5   r"   r  ZIPV6_V6ONLYrY  r'   rZ  r[  ZEADDRNOTAVAILr\  r   r:   r.   rX  r   r   r   r6  )ra   r   r7   r8   r9   r7  r)   r   rU   r  ry  r  r   r   r   r   ZhostsZfsrq  Z	completedZresr<   Zsocktyper;   Z	canonnameZsar  r8  r6  r   s   &&&&$$$$$$$$$$$               r   create_serverZBaseEventLoop.create_server  sP    : c4  HII ,CE E  +BD D d#t/ NP P $ "7 2 O Os||x7OGrzT3'' {'?'?@@ $%#d 11$V8= 2 ?#  %  ,,++E	55e<=EI7% C9<6B%B!%}}R5A NN4($"--v/B/BDJ "bV^^V__,M&M&t,!"--v/B/BDJ
 "	&//1#FN;;(;(;(.(:(:(,.@		"A !\ !:?%@%$d1gg%%@#C D D !	  '

 !( | !LMMyyF... #EdX!NOOfGDU#  '7&;,. !!# ++a.  ;;;KK0i% , "<< !;;;"NN ,G+-xO !!: # @ #%c#hnn&6 8 99(;(;;#KKM JJL#{{{ &s 3$%cii54?@ &A ! '

 !( !( !s   BTA+T:OT0O1.T S' /OS'  6S' 7S' :S' 
AS' %P)6S' 
S' S"
S' +B<T'T(T>T&P&P&!S' %P&&S' )S4A1S&S<S' SSS' '$TTc          
     s  "   VP                   \        P                  8w  d   \        R V: 24      hVe   V'       g   \        R4      hVe   V'       g   \        R4      h\	        V4       V P                  W!VRRVVR7      G Rj  xL
 w  rgV P                  '       d*   VP                  R4      p\        P                  ! RW&V4       Wg3#  LD5i)	rm  Nrd  re  r,   T)r   r   r   r#   z%r handled: (%r, %r))
r:   r#   r.   r$   rV   ro  r  rp  r   r  )ra   r   r)   rU   r   r   rl   r   s   &&&$$$  r   connect_accepted_socketZ%BaseEventLoop.connect_accepted_socket}  s     
 99***A$JKK ,SCE E  +CBD D 	$$($E$EC"7!5 %F %7 7	 ;;; ++H5DLL/(K""7s   :CC0CC	ACc                  "   V! 4       pV P                  4       pV P                  W#V4      p VG R j  xL
  T P                  '       d'   \        P
                  ! RTP                  4       YS4       YS3#  L?   TP                  4        h ; i5i)Nz Read pipe %r connected: (%r, %r))r_   r   r   r  r   r  filenora   r   r   r   r   rl      &&&   r   connect_read_pipeZBaseEventLoop.connect_read_pipe  s     #%##%2246J		LL
 ;;;LL;	="" 	OO1   *B
A4 A2A4 B
	)B
2A4 4BB
c                r  )Nz!Write pipe %r connected: (%r, %r))r_   r   r   r  r   r  r  r  r  r   connect_write_pipeZ BaseEventLoop.connect_write_pipe  s     #%##%33DFK		LL
 ;;;LL<	="" 	OOr  c                s   V.pVe   VP                  R\        V4       24       Ve4   V\        P                  8X  d   VP                  R\        V4       24       MBVe   VP                  R\        V4       24       Ve   VP                  R\        V4       24       \        P
                  ! RP                  V4      4       R # )Nzstdin=zstdout=stderr=zstdout=zstderr=Z )r6   r    r   r   r   r  r  )ra   r8  r   r   r   r6  r  r   _log_subprocessZBaseEventLoop._log_subprocess  s    uKK&e!4 567&J,=,="=KK.f)=(>?@!gl6&:%;<=!gl6&:%;<=SXXd^$r   r   r   r   universal_newlinesr   r   encodingerrorstextc       	   	     s6  "   \        V\        \        34      '       g   \        R 4      hV'       d   \        R4      hV'       g   \        R4      hV^ 8w  d   \        R4      hV'       d   \        R4      hV	e   \        R4      hV
e   \        R4      hV! 4       pRpV P                  '       d   RV,          pV P                  WWE4       V P                  ! WR	W4WX3/ VB G Rj  xL
 pV P                  '       d   Ve   \        P                  ! R
W4       W3#  L45i)zcmd must be a string universal_newlines must be Falsezshell must be Truebufsize must be 0text must be FalseNencoding must be Noneerrors must be Nonezrun shell command %rT%s: %r)	r   r0   r   r$   r  r  r   r   r6  )ra   r   Zcmdr   r   r   r  r   r   r  r  r  r   r   	debug_logrl   s   &&&$$$$$$$$$,   r   subprocess_shellZBaseEventLoop.subprocess_shell  s     #s|,,344?@@122a<011122455233#%	;;; /4I  6B994KCIK K	;;;90KK)7""	Ks/   /DD$D*AD.4D"D#D9Dc       	   	     s  "   V'       d   \        R 4      hV'       d   \        R4      hV^ 8w  d   \        R4      hV'       d   \        R4      hV	e   \        R4      hV
e   \        R4      hV3V,           pV! 4       pRpV P                  '       d   RV: 2pV P                  VW4V4       V P                  ! WRW4VV3/ VB G Rj  xL
 pV P                  '       d   Ve   \        P
                  ! R	VV4       VV3#  L65i)
r  zshell must be Falser  r  Nr  r  zexecute program Fr  )r$   r  r  r   r   r6  )ra   r   Zprogramr   r   r   r  r   r   r  r  r  r   r   Z
popen_argsr   r  rl   s   &&&$$$$$$$$$*,    r   subprocess_execZBaseEventLoop.subprocess_exec  s     ?@@233a<011122455233Z$&
#%	;;; +7+6I  E6B99% 	 ;;;90KK)Y7(""s)   C=$C=AC=3C=C;C=!C=c                r   r>   )r   rp   r   r   get_exception_handlerZ#BaseEventLoop.get_exception_handler  s     &&&r   c                sZ    Ve!   \        V4      '       g   \        RV: 24      hWn        R # )Nz+A callable object or None is expected, got )r   r2   r   )ra   Zhandlerrc   r   set_exception_handlerZ#BaseEventLoop.set_exception_handler  s6     x'8'8 ##*+/ 0 0")r   c                s   VP                  R 4      pV'       g   RpVP                  R4      pVe   \        V4      W3P                  3pMRpRV9  dD   V P                  e6   V P                  P                  '       d   V P                  P                  VR&   V.p\        V4       F  pVR9   d   K  W,          pVR8X  d?   RP                  \        P                  ! V4      4      pRpWxP                  4       ,          pMPVR8X  d?   RP                  \        P                  ! V4      4      pR	pWxP                  4       ,          pM\        V4      pVP                  V R
V 24       K  	  \        P                  ! RP                  V4      VR7       R# )r   z!Unhandled exception in event looprJ   NFZsource_tracebackZhandle_tracebackr,   z+Object created at (most recent call last):
z+Handle created at (most recent call last):
rW  Z
r  >   r   rJ   )getr:   Z__traceback__r   r   Zsortedr  	tracebackZformat_listZrstripr   r6   r   r  )	ra   r"  r   rJ   r  Z	log_linesr  ZvalueZtbs	   &&       r   default_exception_handlerZ'BaseEventLoop.default_exception_handler#  sV    ++i(9GKK,	 Y4K4KLHHg-$$0$$666$$66 &' I	'?C..LE((WWY2259:F$**WWY2259:F$UuBug./ #  	TYYy)H=r   c           	     s   V P                   f    V P                  V4       R #  R pVP                  R4      pVf   VP                  R4      pVf   VP                  R4      pVe#   \        VR4      '       d   VP                  4       pVe1   \        VR4      '       d   VP                  V P                   W4       R # V P                  W4       R #   \        \        3 d    h \         d    \
        P                  ! RRR7        R # i ; i  \        \        3 d    h \         dc   p T P                  R	R
RTRT/4        R p?R #   \        \        3 d    h \         d!    \
        P                  ! RRR7         R p?R # i ; iR p?ii ; i)Nz&Exception in default exception handlerTr  r   r  r   get_contextrunr   z$Unhandled error in exception handlerrJ   r"  zeException in default exception handler while handling an unexpected error in custom exception handler)r   r  rK   rL   rw  r   r  r  r"   r  r  )ra   r"  ZctxZthingrO   s   &&   r   r  Z$BaseEventLoop.call_exception_handlerU  s~   0 ""*	,..w7$0F+= $KK1E=#KK1E$)F)F++-C?wsE':':GGD33TC++D:3  12   , E&*, ,	,0  12   0022!#I#S!74  
 #$56 $ 0 LL "? +/0 000sY   C BD	 ;D	 D)DD	F$F&EE?E?7F>E??FFc                sd    VP                   '       g   V P                  P                  V4       R # R # r>   )
_cancelledr   r6   ra   r   rc   r   _add_callbackZBaseEventLoop._add_callback  s%       KKv& !r   c                sH    V P                  V4       V P                  4        R # r>   )r  r   r  rc   r   _add_callback_signalsafeZ&BaseEventLoop._add_callback_signalsafe  s    6"r   c                s`    VP                   '       d   V ;P                  ^,          un        R# R# rR   )r   r   r  rc   r   _timer_handle_cancelledZ%BaseEventLoop._timer_handle_cancelled  s$    ''1,' r   c                s   \        V P                  4      pV\        8  d   V P                  V,          \        8  df   . pV P                   F/  pVP
                  '       d
   R Vn        K  VP                  V4       K1  	  \        P                  ! V4       W n        ^ V n        MwV P                  '       df   V P                  ^ ,          P
                  '       dC   V ;P                  ^,          un        \        P                  ! V P                  4      pR Vn        Kw  RpV P                  '       g   V P                  '       d   ^ pM_V P                  '       dN   V P                  ^ ,          P                  V P                  4       ,
          pV\        8  d   \        pM	V^ 8  d   ^ pV P                  P!                  V4      pV P#                  V4       RpV P                  4       V P$                  ,           pV P                  '       dj   V P                  ^ ,          pVP                  V8  d   MD\        P                  ! V P                  4      pR Vn        V P                  P                  V4       K{  \        V P                  4      p\'        V4       F  pV P                  P)                  4       pVP
                  '       d   K1  V P*                  '       dy    W0n        V P                  4       p	VP/                  4        V P                  4       V	,
          p
WP0                  8  d"   \2        P4                  ! R\7        V4      V
4       RV n        K  VP/                  4        K  	  RpR#   RT n        i ; i)FNzExecuting %s took %.3f seconds)r   r   _MIN_SCHEDULED_TIMER_HANDLESr   %_MIN_CANCELLED_TIMER_HANDLES_FRACTIONr  r6   r*  ZheapifyZheappopr   r   Z_whenr   MAXIMUM_SELECT_TIMEOUTZ	_selectorZselectr   r   ZrangeZpopleftr  r   Z_runr   r   r  r   )ra   Zsched_countZnew_scheduledr   r
  r   Zend_timeZntodoZir9  r;  s   &          r   r  ZBaseEventLoop._run_once  s~    $//*66''+556 M//$$$(-F%!((0	 * MM-(+O*+D' ///dooa&8&C&C&C++q0+t7$)!;;;$...G___ooa(..<G//01^^**73
Z(
 99;!7!77ooo__Q'F||x']]4??3F %FKKv& DKK uA[[((*F   {{{	0+1(BKKMr)B888'G'5f'=rC ,0D(! "  ,0D(s   A.M	M'c                s*   \        V4      \        V P                  4      8X  d   R # V'       d@   \        P                  ! 4       V n        \        P
                  ! \        P                  4       M \        P
                  ! V P                  4       Wn        R # r>   )rs  r   r  Z#get_coroutine_origin_tracking_depthr   Z#set_coroutine_origin_tracking_depthr   ZDEBUG_STACK_DEPTHra   Zenabledrc   r   r  Z,BaseEventLoop._set_coroutine_origin_tracking  sk    =D!H!HII779 733++- 33;;= 3:/r   c                r   r>   )r  rp   r   r   r   ZBaseEventLoop.get_debug  s    {{r   c                sz    Wn         V P                  4       '       d   V P                  V P                  V4       R # R # r>   )r  r   r   r  r  rc   r   r   ZBaseEventLoop.set_debug  s/    ??%%d&I&I7S r   )r   r   r   r   r   r   r   r  r   r   r   r   r   r   r   r   r   r   r   r   r>   )NNNr}  )r    r   )FNN)Zr|   r}   r~   r   rd   r   r_   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r	  r  r  r  r  r  rM   r   r   r   r   r!  r   r   r'  r#  r+  r)  r,  r(  r   r0  r3  r<  r5  r=  rF  r@  rB  r?  r_  rr  ro  rv  rt  ru  rx  r  r#   r.   rn  r  r3   Z
AI_PASSIVEr  r  r  r  r  r   r   r  r  r  r  r  r  r  r  r  r  r  r   r   r   r   r   r   r   r   r     s    /@
)&%""%)"26"
" "26" "  $" #'	"
 "&" "&""
"
"
"""7DG
"20DK'(( 	($L*. %MM -  0T $ &%("D 5 *
0H!"H)*H23H;<H7A(,A./4*..`T#T# !T# T# T# $(T# 	T# .2	T#
 #'T# "&T# "&T# 37T# T#l#8-<#'-<^1"2.+$).+(,.+ /3.+ .2	.+`D#./D#78D#@AD# 37D# 8<	D# CG	D#L
D&'
D.4.@.@
D%&
D./
DO ##O ##	O
 O O O O O O #'O "&O Ob## #'# "&	#:# # %"#%/__"#&0oo"# '1oo"# 38	"#
 &*"#
 45"# )-"# 6:"# AE"#H #$.OO #<FOO #%/__ #IN # %* # 45 # (,	 # 59	 # @D	 #D'
*"0>dH0T'

-
Qf:T Tr   )r   r   iQ )r    r    )rS   )6rB   Zcollections.abcZconcurrent.futuresr1  r[  r*  rD   r  r#   r~  r   r  r   r  r  r   r   rU   ZImportErrorr,   r   r   r   r   r   r   r   r   r	   r
   r   r   Zlogr   Z__all__r  r  r"   r5   r  r   r    r*   r=   rH   rP   rT   rV   ZProtocolrW   ZAbstractServerr   ZAbstractEventLoopr   r?   r   r   <module>r     s+          	       
                $
  #  ), % FJ'	 # J8v," 6=!!G>
A)	 2 2 A)HKV"" K\vTF,, vT}  
Cs   D 	D! D!