+
     Bi                     N   ^ 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 t]	P4                  R8X  d	   ]! R4      hR tR t ! R R]P<                  4      t ! R R]P@                  4      t! ! R R]PD                  ]PF                  4      t$ ! R R]PJ                  4      t& ! R R4      t' ! R R4      t(R t) ! R R]PT                  4      t+]t,]+t-],t.R# )!    N)base_events)base_subprocess)	constants)
coroutines)events)
exceptions)futures)selector_events)tasks)
transports)loggerwin32z+Signals are not really supported on Windowsc                     R # N )signumframes   &&*/usr/lib/python3.14/asyncio/unix_events.py_sighandler_noopr   '   s        c                 V     \         P                  ! V 4      #   \         d    T u # i ; ir   )oswaitstatus_to_exitcode
ValueError)statuss   &r   r   r   ,   s.    ((00  	s    ((c                      a a ] tR t^6t oRV 3R lltV 3R ltR tR tR tR t	R t
RR	 ltRR
 ltRR ltR tRRRRRRRRRRR/R lltRRRR^dRRRRRRRRRR/R lltR tR tR tR tV 3R ltRtVtV ;t# ) _UnixSelectorEventLoopNc                   < \         SV `  V4       / V n        / V n        \	        4       '       d   \        4       V n        R # \        4       V n        R # r   )super__init___signal_handlers_unix_server_socketscan_use_pidfd_PidfdChildWatcher_watcher_ThreadedChildWatcher)selfselector	__class__s   &&r   r    _UnixSelectorEventLoop.__init__<   s;    " "$&!??.0DM13DMr   c                X  < \         SV `  4        \        P                  ! 4       '       g0   \	        V P
                  4       F  pV P                  V4       K  	  R# V P
                  '       d?   \        P                  ! R V : R2\        V R7       V P
                  P                  4        R# R# )zClosing the loop z@ on interpreter shutdown stage, skipping signal handlers removalsourceN)r   closesysis_finalizinglistr!   remove_signal_handlerwarningswarnResourceWarningclear)r'   sigr)   s   & r   r.   _UnixSelectorEventLoop.closeE   s      ""D112**3/ 3 $$$ 1$ :H I .%)	+
 %%++- %r   c                N    V F  pV'       g   K  V P                  V4       K   	  R # r   )_handle_signal)r'   datar   s   && r   _process_self_data)_UnixSelectorEventLoop._process_self_dataS   s     F'	 r   c                   \         P                  ! V4      '       g   \         P                  ! V4      '       d   \        R 4      hV P	                  V4       V P                  4         \        P                  ! V P                  P                  4       4       \        P                  ! Y#T R4      pYPP                   T&    \        P                  ! T\"        4       \        P$                  ! TR4       R#   \        \        3 d   p\        \        T4      4      hRp?ii ; i  \         d   pT P                   T T P                   '       gN    \        P                  ! R4       M5  \        \        3 d"   p\&        P(                  ! RT4        Rp?MRp?ii ; iTP*                  \*        P,                  8X  d   \        RT R24      hh Rp?ii ; i)z3coroutines cannot be used with add_signal_handler()NFset_wakeup_fd(-1) failed: %ssig  cannot be caught)r   iscoroutine_iscoroutinefunction	TypeError_check_signal_check_closedsignalset_wakeup_fd_csockfilenor   OSErrorRuntimeErrorstrr   Handler!   r   siginterruptr   infoerrnoEINVAL)r'   r7   callbackargsexchandlenexcs   &&&*   r   add_signal_handler)_UnixSelectorEventLoop.add_signal_handlerZ   sv    ""8,,//99 8 9 93	)
   !3!3!56 xtT:%+c"	 MM#/0 U+ G$ 	)s3x((	)  	%%c*(((F((,"G, FKK >EEF yyELL("T#.?#@AA	sZ   &.C/ ;2D /D DDG'GEGF/FGF2GGc                    V P                   P                  V4      pVf   R # VP                  '       d   V P                  V4       R # V P	                  V4       R # r   )r!   get
_cancelledr2   _add_callback_signalsafe)r'   r7   rW   s   && r   r:   %_UnixSelectorEventLoop._handle_signal   sH    &&**3/>&&s+))&1r   c                H   V P                  V4        V P                  V T\        P                  8X  d   \        P
                  pM\        P                  p \        P                  ! Y4       T P                  '       g    \        P                  ! R4       R# R#   \         d     R # i ; i  \         d5   pTP                  \        P                  8X  d   \        RT R24      hh Rp?ii ; i  \        \        3 d#   p\        P                  ! RT4        Rp?R# Rp?ii ; i)Fr@   rA   Nr?   TrB   )rF   r!   KeyErrorrH   SIGINTdefault_int_handlerSIG_DFLrL   rR   rS   rM   rI   r   r   rQ   )r'   r7   handlerrV   s   &&  r   r2   ,_UnixSelectorEventLoop.remove_signal_handler   s    
 	3	%%c* &--00GnnG	MM#' $$$A$$R( -  		  	yyELL("T#.?#@AA		 ( A:C@@AsA   B B,  C. B)(B),C+7/C&&C+.D!?DD!c                    \        V\        4      '       g   \        R V: 24      hV\        P                  ! 4       9  d   \        RV 24      hR# )zsig must be an int, not zinvalid signal number N)
isinstanceintrE   rH   valid_signalsr   )r'   r7   s   &&r   rF   $_UnixSelectorEventLoop._check_signal   sM     #s##6sg>??f**,,5cU;<< -r   c                    \        WW#V4      # r   )_UnixReadPipeTransportr'   pipeprotocolwaiterextras   &&&&&r   _make_read_pipe_transport0_UnixSelectorEventLoop._make_read_pipe_transport   s    %d(EJJr   c                    \        WW#V4      # r   )_UnixWritePipeTransportrn   s   &&&&&r   _make_write_pipe_transport1_UnixSelectorEventLoop._make_write_pipe_transport   s    &t8UKKr   c	           
     p  "   V P                   p
V P                  4       p\        WW#WEWg3R VRV/V	B pV
P                  VP	                  4       V P
                  V4        VG Rj  xL
  V#  L  \        \        3 d    h \         d,    TP                  4        TP                  4       G Rj  xL 
  h i ; i5i)rq   rr   N)r%   create_future_UnixSubprocessTransportadd_child_handlerget_pid_child_watcher_callback
