python (3.12.0)

(root)/
lib/
python3.12/
asyncio/
__pycache__/
base_events.cpython-312.opt-2.pyc

ˑe)(	ddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZ	ddlZddlmZddlmZddlmZddlmZddlmZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlm Z dZ!dZ"dZ#e$edZ%dZ&dZ'dZ(dZ)d$dZ*d%dZ+dZ,e$edrdZ-ndZ-dZ.Gddej^Z0Gd d!ejbZ2Gd"d#ejfZ4y#e$rdZYwxYw)&N)	constants)
coroutines)events)
exceptions)futures)	protocols)sslproto)	staggered)tasks)
transports)trsock)logger)
BaseEventLoopServerdg?AF_INET6iQc|j}tt|ddtjrt|jSt|S)N__self__)	_callback
isinstancegetattrrTaskreprrstr)handlecbs  G/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/asyncio/base_events.py_format_handlerFs=			B'"j$/<BKK  6{ch|tjk(ry|tjk(ryt|S)Nz<pipe>z<stdout>)
subprocessPIPESTDOUTr)fds r_format_piper&Os+	Z__	z  	 Bxr cttdstd	|jtjtj
dy#t$rtdwxYw)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_reuseportr1Xs`6>*DEE	JOOF--v/B/BAF	JIJ
J	Js/A