SystemExitKeyboardInterruptBaseExceptionr.   _wait)r'   rp   rU   shellstdinstdoutstderrbufsizerr   kwargswatcherrq   transps   &&&&&&&&&,   r   _make_subprocess_transport1_UnixSelectorEventLoop._make_subprocess_transport   s      --##%)$$(-v2/52=B2 +12 	!!&.."2 $ < <f	F	LL  -. 	 	LLN,,.  	sB   AB6A, #A*$A, (B6*A, ,B3$B3+B.,B33B6c                >    V P                  VP                  V4       R # r   )call_soon_threadsafe_process_exited)r'   pid
returncoder   s   &&&&r   r~   ._UnixSelectorEventLoop._child_watcher_callback   s    !!&"8"8*Er   sslsockserver_hostnamessl_handshake_timeoutssl_shutdown_timeoutc          	       "   V'       d   Vf   \        R4      hM-Ve   \        R4      hVe   \        R4      hVe   \        R4      hVe   Ve   \        R4      h\        P                  ! V4      p\        P                  ! \        P                  \        P
                  ^ 4      p VP                  R4       V P                  WB4      G R j  xL
  MmVf   \        R4      hVP                  \        P                  8w  g    VP                  \        P
                  8w  d   \        RV: 24      hVP                  R4       V P                  WAW5VVR	7      G R j  xL
 w  rW3#  L   TP                  4        h ; i L!5i)
Nz/you have to pass server_hostname when using sslz+server_hostname is only meaningful with ssl1ssl_handshake_timeout is only meaningful with ssl0ssl_shutdown_timeout is only meaningful with ssl3path and sock can not be specified at the same timeFzno path and sock were specified.A UNIX Domain Stream Socket was expected, got )r   r   )r   r   fspathsocketAF_UNIXSOCK_STREAMsetblockingsock_connectr.   familytype_create_connection_transport)
r'   protocol_factorypathr   r   r   r   r   	transportrp   s
   &&&$$$$$  r   create_unix_connection-_UnixSelectorEventLoop.create_unix_connection   s     & EG G ' * !NOO$0 GI I#/ FH H  IK K 99T?D==1C1CQGD  '''333 | !BCCv~~-II!3!33 DTHMO OU#$($E$EC"7!5 %F %7 7	 ""% 4

7s=   B#E:&%E" E E" BE:E8	E: E" "E55E:backlogstart_servingTcleanup_socketc          	       "   \        V\        4      '       d   \        R 4      hVe   V'       g   \        R4      hVe   V'       g   \        R4      hVe   Ve   \        R4      h\        P
                  ! V4      p\        P                  ! \        P                  \        P                  4      pV^ ,          R9  dR    \        P                  ! \        P                  ! V4      P                  4      '       d   \        P                  ! V4        VP#                  V4       M\Vf   \        R4      hVP*                  \        P                  8w  g    VP,                  \        P                  8w  d   \        R	V: 24      hV	'       dM   VP/                  4       pV^ ,          R9  d/    \        P                  ! V4      P0                  V P2                  V&   VP5                  R
4       \6        P8                  ! W.VWTVV4      pV'       d/   VP;                  4        \<        P>                  ! ^ 4      G Rj  xL
  V#   \         d     EL5\         d#   p
\        P                   ! RY*4        Rp
?
EL\Rp
?
ii ; i  \         dX   pTP%                  4        TP&                  \&        P(                  8X  d#   RT: R2p\        \&        P(                  T4      Rhh Rp?i TP%                  4        h ; i  \         d     EL%i ; i L5i)z*ssl argument must be an SSLContext or NoneNr   r   r   z2Unable to check or remove stale UNIX socket %r: %rzAddress z is already in usez-path was not specified, and no sock specifiedr   F)r    ) rh   boolrE   r   r   r   r   r   r   statS_ISSOCKst_moderemoveFileNotFoundErrorrL   r   errorbindr.   rR   
EADDRINUSEr   r   getsocknamest_inor"   r   r   Server_start_servingr   sleep)r'   r   r   r   r   r   r   r   r   r   errrV   msgservers   &&&$$$$$$$    r   create_unix_server)_UnixSelectorEventLoop.create_unix_server  s     c4  HII ,SCE E  +CBD D  IK K 99T?D==1C1CDD Awk)6}}RWWT]%:%:;;		$		$ | CE E v~~-II!3!33 DTHMO O ##%DAwk)68ggdm6J6JD--d3 	##D&2B$'2G$8: !!# ++a.  e )  6LL "*+/6 66  

99 0 00 %TH,>?C!%"2"2C8dB

" )  !s   -K;K;A5K;=9H4 7H4 I1 A$K;K;#-K' AK;-K9.K;4I.?K;I.I.I)#K;)I..K;1K$<AKK$$K;'K62K;5K66K;c           
     &  "    \         P                    TP                  4       p \         P                  ! T4      P                  pT'       d   TMTpT'       g   ^ # T P                  4       p	T P                  T	RYY4T^ 4       T	G Rj  xL
 #   \         d    \        P                  ! R 4      hi ; i  \        \        P                  3 d   p\        P                  ! R4      hRp?ii ; i  \         d    \        P                  ! R4      hi ; i L5i)zos.sendfile() is not availableznot a regular fileN)r   sendfileAttributeErrorr   SendfileNotAvailableErrorrK   ioUnsupportedOperationfstatst_sizerL   rz   _sock_sendfile_native_impl)
r'   r   fileoffsetcountrK   r   fsize	blocksizefuts
   &&&&&     r   _sock_sendfile_native,_UnixSelectorEventLoop._sock_sendfile_nativeb  s     	2KK	M[[]F	MHHV$,,E #E	  "''T4(.y!	Ey%  	26602 2	2
  7 78 	M667KLL	M  	M667KLL	M sb   DB B1  C* DD-DDD"B..D1C'C""C''D*"DDc	                R   VP                  4       p	Ve   V P                  V4       VP                  4       '       d   V P                  WEV4       R # V'       d5   Wh,
          pV^ 8:  d&   V P                  WEV4       VP	                  V4       R # \        V\        P                  ^,          ^,           4      p \        P                  ! WWW4      p
V
^ 8X  d&   V P                  WEV4       VP	                  V4       R # WZ,          pW,          pVf   V P                  W4       V P                  WP                  VWVWVWx4
       R #   \        \        3 d:    Tf   T P                  Y4       T P                  YP                  TYTYVYx4
        R # \         d   pTeU   TP                   \         P"                  8X  d6   \%        T4      \&        Jd#   \'        R\         P"                  4      pYn        TpT^ 8X  d@   \*        P,                  ! R4      pT P                  YET4       TP/                  T4        R p?R # T P                  YET4       TP/                  T4        R p?R # R p?i\0        \2        3 d    h \4         d/   pT P                  YET4       TP/                  T4        R p?R # R p?ii ; i)Nzsocket is not connectedzos.sendfile call failed)rK   remove_writer	cancelled_sock_sendfile_update_filepos
set_resultminr/   maxsizer   r   _sock_add_cancellation_callback
add_writerr   BlockingIOErrorInterruptedErrorrL   rR   ENOTCONNr   ConnectionError	__cause__r   r   set_exceptionr   r   r   )r'   r   registered_fdr   rK   r   r   r   
total_sentfdsentrV   new_excr   s   &&&&&&&&&     r   r   1_UnixSelectorEventLoop._sock_sendfile_native_imply  sA   [[]$
 }-==??..vzJ*IA~226:Nz* 	3;;>A#56	1	F;;r6=DJ qy226:Nz*"
 (88C$C$CS "& &yF[  !12 	B$44S?OOB ? ?f"9B  	')II/I_4
 *-u~~?$'!Q
 !::-/226:N!!#&&226:N!!#&&-. 	 	#..vzJc""	#sD   5D? ?AJ&J&J&BI0#IJ&,
J&7J&8#J!!J&c                b    V^ 8  d(   \         P                  ! W\         P                  4       R# R# r   N)r   lseekSEEK_SET)r'   rK   r   r   s   &&&&r   r   4_UnixSelectorEventLoop._sock_sendfile_update_filepos  s     >HHVR[[1 r   c                :   a a V V3R  lpVP                  V4       R# )c                    < V P                  4       '       d-   SP                  4       pVR8w  d   SP                  V4       R# R# R# )   NrB   )r   rK   r   )r   r   r'   r   s   & r   cbB_UnixSelectorEventLoop._sock_add_cancellation_callback.<locals>.cb  s8    }}[[]8&&r*  r   N)add_done_callback)r'   r   r   r   s   f&f r   r   6_UnixSelectorEventLoop._sock_add_cancellation_callback  s    	+
 	b!r   c                  < WP                   9   d   VP                  4       pMR p\        SV `  V4       Vea   V P                   V,          pV P                   V  \        P
                  ! V4      P                  V8X  d   \        P                  ! V4       R # R # R #   \         d     R # \         d#   p\        P                  ! RY$4        R p?R # R p?ii ; i)Nz/Unable to clean up listening UNIX socket %r: %r)r"   r   r   _stop_servingr   r   r   unlinkr   rL   r   r   )r'   r   r   prev_inor   r)   s   &&   r   r   $_UnixSelectorEventLoop._stop_serving  s    ,,,##%DDd#006H))$/2774=''83IIdO 4	  %  2 &'+2 22s$   ;B C(C1C2CC)r!   r"   r%   r   NN)__name__
__module____qualname____firstlineno__r    r.   r<   rY   r:   r2   rF   rs   rw   r   r~   r   r   r   r   r   r   r   __static_attributes____classdictcell____classcell__r)   __classdict__s   @@r   r   r   6   s     4.(+Z2@
=KL,F0#0#0# !0# #'	0#
 "&0#dPP"P(,P #'P "&	P
 P
 04Pd.GFR2"2 2r   r   c                      a a ] tR tRt oRtRV 3R lltR tR tR tR t	R t
R tR	 tR
 tR tR t]P"                  3R ltRR ltR tR tRtVtV ;t# )rm   i  c                b  < \         SV `  V4       W P                  R &   Wn        W n        VP                  4       V n        W0n        RV n        RV n	        \        P                  ! V P                  4      P                  p\        P                  ! V4      '       gY   \        P                  ! V4      '       g=   \        P                   ! V4      '       g!   RV n        RV n        RV n        \#        R4      h\        P$                  ! V P                  R4       V P                  P'                  V P                  P(                  V 4       V P                  P'                  V P*                  V P                  V P,                  4       Ve.   V P                  P'                  \.        P0                  VR4       R# R# )ro   FNz)Pipe transport is for pipes/sockets only.)r   r    _extra_loop_piperK   _fileno	_protocol_closing_pausedr   r   r   r   S_ISFIFOr   S_ISCHRr   set_blocking	call_soonconnection_made_add_reader_read_readyr	   _set_result_unless_cancelled)r'   loopro   rp   rq   rr   moder)   s   &&&&&& r   r    _UnixReadPipeTransport.__init__  s/   "F

{{}!xx%--d##d##T""DJDL!DNHII
e,

T^^;;TB

T--!\\4+;+;	=JJ  !E!E!'/ r   c                l    V P                  4       '       g   R # V P                  P                  W4       R # r   )
is_readingr  r  )r'   r   rT   s   &&&r   r  "_UnixReadPipeTransport._add_reader  s$      

r,r   c                V    V P                   '       * ;'       d    V P                  '       * # r   )r  r  r'   s   &r   r  !_UnixReadPipeTransport.is_reading  s    <<55$55r   c                   V P                   P                  .pV P                  f   VP                  R4       M#V P                  '       d   VP                  R4       VP                  RV P
                   24       \        V P                  RR 4      pV P                  e`   Ve\   \        P                  ! W P
                  \        P                  4      pV'       d   VP                  R4       MCVP                  R4       M1V P                  e   VP                  R4       MVP                  R4       RP                  R	P                  V4      4      # )
Nclosedclosingfd=	_selectorpollingidleopen<{}> )r)   r   r  appendr  r	  getattrr  r
   _test_selector_event	selectors
EVENT_READformatjoin)r'   rQ   r(   r#  s   &   r   __repr___UnixReadPipeTransport.__repr__  s    ''(::KK!]]]KK	"c$,,()4::{D9::!h&:%::,,	(<(<>GI&F#ZZ#KKKK!}}SXXd^,,r   c                    \         P                  ! V P                  V P                  4      pV'       d   V P                  P                  V4       R# V P                  P                  4       '       d   \        P                  ! R V 4       RV n
        V P                  P                  V P                  4       V P                  P                  V P                  P                  4       V P                  P                  V P                  R4       R#   \        \         3 d     R# \"         d   pT P%                  TR4        Rp?R# Rp?ii ; i)%r was closed by peerTNz"Fatal read error on pipe transport)r   readr	  max_sizer
  data_receivedr  	get_debugr   rQ   r  _remove_readerr  eof_received_call_connection_lostr   r   rL   _fatal_error)r'   r;   rV   s   &  r   r  "_UnixReadPipeTransport._read_ready#  s    	G774<<7D ,,T2::''))KK 7> $

))$,,7

$$T^^%@%@A

$$T%?%?F  !12 	 	Ic#GHH	Is#   +D E E)E*EEc                    V P                  4       '       g   R # RV n        V P                  P                  V P                  4       V P                  P                  4       '       d   \        P                  ! RV 4       R # R # )NTz%r pauses reading)r  r  r  r7  r	  r6  r   debugr  s   &r   pause_reading$_UnixReadPipeTransport.pause_reading5  sV      

!!$,,/::!!LL,d3 "r   c                2   V P                   '       g   V P                  '       g   R # RV n        V P                  P                  V P                  V P
                  4       V P                  P                  4       '       d   \        P                  ! RV 4       R # R # )NFz%r resumes reading)	r  r  r  r  r	  r  r6  r   r=  r  s   &r   resume_reading%_UnixReadPipeTransport.resume_reading=  sb    ===

t||T-=-=>::!!LL-t4 "r   c                    Wn         R # r   r
  r'   rp   s   &&r   set_protocol#_UnixReadPipeTransport.set_protocolE      !r   c                    V P                   # r   rD  r  s   &r   get_protocol#_UnixReadPipeTransport.get_protocolH      ~~r   c                    V P                   # r   r  r  s   &r   
is_closing!_UnixReadPipeTransport.is_closingK      }}r   c                P    V P                   '       g   V P                  R 4       R # R # r   )r  _closer  s   &r   r.   _UnixReadPipeTransport.closeN  s    }}}KK r   c                    V P                   e0   V! RV : 2\        V R7       V P                   P                  4        R # R # Nzunclosed transport r,   r  r5   r.   r'   _warns   &&r   __del___UnixReadPipeTransport.__del__R  5    ::!'x0/$OJJ "r   c           
     `   \        V\        4      '       dZ   VP                  \        P                  8X  d;   V P                  P                  4       '       d   \        P                  ! R WRR7       M-V P                  P                  RVRVRV RV P                  /4       V P                  V4       R# z%r: %sT)exc_infomessage	exceptionr   rp   N)rh   rL   rR   EIOr  r6  r   r=  call_exception_handlerr
  rS  r'   rV   r`  s   &&&r   r:  #_UnixReadPipeTransport._fatal_errorW  s    sG$$eii)?zz##%%XttDJJ--7STDNN	/  	Cr   c                    R V n         V P                  P                  V P                  4       V P                  P	                  V P
                  V4       R# TN)r  r  r7  r	  r  r9  r'   rV   s   &&r   rS  _UnixReadPipeTransport._closee  s9    

!!$,,/

T77=r   c                    V P                   P                  V4       V P                  P                  4        R V n        R V n         R V n        R #   T P                  P                  4        R T n        R T n         R T n        i ; ir   r
  connection_lostr  r.   r  rh  s   &&r   r9  ,_UnixReadPipeTransport._call_connection_lostj  g    	NN**3/JJDJ!DNDJ JJDJ!DNDJ   A 1A?)r  r	  r  r  r  r
  i   r   zFatal error on pipe transport)r   r   r   r   r4  r    r  r  r/  r  r>  rA  rF  rJ  rO  r.   r3   r4   rZ  r:  rS  r9  r   r   r  r  s   @@r   rm   rm     sd     H/<-
6-*G$45" %MM 
>
 r   rm   c                      a a ] tR tRt oRV 3R lltR tR tR tR tR t	R t