A"c	Pttdsy|dtjtjhvs|y|tjk(rtj}n%|tj
k(rtj}ny|d}n<t
|tr|dk(rd}n$t
|tr|dk(rd}n	t|}|tjk(r7tjg}tr#|jtj n|g}t
|tr|j#d}d|vry|D]I}	tj$||tr |tj k(r
|||d||||ffcS|||d||ffcSy#ttf$rYywxYw#t&$rYmwxYw)N	inet_ptonrr idna%)r)r*IPPROTO_TCPIPPROTO_UDPSOCK_STREAM
SOCK_DGRAMrbytesrint	TypeErrorr+	AF_UNSPECAF_INET	_HAS_IPv6appendrdecoder3r.)	hostportfamilytypeprotoflowinfoscopeidafsafs	         r_ipaddr_inforLcs6;'Q**F,>,>??Lv!!!""	
""	"""|	D%	 TS[	D#	42:	t9D!!!~~JJv'h${{6"
d{		R&R6??24T47,KKK4T4L88	;:&		2		s*7F;9F7FFF	F%$F%c	tj}|D]$}|d}||vrg||<||j|&t|j	}g}|dkDr%|j|dd|dz
|dd|dz
=|jdtjjt
j|D|S)Nrrc3$K|]}||
ywN).0as  r	<genexpr>z(_interleave_addrinfos.<locals>.<genexpr>s
]	
s)
collectionsOrderedDictrAlistvaluesextend	itertoolschain
from_iterablezip_longest)	addrinfosfirst_address_family_countaddrinfos_by_familyaddrrEaddrinfos_lists	reordereds       r_interleave_addrinfosrcs7%1131a,,*,'F#**40	1
.5578OI!A%+,K-G!-KLMA> :Q >>?
??00!!?3
r c|js'|j}t|ttfrytj|jyrO)	cancelled	exceptionr
SystemExitKeyboardInterruptr	_get_loopstop)futexcs  r_run_until_complete_cbrmsB==?mmocJ(9:;
c!r TCP_NODELAYc4|jtjtjhvrl|jtj
k(rN|jtjk(r0|jtjtjdyyyyNr)
rEr*r?rrFr9rGr7r,rnr/s r_set_nodelayrqsjKKFNNFOO<<		V///

f000OOF..0B0BAF10
=r cyrOrPr/s rrqrqsr c\t&t|tjrtdyy)Nz"Socket cannot be of type SSLSocket)sslr	SSLSocketr=r/s r_check_ssl_socketrvs'
:dCMM:<==;r cBeZdZdZdZdZdZdZdZdZ	dZ
d	Zy
)_SendfileFallbackProtocolct|tjstd||_|j|_|j|_|j|_
|j|j||jr*|jjj|_yd|_y)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__z"_SendfileFallbackProtocol.__init__s&*">">?LMM ))+&,&7&7&9#&,&=&=#D!&&$(OO$9$9$G$G$ID!$(D!r cK|jjrtd|j}|y|d{y7w)NzConnection closed by peer)r{
is_closingConnectionErrorr)rrks  rdrainz_SendfileFallbackProtocol.drains<??%%'!"=>>##;		s:AAActd)Nz?Invalid state: connection should have been established already.RuntimeError)r	transports  rconnection_madez)_SendfileFallbackProtocol.connection_madesNO	Or c|jB|%|jjtdn|jj||jj	|y)NzConnection is closed by peer)r
set_exceptionrr}connection_lost)rrls  rrz)_SendfileFallbackProtocol.connection_losts[  ,{%%33#$BCE%%33C8##C(r cp|jy|jjj|_yrO)rr{rrrs r
pause_writingz'_SendfileFallbackProtocol.pause_writings,  , $ 5 5 C C Er cb|jy|jjdd|_y)NF)r
set_resultrs rresume_writingz(_SendfileFallbackProtocol.resume_writings-  (((/ $r ctdNz'Invalid state: reading should be pausedr)rdatas  r
data_receivedz'_SendfileFallbackProtocol.data_receivedDEEr ctdrrrs reof_receivedz&_SendfileFallbackProtocol.eof_receivedrr c<K|jj|j|jr|jj	|j
|j
j
|jr|jjyywrO)	r{rr}rresume_readingrcancelrrrs rrestorez!_SendfileFallbackProtocol.restoress$$T[[1&&OO**,  ,
!!((*&&KK&&('sBBN)__name__
__module____qualname__rrrrrrrrrrPr rrxrxs3)O	)F
%FF
)r rxcheZdZ	ddZdZdZdZdZdZdZ	d	Z
ed
ZdZ
dZd
ZdZy)rNc||_||_d|_g|_||_||_||_||_||_d|_	d|_
y)NrF)r_sockets
_active_count_waiters_protocol_factory_backlog_ssl_context_ssl_handshake_timeout_ssl_shutdown_timeout_serving_serving_forever_fut)rloopsocketsprotocol_factoryssl_contextbacklogssl_handshake_timeoutssl_shutdown_timeouts        rrzServer.__init__sU


!1
'&;#%9"
$(!r cPd|jjd|jdS)N<z	 sockets=>)	__class__rrrs r__repr__zServer.__repr__"s'4>>**+9T\\4DAFFr c.|xjdz
c_yrp)rrs r_attachzServer._attach%sar c|xjdzc_|jdk(r|j|jyyy)Nrr)rr_wakeuprs r_detachzServer._detach)s;a"t}}'<LLN(="r c||j}d|_|D]$}|jr|j|&yrO)rdoner)rwaiterswaiters   rrzServer._wakeup/s8--
	*F;;=!!&)	*r c
*|jryd|_|jD]p}|j|j|jj|j||j||j|j|jryNT)
rrlistenrr_start_servingrrrr)rr0s  rrzServer._start_serving6su==
MM	,DKK

&JJ%%&&d.?.?dmmT%@%@**
,	,r c|jSrO)rrs rget_loopzServer.get_loopAszzr c|jSrO)rrs r
is_servingzServer.is_servingDs}}r cT|jytd|jDS)NrPc3FK|]}tj|ywrO)rTransportSocket)rQss  rrSz!Server.sockets.<locals>.<genexpr>KsF1V++A.Fs!)rtuplers rrzServer.socketsGs$== F

FFFr cP|j}|yd|_|D]}|jj|d|_|j;|jjs!|jj
d|_|jdk(r|jyy)NFr)	rr
_stop_servingrrrrrr)rrr0s   rclosezServer.closeMs--?
	+DJJ$$T*	+
%%1--224%%,,.(,D%"LLN#r cjK|jtjdd{y7wNr)rrsleeprs r
start_servingzServer.start_serving`s%kk!ns)313cK|jtd|d|jtd|d|j|jj|_	|jd{	d|_y7
#tj$r1	|j|jd{7#xYwwxYw#d|_wxYww)Nzserver z, is already being awaited on serve_forever()z
 is closed)
rrrrrrrCancelledErrorrwait_closedrs r
serve_foreverzServer.serve_foreverfs$$0$!MNP
P== 
;<<$(JJ$<$<$>!		-++++)-D%
,((	


&&(((	)-D%s`A&C)B8B9B>CBC#C?CCCCCC	CCcK|j|jdk(ry|jj}|jj	||d{y7wr)rrrrrA)rrs  rrzServer.wait_closed{sK== D$6$6!$;))+

V$sAA!AA!rO)rrrrrrrrrrrpropertyrrrrrrPr rrrs[>B)G *	,GG
&-*r rceZdZdZdZdZddddZdZdZd\ddd	d
Z		d\dddddddd
dZ
	d]dZ		d^dZ		d^dZ
	d\dZdZdZdZdZdZdZdZd\dZdZdZdZdZdZd Zd!Zej>fd"Z d#Z!d$Z"dd%d&Z#dd%d'Z$dd%d(Z%d)Z&d*Z'd+Z(dd%d,Z)d-Z*d.Z+d/Z,d0d0d0d0d1d2Z-d_d3Z.d`dd4d5Z/d6Z0d7Z1d8Z2d\d9Z3	d^dd0d0d0ddddddddd:d;Z4			dad<Z5d`dd4d=Z6d>Z7d?Z8ddddd@dAZ9	d^d0d0d0ddddBdCZ:d0e;jxd0d0d1dDZ=dEZ>	d^e;j~e;jddFdddddddG
dHZAddddIdJZBdKZCdLZDdMZEeFjeFjeFjddd0ddddN	dOZHeFjeFjeFjddd0ddddN	dPZIdQZJdRZKdSZLdTZMdUZNdVZOdWZPdXZQdYZRdZZSd[ZTy)brcd|_d|_d|_tj|_g|_d|_d|_d|_	tjdj|_
d|_|jt!j"d|_d|_d|_d|_d|_t/j0|_d|_d|_y)NrF	monotonicg?)_timer_cancelled_count_closed	_stoppingrTdeque_ready
_scheduled_default_executor
_internal_fds
_thread_idtimeget_clock_info
resolution_clock_resolution_exception_handler	set_debugr_is_debug_modeslow_callback_duration_current_handle
_task_factory"_coroutine_origin_tracking_enabled&_coroutine_origin_tracking_saved_depthweakrefWeakSet
_asyncgens_asyncgens_shutdown_called_executor_shutdown_calledrs rrzBaseEventLoop.__init__s&'#!'')!%!%!4!4[!A!L!L"&z0023'*##!27/6:3"//+*/').&r c	d|jjd|jd|jd|j	d	S)Nrz	 running=z closed=z debug=r)rr
is_running	is_closed	get_debugrs rrzBaseEventLoop.__repr__sP''(	$//2C1DEnn&'wt~~/?.@
C	
r c0	tj|S)Nr)rFuturers rrzBaseEventLoop.create_futures:~~4((r N)namecontextc&	|j|j4tj||||}|jr
|jd=|S||j||}n|j|||}tj
|||S)N)rr	r
r
)
_check_closedrrr_source_traceback_set_task_name)rcoror	r
tasks     rcreate_taskzBaseEventLoop.create_tasks		
%::dD'JD%%**2.))$5))$g)F  t,r cD	|t|std||_y)Nz'task factory must be a callable or None)callabler=r)rfactorys  rset_task_factoryzBaseEventLoop.set_task_factorys*	x'8EFF$r c	|jSrO)rrs rget_task_factoryzBaseEventLoop.get_task_factorysJ!!!r )extraserverc	trONotImplementedError)rr0protocolrrrs      r_make_socket_transportz$BaseEventLoop._make_socket_transports&!!r FT)server_sideserver_hostnamerrrrcall_connection_madec	trOr)rrawsockr
sslcontextrr!r"rrrrr#s            r_make_ssl_transportz!BaseEventLoop._make_ssl_transports
	$!!r c	trOr)rr0raddressrrs      r_make_datagram_transportz&BaseEventLoop._make_datagram_transports(!!r c	trOrrpiperrrs     r_make_read_pipe_transportz'BaseEventLoop._make_read_pipe_transports)!!r c	trOrr,s     r_make_write_pipe_transportz(BaseEventLoop._make_write_pipe_transports*!!r c	K	twrOr)
rrargsshellstdinstdoutstderrbufsizerkwargss
          r_make_subprocess_transportz(BaseEventLoop._make_subprocess_transports	+!!s
c	trOrrs r_write_to_selfzBaseEventLoop._write_to_selfs	"!r c	trOr)r
event_lists  r_process_eventszBaseEventLoop._process_eventss&!!r c2|jrtdy)NzEvent loop is closed)rrrs rrzBaseEventLoop._check_closeds<<566r c2|jrtdy)Nz!Executor shutdown has been called)rrrs r_check_default_executorz%BaseEventLoop._check_default_executor	s))BCC*r c|jj||js+|j|j|jyyrO)rdiscardrcall_soon_threadsaferacloseragens  r_asyncgen_finalizer_hookz&BaseEventLoop._asyncgen_finalizer_hook
s?%~~%%d&6&6
F r c|jr tjd|dt||jj|y)Nzasynchronous generator z3 was scheduled after loop.shutdown_asyncgens() callsource)rwarningswarnResourceWarningraddrFs  r_asyncgen_firstiter_hookz&BaseEventLoop._asyncgen_firstiter_hooksA**MM)$212
.
	
D!r cK	d|_t|jsyt|j}|jj	tj|Dcgc]}|jc}ddid{}t||D].\}}t|ts|jd|||d0ycc}w7Gw)NTreturn_exceptionsz;an error occurred during closing of asynchronous generator )messagerfasyncgen)rlenrrVclearrgatherrEzipr	Exceptioncall_exception_handler)r
closing_agensagresultsresultrGs      rshutdown_asyncgensz BaseEventLoop.shutdown_asyncgenss:*.'4??#
T__-
$1
2bbiik
2$"$$ 7	LFD&),++"99= B!' $	-	3$s$A!C#C:
CC&C,!CcK	d|_|jy|j}tj|j
|f}|j
	|d{|j||jr=tjd|dtd|jjdyy7c#|j|wxYww)	NT)targetr2z:The executor did not finishing joining its threads within z	 seconds.)
stacklevelFwait)
rrr	threadingThread_do_shutdownstartjoinis_aliverLrMRuntimeWarningshutdown)rtimeoutfuturethreads    rshutdown_default_executorz'BaseEventLoop.shutdown_default_executor4s	*.&!!)##%!!):):&K	!LLKK ??MM33:)9F+
;
""+++7		
KK s1ACC C!C%ACCCCc&	|jjd|js|j|jdyy#t
$r;}|js!|j|j|Yd}~yYd}~yd}~wwxYw)NTrd)rrmrrDrrYr)rroexs   rrhzBaseEventLoop._do_shutdownLs~	D""+++6>>#))&*;*;TB$	D>>#))&*>*>CC$	DsAA	B,BBcx|jrtdtjtdy)Nz"This event loop is already runningz7Cannot run the event loop while another loop is running)rrr_get_running_looprs r_check_runningzBaseEventLoop._check_runningUs>??CDD##%1IK
K2r c	|j|j|j|jt	j
}	t
j|_t	j|j|jtj|	|j|jrn	d|_d|_tjd|jdt	j|y#d|_d|_tjd|jdt	j|wxYw)N)	firstiter	finalizerF)rrv_set_coroutine_origin_tracking_debugsysget_asyncgen_hooksrf	get_identrset_asyncgen_hooksrPrHr_set_running_loop	_run_oncer)rold_agen_hookss  rrun_foreverzBaseEventLoop.run_forever\s)++DKK8//1	4'113DO""T-J-J-1-J-J
L
$$T* >>"DN"DO$$T*//6""N3	#DN"DO$$T*//6""N3sA8DAEc"	|j|jtj|}t	j
||}|rd|_|jt	|j	|jt|jstd|jS#|r0|jr |js|jxYw#|jtwxYw)NrFz+Event loop stopped before Future completed.)rrvrisfuturer
ensure_future_log_destroy_pendingadd_done_callbackrmrrrerfremove_done_callbackrr^)rronew_tasks   rrun_until_completez BaseEventLoop.run_until_completets			
''//$$V$7+0F'  !78
	@
''(>?{{}LMM}}	FKKM&2B2B2D  "''(>?s.B??5C44C77Dc	d|_yr)rrs rrjzBaseEventLoop.stops	
r cn	|jrtd|jry|jrt	j
d|d|_|jj|jjd|_	|j}|d|_
|jdyy)Nz!Cannot close a running event loopzClose %rTFrd)rrrr{rdebugrrVrrrrmrexecutors  rrzBaseEventLoop.closes	??BCC<<;;LLT*)-&))%)D"5) r c	|jSrO)rrs rrzBaseEventLoop.is_closeds8||r c|js4|d|t||js|jyyy)Nzunclosed event loop rJ)rrNrr)r_warns  r__del__zBaseEventLoop.__del__s=~~(1?4P??$

% r c 	|jduSrO)rrs rrzBaseEventLoop.is_runnings8t+,r c,	tjSrO)rrrs rrzBaseEventLoop.times	~~r r
c	|td|j|j|z|g|d|i}|jr
|jd=|S)Nzdelay must not be Noner
r)r=call_atrr)rdelaycallbackr
r2timers      r
call_laterzBaseEventLoop.call_latersd	=455TYY[50(.T.%,.""''+r cP	|td|j|jr"|j|j	|dtj|||||}|jr
|jd=tj|j|d|_
|S)Nzwhen cannot be NonerrT)r=rr{
_check_thread_check_callbackrTimerHandlerheapqheappushr)rwhenrr
r2rs      rrzBaseEventLoop.call_ats	<122;;   95""44wG""''+
t.r c	|j|jr"|j|j|d|j	|||}|j
r
|j
d=|S)N	call_soonr)rr{rr
_call_soonrrrr
r2rs     rrzBaseEventLoop.call_soonsf		
;;   ;749##((,
r ctj|stj|rtd|dt	|std|d|y)Nzcoroutines cannot be used with z()z"a callable object was expected by z(), got )riscoroutineiscoroutinefunctionr=r)rrmethods   rrzBaseEventLoop._check_callback
sg""8,..x81&<>
>!4VH=l$%
%"r ctj||||}|jr
|jd=|jj	||S)Nr)rHandlerrrA)rrr2r
rs     rrzBaseEventLoop._call_soonsDxtW=##((,6"
r c|	|jytj}||jk7rtdy)NzMNon-thread-safe operation invoked on an event loop other than the current one)rrfr~r)r	thread_ids  rrzBaseEventLoop._check_threadsG	??"'')	''(
((r c	|j|jr|j|d|j|||}|jr
|jd=|j|S)NrDr)rr{rrrr;rs     rrDz"BaseEventLoop.call_soon_threadsafe/sc0;;  +AB49##((,
r c<|j|jr|j|d|E|j}|j	|'t
jjd}||_t
j|j|g||S)Nrun_in_executorasyncio)thread_name_prefixr)
rr{rrrA
concurrentrThreadPoolExecutorwrap_futuresubmit)rrfuncr2s    rrzBaseEventLoop.run_in_executor:s;;  '89--H((*%--@@'0A*2&""HOOD(4(t5	5r cpt|tjjst	d||_y)Nz,executor must be ThreadPoolExecutor instance)rrrrr=rrs  rset_default_executorz"BaseEventLoop.set_default_executorJs,(J$6$6$I$IJJKK!)r c"|d|g}|r|jd||r|jd||r|jd||r|jd|dj|}tjd||j	}tj||||||}	|j	|z
}
d|d	|
d
zdd|	}|
|jk\rtj||	Stj||	S)
N:zfamily=ztype=zproto=zflags=, zGet address info %szGetting address info z took g@@z.3fzms: )	rArjrrrr*getaddrinforinfo)rrCrDrErFrGflagsmsgt0addrinfodts           r_getaddrinfo_debugz BaseEventLoop._getaddrinfo_debugOsq!"JJ
+,JJth'(JJy)*JJy)*iin*C0
YY[%%dD&$uM
YY[2
%cU&c#d8,O
,,,KK
LLr rrErFrGrc
K|jr
|j}ntj}|j	d|||||||d{S7wrO)r{rr*rr)rrCrDrErFrGrgetaddr_funcs        rrzBaseEventLoop.getaddrinfogsU;;22L!--L)),dFD%HH	HHsAAAAcbK|jdtj||d{S7wrO)rr*getnameinfo)rsockaddrrs   rrzBaseEventLoop.getnameinfoqs2))&$$h77	77s&/-/)fallbackcZK|jr|jdk7rtdt||j	||||	|j||||d{S7#tj$r
}|sYd}~nd}~wwxYw|j||||d{7Sw)Nrzthe socket must be non-blocking)	r{
gettimeoutr+rv_check_sendfile_params_sock_sendfile_nativerSendfileNotAvailableError_sock_sendfile_fallback)rr0fileoffsetcountrrls       r
sock_sendfilezBaseEventLoop.sock_sendfileus;;4??,1>??$##D$>	33D$4:ECC
CC33		11$28%AAA	AsNA
B+
A+$A)%A+(B+)A++B>BB+BB+%B(&B+cBKtjd|d|dw)Nz-syscall sendfile is not available for socket z
 and file z combinationrrrr0rrrs     rrz#BaseEventLoop._sock_sendfile_natives422;D8Dx|
-.	.sc8K|r|j||rt|tjntj}t	|}d}		|rt||z
|}|dkrnYt|d|}|j
d|j|d{}	|	sn#|j||d|	d{||	z
}p||dkDr"t|dr|j||zSSS7S75#|dkDr"t|dr|j||zwwwxYww)Nrseek)
rminr!SENDFILE_FALLBACK_READBUFFER_SIZE	bytearray
memoryviewrreadintosock_sendallr))
rr0rrr	blocksizebuf
total_sentviewreads
          rrz%BaseEventLoop._sock_sendfile_fallbacks1IIf
yBBC#EE		"
	/ #EJ$6	 BI A~!#z	2!11$

tLL''d5Dk:::d"
A~'$"7		&:-.#8~M;A~'$"7		&:-.#8~sCA
DAC.C*C.6C,7C.(D*C.,C..)DDcdt|ddvrtd|jtjk(std|It|tstdj||dkrtdj|t|tstdj||dkrtdj|y)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+rFr*r9rr<r=formatrs     rrz$BaseEventLoop._check_sendfile_paramssgdFC00CDDyyF...JKKeS)AHHOQQz AHHOQQ&#&BII
A:BII
r cK	g}|j||\}}}}}	d}
	tj|||}
|
jd|G|D]!\}}}}}||k7r	|
j|n"|r|jt	d|d|j|
|	d{|
dx}}S#t$rQ}
d|d|
j
j
}t	|
j|}
|j|
Yd}
~
d}
~
wwxYw7g#t$r)}
|j|
|
|
jd}
~
w|
|
jxYw#dx}}wxYww)NrErFrGF*error while attempting to bind on address : z&no matching local address with family=z found)rAr*setblockingbindr.strerrorlowererrnopopsock_connectr)rr	addr_infolocal_addr_infos
my_exceptionsrEtype_rG_r)r0lfamilyladdrrlrs               r
_connect_sockzBaseEventLoop._connect_socks2

-(+4(ua$	.==U%HDU#+/?Y+GQ1e&( 
2		%(
Y %+//11%(OyPV&WXX##D'222*.-J3#2'',ir"||11346
&cii5%,,S112
3	  %

	

)--Jsk E%<D B519D*D+D0E%5	D>AD
D
DD	E$EEEE""E%)rtrErGrr0
local_addrr"rrhappy_eyeballs_delay
interleave
all_errorscFK	|

|std|
|r|std|}
|
|std|
|std|t||
|d}|||tdj||f|tj||d{}|std|	:j|	|tj||d{s
tdd|rt
||}g|
%|D]}	j|d{}n1n/tjfd	|D|

d{\}}}|ʉDcgc]}|D]}|
c}}	|rtdtdk(rdtdtfd
DrdtdjdjdD|td|j tjk7rtd|j#||||
||d{\}}j$r+|j'd}t)j*d|||||||fS777g#t
$rYwxYw7Kcc}}w#dwxYw7kw)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 timerErFrGrr!getaddrinfo() returned empty listc3bK|]&}tjj|(ywrO)	functoolspartialr)rQrrladdr_infosrs  rrSz2BaseEventLoop.create_connection.<locals>.<genexpr>@s4,!&&t'9'9'18[J,s,/rzcreate_connection failedrc3:K|]}t|k(ywrOr)rQrlmodels  rrSz2BaseEventLoop.create_connection.<locals>.<genexpr>OsGSs3x50GszMultiple exceptions: {}rc32K|]}t|ywrOr)rQrls  rrSz2BaseEventLoop.create_connection.<locals>.<genexpr>Ts%E3c#h%Esz5host 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+rv_ensure_resolvedr*r9r.rcrrstaggered_raceExceptionGrouprUrallrrjrF_create_connection_transportr{get_extra_inforr)rrrCrDrtrErGrr0rr"rrrrrinfosrrsubrlrrrrrs`                      @@@rcreate_connectionzBaseEventLoop.create_connectionst
	&sJKK"s "ABB"O ,SCE
E +CBD
Dd#+
0BJt/ NPP//tV''uE0NNEABB%$($9$9v++5d%:%,,#!"EFF"-eZ@J#+ %!H!%)%7%7&+&? ?	!$-#;#;,%*,)t	$55
a|-7Gc3GCcGcG
&!,-GTT:!+(m+!$JqM 2GJGG",Q-/&&?&F&F II%E*%EE'GHH| KMMyyF...!8ACC%)$E$E"C"7!5%F%77	8;;++H5DLL:tT9h
@(""_N," ?#! !5H "&J 7sBJ!I6;J!I9*J!?I?I<I?*J!JJ!J$J!)A8J!AJ!3J4AJ!9J!<I??	JJ!JJ!J!JJ!c
.K|jd|}|j}	|r.t|trdn|}
|j	|||
|	||||}n|j|||	}	|	d{||fS7#|j
xYww)NFr!r"rr)rrrboolr'r r)rr0rrtr"r!rrrrr&rs            rrz*BaseEventLoop._create_connection_transportrs	
#%##%!+C!6CJ00h
F'&;%9	1;I33D(FKI	LL
(""
	OOs0A,B/A?4A=5A?9B=A??BBcK	|jrtdt|dtjj
}|tjj
urtd||tjjur	|j||||d{S|std||j||||d{S70#tj$r
}|sYd}~Id}~wwxYw7)w)NzTransport is closing_sendfile_compatiblez(sendfile is not supported for transport zHfallback is disabled and native sendfile is not supported for transport )rrrr
_SendfileModeUNSUPPORTED
TRY_NATIVE_sendfile_nativerr_sendfile_fallback)rrrrrrrrls        rsendfilezBaseEventLoop.sendfiles	,!566y"8 ..::<9**666:9-HJ
J9**555
!229d395BBB++4-9:
:,,Y-3U<<	<B77
 
<sNBC:C"C#C&(C:C8C:CC5(C0+C:0C55C:c4Ktjdw)Nz!sendfile syscall is not supportedr)rrrrrs     rr#zBaseEventLoop._sendfile_natives22/1	1scK|r|j||rt|dnd}t|}d}t|}		|rSt||z
|}|dkr?||dkDr t	|dr|j||z|jd{St
|d|}	|jd|j|	d{}
|
s?||dkDr t	|dr|j||z|jd{S|jd{|j|	d|
||
z
}77y7;7$#|dkDr t	|dr|j||z|jd{7wxYww)Ni@rr)rrrrxr)rrrrrwrite)rrrrrrrrrGrrs           rr$z BaseEventLoop._sendfile_fallbacksxIIf).Cu%E		"
)&1	" #EJ$6	 BI A~)A~'$"7		&:-.--/!!"#z	2!11$

tLL%
A~'$"7		&:-.--/!!
kkm##T%4[)d"

"M
"
$A~'$"7		&:-.--/!!s<FE8FD;F.ED=E8FD?F	EEE;F=E?FE9F<E?=FFrcpK	ttdt|tjst	d|t|ddst	d|d|j
}tj||||||||d	}	|j|j|	|j|	j|}
|j|j}	|d{|	j"S7#t$r2|j|
j!|j!wxYww)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())rrr#)rtrr
SSLContextr=rrr
SSLProtocolrrrrr
BaseExceptionrr_app_transport)rrrr&r!r"rrrssl_protocol
conmade_cb	resume_cbs            r	start_tlszBaseEventLoop.start_tlssB
	
;CDD*cnn5!n&'
'y"95AYM)IJL
L##%++(J"7!5!&(	!|,^^L$@$@)L
NN9#;#;<		LL***
	OO		s0CD6 C8%C6&C8*D66C88;D33D6)rErGr
reuse_portallow_broadcastr0c	FK	|	|	jtjk7rtd|	|s|s
|s|s|s|s|rGt	|||||||}
djd|
j
D}td|d|	jdd}nb|s|s|dk(rtd	||fd
ff}
nttdr|tjk(r||fD] }|t|trtd|rO|dd
vrH	tjtj|j rtj"|||f||fff}
ni}d|fd|ffD]\}}|	t|t,rt/|dk(std|j1||tj|||d{}|st'd|D]\}}}}}||f}||vrddg||<||||<!|j
Dcgc]\}}|r|d|r|d||f}
}}|
stdg}|
D]\\}}\}}d}	d}	tj|tj|}	|rt3|	|r/|	j5tj6tj8d|	jd|r|	j;||r|s|j=|	|d{|}n|d|}|jC}|jE|	|||}|jFr4|rt)jHd||||nt)jJd|||	|d{||fS#t$$rY0t&$r"}t)j*d||Yd}~Ud}~wwxYw7cc}}w7#t&$r/}|	|	j?|j@|Yd}~d}~w|	|	j?xYw7#|j?xYww)NzA UDP Socket was expected, got )rremote_addrrErGrr3r4rc36K|]\}}|s	|d|yw)=NrP)rQkvs   rrSz9BaseEventLoop.create_datagram_endpoint.<locals>.<genexpr>s $NDAqAs!A3Z$Ns
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: %rrrbz2-tuple is expectedrrzcan not get address informationrz@Datagram endpoint local_addr=%r remote_addr=%r created: (%r, %r)z2Datagram endpoint remote_addr=%r created: (%r, %r))&rFr*r:r+dictrjitemsrr)r=rrr=statS_ISSOCKosst_moderemoveFileNotFoundErrorr.rerrorrrUrr1r,r-SO_BROADCASTrrrrArr*r{rr) rrrr6rErGrr3r4r0optsproblemsr_addraddr_pairs_infor`err
addr_infosidxrfamrpror)key	addr_pairr
local_addressremote_addressrlrrrs                                 rcreate_datagram_endpointz&BaseEventLoop.create_datagram_endpoint
s
	*yyF--- 5dX>@@keu/z{#)e'1,;= 99$NDJJL$NN 008z<==
U#F+Q;$%@AA%+UO\#B"D+&..0H'5>D'
40E'(<==>*Q-{"B	6==)<)D)DEIIj1&,UO%/$=$?#B 
#$j/A{3C!D;IC' *4 7CIN"+,A"BB&*&;&; f6G6G"'u4'<'A!A %")*M"NN7<;3CCG#&*C"*437,
33:JsOC0	;;&<F;K;K;M#E)7i'IaL,@(Yq\-A)$#E#E
'$%FGGJ6E
$2&%0-!==%F,=,=ULD!&t,&"--v/B/BAG$$U+!		-0"."&"3"3D."III!/;
$>!m##%##%11(FF,	;;0&YJ(()X?	LL
(""}-"6&5%/666 !A#E8J+'

%J%%c**'

*
	OOsC"P!%P!6P!AM7P!0AP!N0A
P!N3($P!
B!N;.N9/N;5A3P!)P.P	/P3P!7	N-P!N-N("P!(N--P!3P!9N;;	P$O.(P!.PP!	PPP!cK|dd\}}t|||||g|dd}	|	|	gS|j||||||d{S7w)Nrbr)rLr)
rr)rErFrGrrrCrDrs
          rrzBaseEventLoop._ensure_resolvedstRa[
dD$eJgabkJ6M))$V$05U*DD
DDs;AAAcK|j||f|tj||d{}|std|d|S7w)N)rErFrrzgetaddrinfo(z) returned empty list)rr*r9r.)rrCrDrErrs      r_create_server_getaddrinfoz(BaseEventLoop._create_server_getaddrinfos]++T4L171C1C27d,DDL0EFGGDs*AAAr)
rErr0rrt
reuse_addressr3rrrc

,K	t|trtd|
|td|
|td|t	||||td|	(t
jdk(xrtjdk7}	g}|dk(rdg}n:t|ts$t|tjjs|g}n|}|Dcgc]}|j||||}}tj|d{}t!t"j$j'|}d	}	|D]}|\}}}}}	t)j(|||}|j3||	r/|j5t(j6t(j8d|
rt;|t<rR|t(j>k(r?tAt(d
r/|j5t(jBt(jDd	|jG|d}|sS|D]}|jQn;|td|jRt(jTk7rtd||g}|D]}|jWd	tY|||||||}|
r-|j[tj\dd{|j,rt/j^d||Scc}w7#t(j*$r*|j,rt/j0d
|||dYwxYw#tH$r:}tI|jJd|d|jLjOdd}~wwxYw#|s|D]}|jQwwxYw7խw)Nz*ssl argument must be an SSLContext or Nonerrrposixcygwinr4)rErFz:create_server() failed to create socket.socket(%r, %r, %r)Texc_infoIPPROTO_IPV6rrz)Neither host/port nor sock were specifiedrrz
%r is serving)0rrr=r+rvrCr	r|platformrrTabcIterablerYrrWsetrYrZr[r*rGr{rwarningrAr,r-SO_REUSEADDRr1r@rr)r`IPV6_V6ONLYrr.rrrrrFr9rrrrr)rrrCrDrErr0rrtrZr3rrrrhostsfsr	completedresrKsocktyperG	canonnamesarMrs                           r
create_serverzBaseEventLoop.create_servers	c4 HII ,CE
E +BD
Dd#t/ NPP$ "7 2 Os||x7O
GrzT3' {'?'?@$%11$V8=2?%B% ,,++E	55e<=EI%
% NC9<6B%B!%}}R5ANN4($"--v/B/BDJ!&t,"&//1#FN;(;(;(.(:(:(,.N		"
7N@!	  '%

%| !LMMyyF... #EdX!NOOfG	$DU#	$g'7W&;,.!!#++a.  ;;KK0
E%,"<<!;;"NN,G+-xO!
!0#N%cii)+S\\-?-?-A2CDIMNN! '%

%!(
!sC
NK%+NK*.N2
M3K-B'M3?L-M3B(N<N=.N-9L*&M3)L**M3-	M065M++M00M33NN)rtrrc	rK|jtjk7rtd||
|std|
|std|t	||j|||dd||d{\}}|jr)|jd}tjd|||||fS7@w)	Nrrrr4T)r!rrr*z%r handled: (%r, %r))
rFr*r9r+rvrr{rrr)rrr0rtrrrrs        rconnect_accepted_socketz%BaseEventLoop.connect_accepted_socket"s
99***A$JKK ,SCE
E +CBD
Dd#$($E$E"C"7!5%F%77	8;;++H5DLL/y(K(""7sA2B74B55AB7cK|}|j}|j|||}	|d{|jr&t	j
d|j
||||fS7:#|jxYww)Nz Read pipe %r connected: (%r, %r))rr.rr{rrfilenorrr-rrrs      rconnect_read_pipezBaseEventLoop.connect_read_pipe@s#%##%2246J		LL
;;LL;	8
=(""
	OO++BA0A.A06B.A00BBcK|}|j}|j|||}	|d{|jr&t	j
d|j
||||fS7:#|jxYww)Nz!Write pipe %r connected: (%r, %r))rr0rr{rrrsrts      rconnect_write_pipez BaseEventLoop.connect_write_pipePs#%##%33D(FK		LL
;;LL<	8
=(""
	OOrvcr|g}||jdt||1|tjk(r|jdt|n>||jdt|||jdt|t	j
dj
|y)Nzstdin=zstdout=stderr=zstdout=zstderr= )rAr&r"r$rrrj)rrr4r5r6rs      r_log_subprocesszBaseEventLoop._log_subprocess`suKK&e!4 567&J,=,="=KK.f)=(>?@!gl6&:%;<=!gl6&:%;<=SXXd^$r )	r4r5r6universal_newlinesr3r7encodingerrorstextc		Kt|ttfstd|rtd|std|dk7rtd|rtd|	td|
td|}
d}|jrd	|z}|j|||||j|
|d
||||fi|d{}|jr|tjd||||
fS7-w)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+r{r{r9rr)rrcmdr4r5r6r|r3r7r}r~rr8r	debug_logrs                rsubprocess_shellzBaseEventLoop.subprocess_shellms#s|,344?@@122a<011122455233#%	;;/4I  E66B9$99c4KCIKK	;;90KK)Y7(""	KsB=C/?C-.C/c		K|rtd|rtd|dk7rtd|rtd|	td|
td|f|z}|}d}|jrd|}|j|||||j||d	||||fi|
d{}|jr|t	j
d
||||fS7-w)Nrzshell must be Falserrrrrzexecute program Fr)r+r{r{r9rr)rrprogramr4r5r6r|r3r7r}r~rr2r8
popen_argsrrrs                  rsubprocess_execzBaseEventLoop.subprocess_execs?@@233a<011122455233Z$&
#%	;;+7+6I  E66B9$99j%	;;90KK)Y7(""sB"C$C%.Cc	|jSrO)rrs rget_exception_handlerz#BaseEventLoop.get_exception_handlers	&&&r cJ	|t|std|||_y)Nz+A callable object or None is expected, got )rr=r)rhandlers  rset_exception_handlerz#BaseEventLoop.set_exception_handlers:
	x'8##*+/0
0")r c	|jd}|sd}|jd}|t|||jf}nd}d|vr;|j/|jjr|jj|d<|g}t|D]}|dvr||}|dk(r:dj
tj|}d	}||jz
}nJ|dk(r:dj
tj|}d
}||jz
}nt|}|j|d|tjdj
||
y)NrSz!Unhandled exception in event looprfFsource_tracebackhandle_traceback>rSrfr4z+Object created at (most recent call last):
z+Handle created at (most recent call last):
r
r^)getrF
__traceback__rrsortedrj	tracebackformat_listrstriprrArrG)	rr
rSrfr_	log_linesrRvaluetbs	         rdefault_exception_handlerz'BaseEventLoop.default_exception_handlerse
	++i(9GKK,	 YI4K4KLHHg-$$0$$66$$66
&'I	'?	0C..CLE((WWY2259:F$**WWY2259:F$UuBug./	0 	TYYy)H=r c	|j	|j|y	d}|jd}||jd}||jd}|t|dr|j}|*t|dr|j|j||y|j||y#ttf$rt$rtjddYywxYw#ttf$rt$r[}	|jd	||d
n:#ttf$rt$rtjddYnwxYwYd}~yYd}~yd}~wwxYw)Nz&Exception in default exception handlerTr^rrorget_contextrunz$Unhandled error in exception handler)rSrfr
zeException in default exception handler while handling an unexpected error in custom exception handler)rrrgrhr-rrGrr)rr)rr
ctxthingrls     rrZz$BaseEventLoop.call_exception_handlersv	*""*	
,..w7$
0F+=$KK1E=#KK1E$
)F++-C?wsE':GGD33T7C++D':3 12
 
,E&*,	
,0 12
 
0022#I%(#*4
#$56$0LL"?+/000	
0sMB8BC-%C-8/C*)C*-E DE/EE
EEE cV	|js|jj|yyrO)
_cancelledrrArrs  r
_add_callbackzBaseEventLoop._add_callbackCs%%  KKv&!r cH	|j||jyrO)rr;rs  r_add_callback_signalsafez&BaseEventLoop._add_callback_signalsafeHsD6"r cJ	|jr|xjdz
c_yyrp)rrrs  r_timer_handle_cancelledz%BaseEventLoop._timer_handle_cancelledMs$A''1,'r cd	t|j}|tkDrr|j|ztkDr\g}|jD]'}|j
rd|_|j
|)tj|||_d|_n|jrz|jdj
ra|xjdzc_tj|j}d|_|jr|jdj
rad}|js|jrd}nP|jrD|jdj}ttd||jz
t }|j"j%|}|j'|d}|j|j(z}|jrm|jd}|j|k\rnNtj|j}d|_|jj
||jrmt|j}t+|D]}	|jj-}|j
r*|j.rr	||_|j}
|j3|j|
z
}||j4k\r t7j8dt;||d|_|j3d}y#d|_wxYw)NFrrzExecuting %s took %.3f seconds)rUr_MIN_SCHEDULED_TIMER_HANDLESr%_MIN_CANCELLED_TIMER_HANDLES_FRACTIONrrArheapifyheappoprr_whenrmaxrMAXIMUM_SELECT_TIMEOUT	_selectorselectr>rrangepopleftr{r_runrrrer)rsched_count
new_scheduledrrnrr=end_timentodoirrs            rrzBaseEventLoop._run_onceRs	$//*66''+55
6M//
1$$(-F%!((0	
1
MM-(+DO*+D'//dooa&8&C&C++q0+t7$)!//dooa&8&C&C
;;$..G
__??1%++D#a		!346LMG^^**73
Z(
99;!7!77oo__Q'F||x']]4??3F %FKKv&
ooDKK u	A[[((*F  {{	0+1D(BKKMr)BT888'G'5f'=rC,0D(
!	",0D(s
 A)L&&	L/c t|t|jk(ry|rDtj|_tj
tj||_ytj
|j||_yrO)rrr|#get_coroutine_origin_tracking_depthr#set_coroutine_origin_tracking_depthrDEBUG_STACK_DEPTHrenableds  rrzz,BaseEventLoop._set_coroutine_origin_trackingsw=D!H!HII779
733++
-3:/
33;;
=3:/r c|jSrO)r{rs rrzBaseEventLoop.get_debugs{{r cl||_|jr|j|j|yyrO)r{rrDrzrs  rrzBaseEventLoop.set_debugs.??%%d&I&I7Sr rO)NNNr<)r)rN)FNN)Urrrrrrrrrr r'r*r.r0r9r;r>rrArHrPr_rqrhrvrrrjrrrLrMrrrrrrrrrrDrrrrrrrrrrrrr%r#r$r2rVr*r9rrYr>
AI_PASSIVErorqrurxr{r"r#rrrrrrZrrrrrzrrrPr rrrs/<
))-d*%""%)$"9=" $t"&!%!%
"CG"
@D(,"
AE)-"04"""7DG
"280DK40$L*.%MM- :>06:$26&%("=A	5 *
2"#!1H7
A(,
A./4**.Z59J#14T"&!%!%$J#\*/"&!%	#8-<#'-<^1"4%*(,.2-1	.+bEID#./q267;$	D#N'(f.@.@%&a
D59|####"&!%|@"&!%	#<# # %&0__&0oo&0oo27%)1(,T
"#J%/OOJOO%/__$)1'+Dt	 #D'
*"0>dF0P'

-
N`
:Tr r)rr)r)5rTcollections.abcconcurrent.futuresrr
rrYrCr*rAr"rfrrr|rLrrtImportErrorr4rrrrrr	r
rrr
rlogr__all__rrr)r@rrr&r1rLrcrmrqrvProtocolrxAbstractServerrAbstractEventLooprrPr r<module>rs*
	

$
 #),%
FJ'	#J8v,"6=!G
>
A)	 2 2A)HnV
"
"nbuTF,,uTA
CsDDD