R	 tR
 tR tR tR t]P"                  3R ltR tRR ltRR ltR tRtVtV ;t# )rv   it  c                  < \         S
V `  WQ4       W P                  R &   W n        VP	                  4       V n        W0n        \        4       V n        ^ V n	        RV n
        \        P                  ! V P
                  4      P                  p\        P                  ! V4      p\        P                   ! V4      p\        P"                  ! V4      p	V'       g1   V'       g)   V	'       g!   RV n        RV n        RV n        \%        R4      h\        P&                  ! V P
                  R4       V P(                  P+                  V P                  P,                  V 4       V	'       g.   V'       dk   \.        P0                  P3                  R4      '       gF   V P(                  P+                  V P(                  P4                  V P
                  V P6                  4       Ve.   V P(                  P+                  \8        P:                  VR4       R# R# )ro   FNz?Pipe transport is only for pipes, sockets and character devicesaix)r   r    r  r  rK   r	  r
  	bytearray_buffer
_conn_lostr  r   r   r   r   r  r  r   r   r  r  r  r  r/   platform
startswithr  r  r	   r  )r'   r  ro   rp   rq   rr   r  is_charis_fifo	is_socketr)   s   &&&&&&    r   r     _UnixWritePipeTransport.__init__w  sd   %"F
{{}! {xx%--,,t$--%MM$'	7iDJDL!DN D E E 	e,

T^^;;TB
 )@)@)G)GJJ  !7!7!%t/?/?A JJ  !E!E!'/ r   c                   V P                   P                  .pV P                  f   VP                  R4       M#V P                  '       d   VP                  R4       VP                  RV P
                   24       \        V P                  RR 4      pV P                  e   Ve   \        P                  ! W P
                  \        P                  4      pV'       d   VP                  R4       MVP                  R4       V P                  4       pVP                  RV 24       M1V P                  e   VP                  R4       MVP                  R4       R	P                  R
P                  V4      4      # )Nr  r   r!  r"  r#  r$  zbufsize=r%  r&  r'  )r)   r   r  r(  r  r	  r)  r  r
   r*  r+  EVENT_WRITEget_write_buffer_sizer-  r.  )r'   rQ   r(   r#  r   s   &    r   r/   _UnixWritePipeTransport.__repr__  s   ''(::KK!]]]KK	"c$,,()4::{D9::!h&:%::,,	(=(=?GI&F#002GKK(7),-ZZ#KKKK!}}SXXd^,,r   c                ,    \        V P                  4      # r   )lenru  r  s   &r   r  -_UnixWritePipeTransport.get_write_buffer_size  s    4<<  r   c                    V P                   P                  4       '       d   \        P                  ! R V 4       V P                  '       d   V P                  \        4       4       R# V P                  4        R# )r2  N)r  r6  r   rQ   ru  rS  BrokenPipeErrorr  s   &r   r  #_UnixWritePipeTransport._read_ready  sE    ::!!KK/6<<<KK)*KKMr   c                ~   \        V\        4      '       d   \        V4      pV'       g   R # V P                  '       g   V P                  '       dQ   V P                  \
        P                  8  d   \        P                  ! R4       V ;P                  ^,          un        R # V P                  '       gz    \        P                  ! V P                  V4      pT\'        T4      8X  d   R # T^ 8  d   \        T4      TR  pT P(                  P+                  T P                  T P,                  4       V ;P                  V,          un	        V P/                  4        R #   \        \        3 d    ^ p L\        \         3 d    h \"         d7   pT ;P                  ^,          un        T P%                  TR4        R p?R # R p?ii ; i)Nz=pipe closed by peer or os.write(pipe, data) raised exception.#Fatal write error on pipe transport)rh   rt  
memoryviewrv  r  r   !LOG_THRESHOLD_FOR_CONNLOST_WRITESr   warningru  r   writer	  r   r   r   r   r   r:  r  r  _add_writer_write_ready_maybe_pause_protocol)r'   r;   nrV   s   &&  r   r  _UnixWritePipeTransport.write  s@   dI&&d#D???dmmm)"M"MM  H IOOq O|||	HHT\\40 CI~Q!$'+JJ""4<<1B1BC""$ $%56  12   1$!!#'LMs*   3!E F<+F<:
F<F<+F77F<c                B    \         P                  ! V P                  V P                  4      pV\	        V P                  4      8X  d   V P                  P                  4        V P                  P                  V P                  4       V P                  4        V P                  '       d7   V P                  P                  V P                  4       V P                  R 4       R # V^ 8  d   V P                  R V1 R # R #   \        \        3 d     R # \        \        3 d    h \          dv   pT P                  P                  4        T ;P"                  ^,          un        T P                  P                  T P                  4       T P%                  TR4        R p?R # R p?ii ; i)Nr  )r   r  r	  ru  r  r6   r  _remove_writer_maybe_resume_protocolr  r7  r9  r   r   r   r   r   rv  r:  )r'   r  rV   s   &  r   r  $_UnixWritePipeTransport._write_ready  s0   	%t||4A C%%""$

))$,,7++-===JJ--dll;..t4QLL!$ )  !12 	-. 	 	JLL OOq O JJ%%dll3c#HII	Js*   +C: :FF
F(F)A*FFc                    R # )Tr   r  s   &r   can_write_eof%_UnixWritePipeTransport.can_write_eof  s    r   c                    V P                   '       d   R # RV n         V P                  '       gN   V P                  P                  V P                  4       V P                  P                  V P                  R 4       R # R # )NT)r  ru  r  r7  r	  r  r9  r  s   &r   	write_eof!_UnixWritePipeTransport.write_eof  sS    ===|||JJ%%dll3JJ  !;!;TB r   c                    Wn         R # r   rD  rE  s   &&r   rF  $_UnixWritePipeTransport.set_protocol  rH  r   c                    V P                   # r   rD  r  s   &r   rJ  $_UnixWritePipeTransport.get_protocol  rL  r   c                    V P                   # r   rN  r  s   &r   rO  "_UnixWritePipeTransport.is_closing  rQ  r   c                n    V P                   e'   V P                  '       g   V P                  4        R # R # R # r   )r  r  r  r  s   &r   r.   _UnixWritePipeTransport.close  s&    ::!$---NN +8!r   c                    V P                   e0   V! RV : 2\        V R7       V P                   P                  4        R # R # rV  rW  rX  s   &&r   rZ  _UnixWritePipeTransport.__del__  r\  r   c                (    V P                  R 4       R # r   )rS  r  s   &r   abort_UnixWritePipeTransport.abort  s    Dr   c           
     "   \        V\        4      '       d;   V P                  P                  4       '       d   \        P
                  ! R WRR7       M-V P                  P                  RVRVRV RV P                  /4       V P                  V4       R# r^  )	rh   rL   r  r6  r   r=  rc  r
  rS  rd  s   &&&r   r:  $_UnixWritePipeTransport._fatal_error!  sp    c7##zz##%%XttDJJ--7STDNN	/  	Cr   c                L   R V n         V P                  '       d&   V P                  P                  V P                  4       V P                  P                  4        V P                  P                  V P                  4       V P                  P                  V P                  V4       R# rg  )	r  ru  r  r  r	  r6   r7  r  r9  rh  s   &&r   rS  _UnixWritePipeTransport._close/  sh    <<<JJ%%dll3

!!$,,/

T77=r   c                    V P                   P                  V4       V P                  P                  4        R V n        R V n         R V n        R #   T P                  P                  4        R T n        R T n         R T n        i ; ir   rk  rh  s   &&r   r9  -_UnixWritePipeTransport._call_connection_lost7  rn  ro  )ru  r  rv  r	  r  r  r
  r   rp  r   )r   r   r   r   r    r/  r  r  r  r  r  r  rF  rJ  rO  r.   r3   r4   rZ  r  r:  rS  r9  r   r   r  r  s   @@r   rv   rv   t  sk     #/J-0!!%F%8C"
 %MM 
> r   rv   c                   &   a  ] tR tRt o R tRtV tR# )r{   iA  c                    R pV\         P                  8X  d=   \        P                  P	                  R4      '       d   \
        P                  ! 4       w  r8 \         P                  ! V3RVRVRVRVRRRV/VB V n        Ve>   VP                  4        \        VP                  4       R	VR
7      V P                  n        R pVe#   VP                  4        VP                  4        R # R #   Te"   TP                  4        TP                  4        i i ; i)Nrs  r   r   r   r   universal_newlinesFr   wb)	buffering)
subprocessPIPEr/   rw  rx  r   
socketpairPopen_procr.   r%  detachr   )	r'   rU   r   r   r   r   r   r   stdin_ws	   &&&&&&&, r   _start_UnixSubprocessTransport._startC  s    JOO#(?(?(F(F
 $..0NE	 #))E!E).E7=EFLE#(E29E=CEDJ "#'(8$'#R

 " #w" #s   A)C& &'D)r  N)r   r   r   r   r  r   r   r  s   @r   r{   r{   A  s        r   r{   c                   ,   a  ] tR tRt o R tR tRtV tR# )r$   iY  c                    \         P                  ! 4       p\        P                  ! V4      pVP	                  WPP
                  WW#4       R # r   )r   get_running_loopr   
pidfd_openr  _do_wait)r'   r   rT   rU   r  pidfds   &&&*  r   r|   $_PidfdChildWatcher.add_child_handlere  s4    &&(c"s8Jr   c                0   \         P                  ! 4       pVP                  V4        \        P                  ! V^ 4      w  rg\        V4      p\        P                  ! V4       V! W.VO5!   R#   \         d    ^p\        P                  ! RT4        LHi ; i)r   zJchild process pid %d exit status already read:  will report returncode 255N)
r   r  r7  r   waitpidr   ChildProcessErrorr   r  r.   )	r'   r   r  rT   rU   r  _r   r   s	   &&&&&    r   r  _PidfdChildWatcher._do_waitj  s    &&(E"	8

3*IA 07J
(4( ! 	 JNN.		s   A. .$BBr   N)r   r   r   r   r|   r  r   r   r  s   @r   r$   r$   Y  s     K
) )r   r$   c                   R   a  ] tR tRt o R t]P                  3R ltR tR t	Rt
V tR# )r&   i}  c                J    \         P                  ! ^ 4      V n        / V n        R# r   )	itertoolsr   _pid_counter_threadsr  s   &r   r    _ThreadedChildWatcher.__init__  s    %OOA.r   c                    \        V P                  P                  4       4       Uu. uF  pVP                  4       '       g   K  VNK  	  ppV'       d   V! V P                   R 2\
        V R7       R# R# u upi )z0 has registered but not finished child processesr,   N)r1   r  valuesis_aliver)   r5   )r'   rY  threadthreadss   &&  r   rZ  _ThreadedChildWatcher.__del__  sg    (,T]]-A-A-C(D )(Dfoo' 6(D )T^^$$TU! )s   A3A3c                    \         P                  ! 4       p\        P                  ! V P                  R \        V P                  4       2WAW#3RR7      pWPP                  V&   VP                  4        R# )zasyncio-waitpid-T)targetnamerU   daemonN)	r   r  	threadingThread_do_waitpidnextr  r  start)r'   r   rT   rU   r  r  s   &&&*  r   r|   '_ThreadedChildWatcher.add_child_handler  s`    &&(!!)9)9)9$t?P?P:Q9R'S(,8'B)-/ $cr   c                    \         P                  ! V^ 4      w  rV\        V4      pVP                  4       '       d   \        P
                  ! RW'4       TP                  4       '       d   \        P                  ! RY4       MTP                  ! Y5T.TO5!   T P                  P                  T4       R#   \         d    Tp^p\        P                  ! RT4        Li ; i)r   z$process %s exited with returncode %sz8Unknown child process pid %d, will report returncode 255z%Loop %r that handles pid %r is closedN)r   r  r   r6  r   r=  r  r  	is_closedr   r  pop)r'   r  expected_pidrT   rU   r   r   r   s   &&&&&   r   r  !_ThreadedChildWatcher._do_waitpid  s    	7**\15KC 07J~~C)7 >>NNBDN%%hZG$G,'' ! 	 CJNNJ	s   B3 3&CC)r  r  N)r   r   r   r   r    r3   r4   rZ  r|   r  r   r   r  s   @r   r&   r&   }  s'      %MM ( (r   r&   c                      \        \        R 4      '       g   R#  \        P                  ! 4       p \        P                  ! \        P                  ! V ^ 4      4       R#   \
         d     R# i ; i)r  FT)hasattrr   getpidr.   r  rL   )r   s    r   r#   r#     sR    2|$$iik
sA&'   s   A A A+*A+c                       ] tR tRt]tRtR# )_UnixDefaultEventLoopPolicyi  r   N)r   r   r   r   r   _loop_factoryr   r   r   r   r  r    s    *Mr   r  )SelectorEventLoop	EventLoop)/rR   r   r  r   r+  rH   r   r   r  r/   r  r3    r   r   r   r   r   r   r	   r
   r   r   logr   __all__rw  ImportErrorr   r   BaseSelectorEventLoopr   ReadTransportrm   _FlowControlMixinWriteTransportrv   BaseSubprocessTransportr{   r$   r&   r#   _BaseDefaultEventLoopPolicyr  r  _DefaultEventLoopPolicyr  r   r   r   <module>r     s    	  	      
              <<7
C
DD	
k2_BB k2\MZ55 M`Jj::(77JZ FF  0") ")H:( :(x	+&"D"D +
 + 5 	r   