+
    f4jA                     
   . R=O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Ht ^RIHt ]P                  t ^ RIt^ RIt^ RIHtHtHtHt R>tRt]P6                  ! 4       t^dtR	tR	.t] ! ]R
4      '       d   R
t]R
.,          t]P0                  R8X  d   Rt]R.,          t]3R lt!R t"R t#R t$R t% ! R R4      t&]'       d    ! R R]&4      t' ! R R]&4      t( ! R R])4      t*R?R lt+]P0                  R8w  d   R@R lt,MR@R lt, ! R R])4      t-R t.]P0                  R8X  d    ! R R])4      t/R  t0^(t1R!t2R"t3R#t4]5! 0 RAm4      t6]7! R$ ]6 4       4      t8^t9^t:]9]:3t;R% t<R& t=R' t>RBR( R) llt?R* R+ lt@ ! R, R-])4      tAR. tBR/ tC ! R0 R1]*4      tDR2 tE]P0                  R8X  d"   R3 tF]P                  ]P                  0tIRCR4 ltJM1^ RIKtK] ! ]KR54      '       d   ]KP                  tMM]KP                  tMRCR6 ltJ]P0                  R8X  d5   R7 tOR8 tP]P                  ! ](]O4       R9 tRR: tS]P                  ! ]']R4       R# R; tOR< tP]P                  ! ](]O4       R#   ] d    ]P0                  R8X  d   h Rt EL'i ; i)DClientListenerN)util)AuthenticationErrorBufferTooShort)	reduction)WAIT_OBJECT_0WAIT_ABANDONED_0WAIT_TIMEOUTINFINITEwin32g      4@AF_INETAF_UNIXAF_PIPEc                 :    \         P                  ! 4       V ,           # Ntime	monotonic)timeouts   &,lib/python3.14/multiprocessing/connection.py_init_timeoutr   >   s    >>g%%    c                 2    \         P                  ! 4       V 8  # r   r   )ts   &r   _check_timeoutr   A   s    >>ar   c                   V R8X  d   R# V R8X  dY   \         P                  P                  \        P                  ! 4       R\         P
                  ! ^4      P                  4        24      # V R8X  dO   R\         P                  ! 4       \        \        4      \         P
                  ! ^4      P                  4       3,          # \        R4      h)z7
Return an arbitrary free address for the given family
r   r   zsock-r   z\\.\pipe\pyc-%d-%d-%szunrecognized family)	localhost    )ospathjoinr   get_temp_dirurandomhexgetpidnext_mmap_counter
ValueErrorfamilys   &r   arbitrary_addressr+   H   s     	9	 ww||D--/#BJJqM$5$5$7#89; 	;	9	(d=12::a=3D3D3FGH 	I .//r   c                    \         P                  R8w  d   V R8X  d   \        RV ,          4      h\         P                  R8X  d4   V R8X  d+   \        \        V 4      '       g   \        RV ,          4      hR# R# R# )z<
Checks if the family is valid for the current environment.
r   r   zFamily %s is not recognized.r   N)sysplatformr(   hasattrsocketr)   s   &r   _validate_familyr1   Z   sf     ||w6Y#67&@AA
||w6Y#6vv&&;fDEE ' $7r   c                   \        V 4      \        8X  d   R# \        V 4      \        J d   V P                  R4      '       d   R# \        V 4      \        J g   \        P
                  ! V 4      '       d   R# \        RV ,          4      h)zQ
Return the types of the address

This can be 'AF_INET', 'AF_UNIX', or 'AF_PIPE'
r   z\\r   r   zaddress type of %r unrecognized)typetuplestr
startswithr   is_abstract_socket_namespacer(   )addresss   &r   address_typer9   f   sb     G}	g#	'"4"4V"<"<	g#	!B!B7!K!K:WDEEr   c                      a  ] tR t^yt o RtRR ltR tR tR tR t	R t
]R 4       t]R	 4       t]R
 4       tR tR tR tRR ltR tRR ltRR ltR tRR ltR tR tRtV tR# )_ConnectionBaseNc                    VP                  4       pV^ 8  d   \        R4      hV'       g   V'       g   \        R4      hWn        W n        W0n        R# )r   zinvalid handlez6at least one of `readable` and `writable` must be TrueN)	__index__r(   _handle	_readable	_writable)selfhandlereadablewritables   &&&&r   __init___ConnectionBase.__init__|   sI    !!#A:-..HJ J!!r   c                F    V P                   e   V P                  4        R # R # r   r>   _closerA   s   &r   __del___ConnectionBase.__del__   s    <<#KKM $r   c                8    V P                   f   \        R4      hR # )Nhandle is closed)r>   OSErrorrJ   s   &r   _check_closed_ConnectionBase._check_closed   s    <<,--  r   c                @    V P                   '       g   \        R 4      hR# )zconnection is write-onlyN)r?   rO   rJ   s   &r   _check_readable_ConnectionBase._check_readable   s    ~~~455 r   c                @    V P                   '       g   \        R 4      hR# )zconnection is read-onlyN)r@   rO   rJ   s   &r   _check_writable_ConnectionBase._check_writable   s    ~~~344 r   c                l    V P                   '       d	   R V n        MV P                  4        \        R4      h)Fzbad message length)r@   r?   closerO   rJ   s   &r   _bad_message_length#_ConnectionBase._bad_message_length   s'    >>>"DNJJL*++r   c                    V P                   RJ # )z True if the connection is closedNr>   rJ   s   &r   closed_ConnectionBase.closed   s     ||t##r   c                    V P                   # )z"True if the connection is readable)r?   rJ   s   &r   rC   _ConnectionBase.readable        ~~r   c                    V P                   # )z"True if the connection is writable)r@   rJ   s   &r   rD   _ConnectionBase.writable   rb   r   c                :    V P                  4        V P                  # )z+File descriptor or handle of the connection)rP   r>   rJ   s   &r   fileno_ConnectionBase.fileno   s    ||r   c                n    V P                   e    V P                  4        RV n         R# R#   RT n         i ; i)zClose the connectionNrH   rJ   s   &r   rY   _ConnectionBase.close   s1    <<#$#	 $  $s   + 	4c                    RV n         R# )z7Stop managing the underlying file descriptor or handle.Nr]   rJ   s   &r   _detach_ConnectionBase._detach   s	    r   c                   V P                  4        V P                  4        \        V4      pVP                  ^8  d   VP	                  R4      pVP
                  pV^ 8  d   \        R4      hWR8  d   \        R4      hVf
   WR,
          pM*V^ 8  d   \        R4      hW#,           V8  d   \        R4      hV P                  WBW#,            4       R# )z,Send the bytes data from a bytes-like objectBzoffset is negativezbuffer length < offsetNzsize is negativezbuffer length < offset + size)rP   rV   
memoryviewitemsizecastnbytesr(   _send_bytes)rA   bufoffsetsizemns   &&&&  r   
send_bytes_ConnectionBase.send_bytes   s    sO::>sAHHA:122:566<:DAX/00]Q<==&-01r   c                    V P                  4        V P                  4        V P                  \        P	                  V4      4       R# )zSend a (picklable) objectN)rP   rV   rs   _ForkingPicklerdumpsrA   objs   &&r   send_ConnectionBase.send   s3    ..s34r   c                    V P                  4        V P                  4        Ve   V^ 8  d   \        R4      hV P                  V4      pVf   V P	                  4        VP                  4       # )z'
Receive bytes data as a bytes object.
znegative maxlength)rP   rS   r(   _recv_bytesrZ   getvalue)rA   	maxlengthrt   s   && r   
recv_bytes_ConnectionBase.recv_bytes   sa     	 Y]122y);$$&||~r   c                (   V P                  4        V P                  4        \        V4      ;_uu_ 4       pVP                  pV\	        V4      ,          pV^ 8  d   \        R4      hW%8  d   \        R4      hV P                  4       pVP                  4       pWRV,           8  d   \        VP                  4       4      hVP                  ^ 4       VP                  W2V,          W',           V,           4       VuuRRR4       #   + '       g   i     R# ; i)zY
Receive bytes data into a writeable bytes-like object.
Return the number of bytes read.
znegative offsetzoffset too largeN)rP   rS   ro   rp   lenr(   r   tellr   r   seekreadinto)rA   rt   ru   rw   rp   bytesizeresultrv   s   &&&     r   recv_bytes_into_ConnectionBase.recv_bytes_into   s    
 	__zzH#a&(Hz !233" !344%%'F;;=D4-'$V__%677KKNOOA0%}9; <! ___s   CD  D	c                    V P                  4        V P                  4        V P                  4       p\        P	                  VP                  4       4      # )zReceive a (picklable) object)rP   rS   r   r|   loads	getbuffer)rA   rt   s   & r   recv_ConnectionBase.recv   s?     $$S]]_55r   c                d    V P                  4        V P                  4        V P                  V4      # )z/Whether there is any input available to be read)rP   rS   _pollrA   r   s   &&r   poll_ConnectionBase.poll  s)    zz'""r   c                    V # r    rJ   s   &r   	__enter___ConnectionBase.__enter__      r   c                &    V P                  4        R # r   rY   rA   exc_type	exc_valueexc_tbs   &&&&r   __exit___ConnectionBase.__exit__      

r   )r>   r?   r@   )TTr   Nr   r   )g        )__name__
__module____qualname____firstlineno__r>   rE   rK   rP   rS   rV   rZ   propertyr^   rC   rD   rf   rY   rk   ry   r   r   r   r   r   r   r   __static_attributes____classdictcell____classdict__s   @r   r;   r;   y   s     G	".65, $ $    
$2(526# r   r;   c                   h   a  ] tR tRt o RtRtRt]P                  3R lt	R t
RR ltR tR	 tR
tV tR# )PipeConnectioni  z
Connection class based on a Windows named pipe.
Overlapped I/O is used, so the handles must have been created
with FILE_FLAG_OVERLAPPED.
FNc                j    V P                   pVe   VP                  4        V! V P                  4       R # r   )_send_ovcancelr>   )rA   _CloseHandleovs   && r   rI   PipeConnection._close  s%    B~		&r   c                T   V P                   e   \        R4      h\        P                  ! V P                  VRR7      w  r#W n          V\        P
                  8X  d5   \        P                  ! VP                  .R\        4      pV\        8X  g   Q hR T n         TP                  R4      w  rST\        P                  8X  d   \        \        P                  R4      hT^ 8X  g   Q hT\!        T4      8X  g   Q hR #    TP                  4        h ; i  R T n         TP                  R4      w  rSi ; i)Nz/concurrent send_bytes() calls are not supportedT
overlappedFrN   )r   r(   _winapi	WriteFiler>   ERROR_IO_PENDINGWaitForMultipleObjectseventr   r   r   GetOverlappedResultERROR_OPERATION_ABORTEDrO   errnoEPIPEr   )rA   rt   r   errwaitresnwrittens   &&    r   rs   PipeConnection._send_bytes&  s   }}(  "5 6 6''cdKGBM
='222%<<
E85G"m333
 !% " 6 6t <g555 ekk+=>>!8O8s3x'''		 $ " 6 6t <#s   A	C5 5DD D'c                B   V P                   '       d   R V n         \        P                  ! 4       # Vf   ^M\        V^4      p \        P
                  ! V P                  VRR7      w  r4\        4       pTp  V\        P                  8X  d5   \        P                  ! VP                  .R \        4      pV\        8X  g   Q hTP                  R4      w  rT^ 8X  d8   \        P                  ! 4       p	T	P                  TP!                  4       4       T	pM&T\        P"                  8X  d   T P%                  Y14      pYeJd   T#  \/        R4      h   TP                  4        h ; i  TP                  R4      w  rT^ 8X  d8   \        P                  ! 4       p	T	P                  TP!                  4       4       T	pi T\        P"                  8X  d   T P%                  Y14      pi i ; i   YeJ d   h  L; i  \&         d,   p
T
P(                  \        P*                  8X  d   \,        hh Rp
?
ii ; i)FNTr   z.shouldn't get here; expected KeyboardInterrupt)_got_empty_messageioBytesIOminr   ReadFiler>   objectr   r   r   r   r   r   r   writer   ERROR_MORE_DATA_get_more_datarO   winerrorERROR_BROKEN_PIPEEOFErrorRuntimeError)rA   maxsizebsizer   r   sentinelreturn_valuer   nreadfes   &&         r   r   PipeConnection._recv_bytes@  s   &&&*/'zz|#&C4E!%..t||U;?AGB  &xH#+L"P"g&>&>>*1*H*H%'XXJx+A'.-'? ?'?
 *,)?)?)EJE"ax$&JJL ! 7/0!$(?(?!?/3/B/B2/O
 $3++ 4 OPP-"IIK!)+)?)?)EJE"ax$&JJL ! 7/0!$(?(?!?/3/B/B2/O "@"'3! 4
  zzW%>%>>&	s]   1G( 5A	E >AG G( &G 5G( EE A:GG G%#G( (H3&HHc                    V P                   '       g-   \        P                  ! V P                  4      ^ ,          ^ 8w  d   R# \	        \        V .V4      4      # )r   T)r   r   PeekNamedPiper>   boolwaitr   s   &&r   r   PipeConnection._pollj  sA    '''--dll;A>!CdVW-..r   c                   VP                  4       p\        P                  ! 4       pVP                  V4       \        P
                  ! V P                  4      ^,          pV^ 8  g   Q hVe(   \        V4      V,           V8  d   V P                  4        \        P                  ! V P                  VRR7      w  rVP                  R4      w  rvV^ 8X  g   Q hWu8X  g   Q hVP                  VP                  4       4       V# )   Tr   )r   r   r   r   r   r   r>   r   rZ   r   r   )rA   r   r   rt   r   leftr   rbytess   &&&     r   r   PipeConnection._get_more_datap  s    ,,.C

AGGCL((6q9D!8O8"s3x$'@((*&&t||TdKGB006KF!8O8>!>GGBLLN#Hr   )r   r   r   )r   r   r   r   __doc__r   r   r   CloseHandlerI   rs   r   r   r   r   r   r   s   @r   r   r     s@     	
 #&-&9&9 	'	(4(	QT	/	 	r   r   c                     a  ] tR tRt o Rt]'       d*   ]P                  3R lt]P                  t
]P                  tM(]P                  3R lt]P                  t
]P                   t]
3R lt]3R ltR tRR	 ltR
 tRtV tR# )
Connectioni  zc
Connection class based on an arbitrary file descriptor (Unix only), or
a socket handle (Windows).
c                *    V! V P                   4       R # r   r]   rA   rI   s   &&r   rI   Connection._close      4<< r   c                *    V! V P                   4       R # r   r]   r   s   &&r   rI   r     r   r   c                n    \        V4      p V! V P                  V4      pW4,          pV^ 8X  d   R# WR pK+  )TN)r   r>   )rA   rt   r   	remainingrx   s   &&&  r   _sendConnection._send  s8    H	dllC(ANIA~b'Cr   c                   \         P                  ! 4       pV P                  pTpV^ 8  d]   \        \        V4      pV! WF4      p\        V4      pV^ 8X  d   WQ8X  d   \        h\        R4      hVP                  V4       WX,          pKc  V# )r   zgot end of file during message)	r   r   r>   r   BUFSIZEr   r   rO   r   )	rA   rv   readrt   rB   r   to_readchunkrx   s	   &&&      r   _recvConnection._recv  sw    jjl	!m'9-G)EE
AAv$"N!"BCCIIeNI
r   c                   \        V4      pVR 8  dd   \        P                  ! RR4      p\        P                  ! RV4      pV P                  V4       V P                  V4       V P                  V4       R# \        P                  ! RV4      pVR8  d%   V P                  V4       V P                  V4       R# V P                  WA,           4       R# )i!i!Qi @  N)r   structpackr   )rA   rt   rx   
pre_headerheaders   &&   r   rs   Connection._send_bytes  s    Hz>T2.J[[q)FJJz"JJvJJsO [[q)F5y 

6"

3 

6<(r   Nc                *   V P                  ^4      p\        P                  ! RVP                  4       4      w  pVR8X  d9   V P                  ^4      p\        P                  ! RVP                  4       4      w  pVe	   W18  d   R# V P                  V4      # )   r  r  Nr  )r   r  unpackr   )rA   r   rt   rv   s   &&  r   r   Connection._recv_bytes  so    jjmdCLLN32:**Q-CMM$7ED4>zz$r   c                2    \        V .V4      p\        V4      # r   )r   r   )rA   r   rs   && r   r   Connection._poll  s    $!Awr   r   r   )r   r   r   r   r   r   _multiprocessingclosesocketrI   r   _writer   _readr   rY   r   r   r   r   rs   r   r   r   r   r   s   @r   r   r     sw     
  0 < < 	!!&& %% " 	!%   % ").  r   r   c                   f   a  ] tR tRt o RtRR ltR tR t]R 4       t	]R 4       t
R	 tR
 tRtV tR# )r   i  z
Returns a listener object.

This is a wrapper for a bound socket which is 'listening' for
connections, or for a Windows named pipe.
Nc                t   T;'       g$    T;'       d    \        V4      ;'       g    \        p\        V4       Ve"   \        V\        4      '       g   \        R4      hVR8X  dS   V'       d   \        W4      V n        M_\        P                  ! 4        F  p\        V4      p \        W4      V n         M)	  M&T;'       g    \        V4      p\#        WV4      V n        W@n        R #   \         dH   pT\        8  d   h TP                  \        P                  \        P                   39  d   h  R p?K  R p?ii ; i)Nauthkey should be a byte stringr   )r9   default_familyr1   
isinstancebytes	TypeErrorPipeListener	_listener	itertoolscountr+   rO   _MAX_PIPE_ATTEMPTSr   r   ERROR_PIPE_BUSYERROR_ACCESS_DENIEDSocketListener_authkey)rA   r8   r*   backlogauthkeyattemptsr   s   &&&&&  r   rE   Listener.__init__  s    # #G==W(= # #" 	 z'5'A'A=>>Y!-g!? ) 1H/7G")5g)G	 !2 ::!26!:G+GWEDN # "#'99!::g.E.E.5.I.I.K K!K"s   "C%%D70<D22D7c                    V P                   f   \        R4      hV P                   P                  4       pV P                  e+   \	        WP                  4       \        WP                  4       V# )zb
Accept a connection on the bound socket or named pipe of `self`.

Returns a `Connection` object.
zlistener is closed)r  rO   acceptr#  deliver_challengeanswer_challenge)rA   cs   & r   r)  Listener.accept  sS     >>!.//NN!!#==$a/Q.r   c                X    V P                   pVe   RV n         VP                  4        R# R# )z1
Close the bound socket or named pipe of `self`.
N)r  rY   )rA   listeners   & r   rY   Listener.close  s)     >>!DNNN  r   c                .    V P                   P                  # r   )r  _addressrJ   s   &r   r8   Listener.address  s    ~~&&&r   c                .    V P                   P                  # r   )r  _last_acceptedrJ   s   &r   last_acceptedListener.last_accepted  s    ~~,,,r   c                    V # r   r   rJ   s   &r   r   Listener.__enter__  r   r   c                &    V P                  4        R # r   r   r   s   &&&&r   r   Listener.__exit__  r   r   )r#  r  )NNr   N)r   r   r   r   r   rE   r)  rY   r   r8   r6  r   r   r   r   r   s   @r   r   r     sP      8 ' ' - - r   c                    T;'       g    \        V 4      p\        V4       VR8X  d   \        V 4      pM\        V 4      pVe"   \	        V\
        4      '       g   \        R4      hVe   \        W24       \        W24       V# )z5
Returns a connection to the address of a `Listener`
r   r  )	r9   r1   
PipeClientSocketClientr  r  r  r+  r*  )r8   r*   r%  r,  s   &&& r   r   r     ss     ,,|G,FVw!:gu#=#=9::$!%Hr   c                V   V '       do   \         P                  ! 4       w  rVP                  R4       VP                  R4       \        VP	                  4       4      p\        VP	                  4       4      pW43# \
        P                  ! 4       w  rV\        VRR7      p\        VRR7      pW43# )<
Returns pair of connection objects at either end of a pipe
TFrD   rC   )r0   
socketpairsetblockingr   detachr   pipe)duplexs1s2c1c2fd1fd2s   &      r   PiperN  6  s     &&(FBNN4 NN4 BIIK(BBIIK(B v	 wwyHCC%0BC%0Bvr   c                   V '       dB   \         P                  p\         P                  \         P                  ,          p\        \        rCM'\         P
                  p\         P                  p^ \        rC\        P                  ! 4        F  p\        R4      p \         P                  ! Wa\         P                  ,          \         P                  ,          \         P                  \         P                  ,          \         P                  ,          ^W4\         P                  \         P                   4      p M	  \         P,                  ! XV^ \         P                   \         P.                  \         P                  \         P                   4      p	\         P0                  ! V	\         P                  RR4       \         P2                  ! XRR7      p
V
P5                  R4      w  rV^ 8X  g   Q h\7        WpR7      p\7        WR7      pW3#   \"         dI   pT\$        8  d   h TP&                  \         P(                  \         P*                  39  d   h  Rp?EK  Rp?ii ; i)r@  r   NTr   rA  rB  )r   PIPE_ACCESS_DUPLEXGENERIC_READGENERIC_WRITEr   PIPE_ACCESS_INBOUNDr  r  r+   CreateNamedPipeFILE_FLAG_OVERLAPPEDFILE_FLAG_FIRST_PIPE_INSTANCEPIPE_TYPE_MESSAGEPIPE_READMODE_MESSAGE	PIPE_WAITNMPWAIT_WAIT_FOREVERNULLrO   r  r   r   r!  
CreateFileOPEN_EXISTINGSetNamedPipeHandleStateConnectNamedPiper   r   )rG  openmodeaccessobsizeibsizer&  r8   h1r   h2r   _r   rJ  rK  s   &              r   rN  rN  I  s    11H))G,A,AAF$gF22H**FF!)H'	2G,,(D(DD99:--0M0MM%%&vw'C'CLL  *& VQg.C.C((',, 	''--tT	 --bTB
//5axxB0B0v+  11::g&=&=&-&A&A&C CCs   BG<<I<I

Ic                   :   a  ] tR tRt o RtRR ltR tR tRtV t	R# )	r"  i~  zG
Representation of a socket which is bound to an address and listening
c                   \         P                   ! \        \         V4      4      V n         \        P                  R 8X  d:   V P                  P                  \         P                  \         P                  ^4       V P                  P                  R4       V P                  P                  V4       V P                  P                  V4       V P                  P                  4       V n        Y n        RT n        TR8X  dM   \"        P$                  ! T4      '       g1   \"        P&                  ! T \        P(                  T3^ R7      T n        R# RT n        R#   \         d    T P                  P                  4        h i ; i)posixTNr   argsexitpriority)r0   getattr_socketr   name
setsockopt
SOL_SOCKETSO_REUSEADDRrD  bindlistengetsocknamer2  rO   rY   _familyr5  r   r7   Finalizeunlink_unlink)rA   r8   r*   r$  s   &&&&r   rE   SocketListener.__init__  s   }}WVV%<=	ww'!''(9(9(.(;(;Q@LL$$T*LLg&LL( LL446DM "Yt'H'H'Q'Q==biiwjqDL  DL  	LL 	s   B>E 'E9c                    V P                   P                  4       w  qn        VP                  R 4       \	        VP                  4       4      # T)rn  r)  r5  rD  r   rE  rA   ss   & r   r)  SocketListener.accept  s7    !%!4!4!6	d!((*%%r   c                     V P                   P                  4        V P                  pVe   R V n        V! 4        R # R #   T P                  pTe   R T n        T! 4        i i ; ir   )rn  rY   ry  )rA   rx  s   & r   rY   SocketListener.close  s[    	LL \\F!# " \\F!# "s	   > !A)r2  rv  r5  rn  ry  N)r   )
r   r   r   r   r   rE   r)  rY   r   r   r   s   @r   r"  r"  ~  s      2&
 r   r"  c                $   \        V 4      p\        P                  ! \        \        V4      4      ;_uu_ 4       pVP                  R4       VP	                  V 4       \        VP                  4       4      uuRRR4       #   + '       g   i     R# ; i)zG
Return a connection object connected to the socket given by `address`
TN)r9   r0   rm  rD  connectr   rE  )r8   r*   r~  s   &  r   r>  r>    s[     '"F	/	1	1Q	d			'!((*% 
2	1	1	1s   ;A>>B	c                   N   a  ] tR tRt o RtR	R ltR
R ltR t]R 4       t	Rt
V tR# )r  i  z 
Representation of a named pipe
Nc                   Wn         V P                  R R7      .V n        RV n        \        P
                  ! RV P                   4       \        P                  ! V \        P                  V P                  V P                   3^ R7      V n	        R# )T)firstNz listener created with address=%rrj  )
r2  _new_handle_handle_queuer5  r   	sub_debugrw  r  _finalize_pipe_listenerrY   )rA   r8   r$  s   &&&r   rE   PipeListener.__init__  sj    #M"&"2"2"2">!?D"&DNN=t}}Ml::(($--8qDJr   c           
        \         P                  \         P                  ,          pV'       d   V\         P                  ,          p\         P                  ! V P
                  V\         P                  \         P                  ,          \         P                  ,          \         P                  \        \        \         P                  \         P                  4      # r   )r   rP  rU  rV  rT  r2  rW  rX  rY  PIPE_UNLIMITED_INSTANCESr   rZ  r[  )rA   r  flagss   && r   r  PipeListener._new_handle  s    ..1M1MME>>>**u))G,I,II!!"00'7,,gll r   c                h   V P                   P                  V P                  4       4       V P                   P                  ^ 4      p \        P
                  ! VRR7      p \        P                  ! VP                  .R\        4      p TP                  R4      w  rET^ 8X  g   Q h \        T4      #    TP                  4        \        P                  ! T4       h ; i  TP                  R4      w  rET^ 8X  g   Q hi ; i  \         d+   pTP                  \        P                  8w  d   h  Rp?LRp?ii ; i)r   Tr   FN)r  appendr  popr   r_  r   r   r   r   r   r   rO   r   ERROR_NO_DATAr   )rA   rB   r   resrf  r   r   s   &      r   r)  PipeListener.accept  s   %%d&6&6&89''++A.F$--fF	$!88
E85C  33D9FA!8O8!&))IIK''/33D9FA!8O8  ::!6!66 7s0   C< 'B/ /)CC C9<D1 D,,D1c                r    \         P                  ! R V4       V  F  p\        P                  ! V4       K  	  R# )z closing listener with address=%rN)r   r  r   r   )queuer8   rB   s   && r   r  $PipeListener._finalize_pipe_listener  s)    NN=wG##F+  r   )r2  r  r5  rY   r   )F)r   r   r   r   r   rE   r  r)  staticmethodr  r   r   r   s   @r   r  r    s-     			
		*. 
	, 
	,r   r  c           	     R   \        4       p  \        P                  ! V R4       \        P                  ! V \        P                  \        P
                  ,          ^ \        P                  \        P                  \        P                  \        P                  4      p \        P                  ! T\        P                  RR4       \!        T4      #   \         dN   pTP                  \        P                  \        P                  39  g   \        T4      '       d   h  Rp?EK  Rp?ii ; i)zE
Return a connection object connected to the pipe given by `address`
  N)r   r   WaitNamedPiper\  rQ  rR  r[  r]  rU  rO   r   ERROR_SEM_TIMEOUTr   r   r^  rX  r   )r8   r   hr   s   &   r   r=  r=    s     O%%gt4&&W11G4I4IIw||W%:%:00',,  	''w,,dD	 a    ::g&?&?&-&=&=&? ?BPQRBSBS CTs   BC D&AD!!D&s   #CHALLENGE#s	   #WELCOME#s	   #FAILURE#c              #   8   "   T F  p\        V4      x  K  	  R # 5ir   )r   ).0rf  s   & r   	<genexpr>r  p  s     7&6c!ff&6s   c                $   \        V 4      \        9   d   RV 3# V P                  R4      '       dT   V P                  R^\        ^,           4      ;p^ 8  d/   V ^V pV\
        9   d   W^,           R pVP                  R4      V3# \        RV : 24      h)zReturns a digest name and the payload for a response hash.

If a legacy protocol is detected based on the message length
or contents the digest name returned will be empty to indicate
legacy mode where MD5 and no digest prefix should be sent.
    {   }NasciizRunsupported message length, missing digest prefix, or unsupported digest: message=)r   _LEGACY_LENGTHSr6   find_MAX_DIGEST_LEN_ALLOWED_DIGESTSdecoder   )messagecurlydigestpayloads   &   r   _get_digest_name_and_payloadr  {  s     7|&
 7{4  ,,tQ(9:	:a?5!%%Agh'G==)722
/&-Z12 2r   c                   ^ RI p\        V4      ^ ,          pV'       g"    VP                  WR4      P                  4       # VP                  WV4      P                  4       pRVP                  R4      V3,          #   \         d    Rp LIi ; i)ao  Create a MAC based on authkey and message

The MAC algorithm defaults to HMAC-MD5, unless MD5 is not available or
the message has a '{digest_name}' prefix. For legacy HMAC-MD5, the response
is the raw MAC, otherwise the response is prefixed with '{digest_name}',
e.g. b'{sha256}abcdefg...'

Note: The MAC protects the entire message including the digest_name prefix.
Nmd5sha256   {%s}%sr  )hmacr  newr  r(   encode)r%  r  r  digest_nameresponses   &&   r   _create_responser    s     .w7:K	#88Ge4;;== xx+6==?H**73X>>>  	# #K		#s   A: :B
	B
c           
        ^ RI p\        V4      w  rET;'       g    Rp VP                  WV4      P                  4       p\        T4      \        T4      8w  d(   \        RT: R\        T4       R\        T4       24      hTP                  Ye4      '       g   \        R4      hR#   \         d    \        RT: R24      hi ; i)	aH  Verify MAC challenge

If our message did not include a digest_name prefix, the client is allowed
to select a stronger digest_name from _ALLOWED_DIGESTS.

In case our message is prefixed, a client cannot downgrade to a weaker
algorithm, because the MAC is calculated over the entire message
including the '{digest_name}' prefix.
Nr  zresponse_digest=z unsupportedz	expected z of length z got zdigest received was wrong)r  r  r  r  r(   r   r   compare_digest)r%  r  r  r  response_digestresponse_macexpecteds   &&&    r   _verify_challenger    s     $@$J!O%..OE88Go>EEG 8}L))!O.k#h- I<()+, 	, x66!"=>> 7  E!%5_$6l"CDDEs    B# #B?c                $    V ^8  d   QhR\         /#    r%  r  )formats   "r   __annotate__r    s     ( (5 (r   c                    \        V\        4      '       g$   \        R P                  \	        V4      4      4      h\
        \        8  g   Q R4       h\        P                  ! \
        4      pRVP                  R4      V3,          pV P                  \        V,           4       V P                  R4      p \        WV4       V P                  \        4       R#   \         d    T P                  \         4       h i ; i) Authkey must be bytes, not {0!s}zprotocol constraintr  r     N)r  r  r(   r  r3   MESSAGE_LENGTH_MD5ONLY_MESSAGE_LENGTHr   r#   r  ry   
_CHALLENGEr   r  _WELCOMEr   _FAILURE)
connectionr%  r  r  r  s   &&&  r   r*  r*    s    gu%%.55d7mDF 	F33J5JJ3jj(G;--g6@@G *w./$$S)H('H5
 	h'	  h's   2C "C7c                $    V ^8  d   QhR\         /# r  r  )r  s   "r   r  r    s     > >% >r   c                    \        V\        4      '       g$   \        R P                  \	        V4      4      4      hV P                  R4      pVP                  \        4      '       g   \        RV: 24      hV\        \        4      R p\        V4      \        8  d   \        R\        V4       R24      h\        W4      pV P                  V4       V P                  R4      pV\        8w  d   \        R4      hR# )r  r  z,Protocol error, expected challenge: message=Nzchallenge too short: z byteszdigest sent was rejected)r  r  r(   r  r3   r   r6   r  r   r   r  r  ry   r  )r  r%  r  r  r  s   &&   r   r+  r+    s    gu%%.55d7mDF 	F##C(Gj))!?wjAC 	Cc*o&'G
7|--!$9#g,v"NOOg/F&!$$S)H8!"<== r   c                   2   a  ] tR tRt o R tR tR tRtV tR# )ConnectionWrapperi  c                j    Wn         W n        W0n        R F  p\        W4      p\	        WV4       K  	  R# )rf   N)rf   rY   r   r   ry   )_conn_dumps_loadsrm  setattr)rA   connr}   r   attrr   s   &&&&  r   rE   ConnectionWrapper.__init__  s0    
KD$%CD$ Lr   c                ^    V P                  V4      pV P                  P                  V4       R # r   )r  r  ry   )rA   r   r~  s   && r   r   ConnectionWrapper.send  s"    KK

a r   c                X    V P                   P                  4       pV P                  V4      # r   )r  r   r  r}  s   & r   r   ConnectionWrapper.recv  s"    JJ!!#{{1~r   )r  r  r  N)	r   r   r   r   rE   r   r   r   r   r   s   @r   r  r    s     %! r   r  c                 T    \         P                  V 3R R R ^4      P                  R4      # )Nutf-8)	xmlrpclibr}   r  )r   s   &r   
_xml_dumpsr    s&    ??C64tQ7>>wGGr   c                 V    \         P                  V P                  R 4      4      w  w  rV# )r  )r  r   r  )r~  r   methods   &  r   
_xml_loadsr    s"    __QXXg%67NFSJr   c                   &   a  ] tR tRt o R tRtV tR# )XmlListeneri
  c                b    ^ RI Hs \        P	                  V 4      p\        V\        \        4      # r   )xmlrpc.clientclientr  r   r)  r  r  r  r~   s   & r   r)  XmlListener.accept  s"    )ood# j*==r   r   N)r   r   r   r   r)  r   r   r   s   @r   r  r  
  s     > >r   r  c                  J    ^ RI Hs \        \	        V / VB \
        \        4      # r   )r  r  r  r  r   r  r  )rk  kwdss   *,r   	XmlClientr    s    %VT2T2J
KKr   c                 J  a \        V 4      o. p\        S4      ^<8  d    \        P                  ! SRV4      pTP                  T3R lT 4       4       T'       dB   \        S4       UUu. uF)  w  rEYC^ ,          T,          u;8  d
   T9  g   K#  M K'  TNK+  	  uppo^ pS'       d   \        S4      ^<8  d
   SR,          MSp\        P                  ! VRV4      pV\        8X  d    V# \        Tu;8:  d   \        \        S4      ,           8  d   M MV\        ,          pMC\        Tu;8:  d   \        \        S4      ,           8  d   M MV\        ,          pM\        R4      hVP                  SV,          4       SV^,           R o^ pK  V#   \         d    . u # i ; iu uppi )<   Fc              3   6   <"   T F  pSV,          x  K  	  R # 5ir   r   )r  iLs   & r   r  #_exhaustive_wait.<locals>.<genexpr>(  s     +s!1s   :Nr  NzShould not get hereN)listr   r   BatchedWaitForMultipleObjectsTimeoutErrorextend	enumerater   r
   r   r	   r   r  )handlesr   readyr  r  r  short_Lr  s   &&     @r   _exhaustive_waitr    sX    M q6B;;;AugN LL+s++#,Q<M<4111vz3L3LQ3LQ<MG #AafG00%ICl"  #>A(>>}$!SD+;c!f+DD''"#899LL3 #a%&	AG)   	 Ns#   F ) FFFFFc                (  a Vf   \         pM#V^ 8  d   ^ pM\        VR,          R,           4      p\        V 4      p / o. p\        4       p\        4       p V  F  p \	        VR4      p \
        P                  ! V! 4       ^ R4      w  rxV\
        P                  8X  d#   VP                  V4       VSVP                  &   Kg  V'       dW   \        P                  ! 4       R,          R
8  d6    VP                  R4      w  rV'       g   \!        VR4      '       d   RVn        VP%                  V4       ^ pK  	  \+        SP-                  4       V4      pV F  pVP/                  4        K  	  V Fv  p VP                  R4      w  rV\
        P0                  8w  g   K.  SVP                  ,          pVP%                  V4       V^ 8X  g   K[  \!        VR4      '       g   Ko  RVn        Kx  	  TP3                  T3R	 lT 4       4       T  Uu. uF  qUT9   g   K  TNK  	  up#   \         d%   p	RT	P                  rT\        9  d   h  Rp	?	ELRp	?	ii ; i  \         d   p	T	P                  p Rp	?	ELkRp	?	ii ; i  \&         d    TSTP)                  4       &    EK9  i ; i  \         d$   p	T	P                  pT\        9  d   h  Rp	?	EL>Rp	?	ii ; i  T F  pTP/                  4        K  	  T F  p TP                  R4      w  rM0  \         d#   p	T	P                  pT\        9  d   h  Rp	?	MRp	?	ii ; iT\
        P0                  8w  g   K_  STP                  ,          pTP%                  T4       T^ 8X  g   K  \!        TR4      '       g   K  RTn        K  	  i ; iu upi )
Wait till an object in object_list is ready/readable.

Returns list of those objects in object_list which are ready/readable.
Nr  g      ?rf   T:Nr  NFr   c              3   6   <"   T F  pSV,          x  K  	  R # 5ir   r   )r  r  waithandle_to_objs   & r   r  wait.<locals>.<genexpr>  s     I=a.q11=r  )   r  )r   intr  setrm  r   r   rO   r   _ready_errorsr   r  r   r-   getwindowsversionr   r/   r   addAttributeErrorr=   r  keysr   r   update)object_listr   ov_listready_objectsready_handlesorf   r   r   r   rf  r  s   &&         @r   r   r   >  s,    ?Gq[G'D.3./G;'6	8 $$Q1F
"")"2"268Q"E
 g666r*67)"((3
 #"7"7"9""="G1)+)?)?)F $'716J+K+K7; 4%))!,"#= !@ -->-C-C-EwOM 		  33D9FA
 '999)"((3A!%%a(ax #1&:;;37A0   	I=II&=;a}*<;==_ # ""&

Cm3! 4"  $+ 1&'jj1- & 978%akkm49N  **C-/ 0 		  33D9FAs **C-/ 0 '999)"((3A!%%a(ax #1&:;;37A0 " >s   K I-'H>K !K 'I:K A
K +J NNI!I :K  IK I*I%K %I**K -JK JK KJ<<KN$K87N8L%	L 	N L%	%N?(N,N NPollSelectorc                   \        4       ;_uu_ 4       pV  F#  pVP                  V\        P                  4       K%  	  Ve   \        P
                  ! 4       V,           p VP                  V4      pV'       d+   V UUu. uF  w  rgVP                  NK  	  uppuuRRR4       # Vf   KJ  X\        P
                  ! 4       ,
          pV^ 8  g   Ko  VuuRRR4       # u uppi   + '       g   i     R# ; i)r  N)_WaitSelectorregister	selectors
EVENT_READr   r   selectfileobj)r  r   selectorr   deadliner  keyeventss   &&      r   r   r     s     __"!!#y';';< # ">>+g5 0=BCUMSCKKUC _ *"*T^^-="="Q;#( _ D __s6   A#C7C<C
C!C' CCCC/	c                 B   V P                  4       p\        P                  ! V\        P                  \        P                  4      ;_uu_ 4       p^RIHp VP                  V4      p\        W@P                  V P                  33uuRRR4       #   + '       g   i     R# ; i)r   )resource_sharerN)rf   r0   fromfdr   SOCK_STREAMr  r   	DupSocketrebuild_connectionrC   rD   )r  rB   r~  r   dss   &    r   reduce_connectionr&    sd    ]]66>>63E3EFF!) **1-B%MM4=='II GFFFs   5BB	c                 V    V P                  4       p\        VP                  4       W4      # r   rE  r   )r%  rC   rD   socks   &&& r   r$  r$    s     yy{$++-<<r   c                 "   V P                   '       d   \        P                  M^ V P                  '       d   \        P                  M^ ,          p\
        P                  ! V P                  4       V4      p\        W P                   V P                  33# r   )	rC   r   FILE_GENERIC_READrD   FILE_GENERIC_WRITEr   	DupHandlerf   rebuild_pipe_connection)r  ra  dhs   &  r   reduce_pipe_connectionr0    s`    047,,1157--AG  7&]]DMM(JJJr   c                 :    V P                  4       p\        W1V4      # r   )rE  r   )r/  rC   rD   rB   s   &&& r   r.  r.    s    f99r   c                     \         P                  ! V P                  4       4      p\        WP                  V P
                  33# r   )r   DupFdrf   r$  rC   rD   )r  dfs   & r   r&  r&    s.    __T[[]+!Bt}}#EEEr   c                 :    V P                  4       p\        W1V4      # r   r(  )r4  rC   rD   fds   &&& r   r$  r$    s    YY["11r   )r   r   rN  r   i   )NNr|  >      md5   sha256   sha384   sha3_256   sha3_384)r  r   )T__all__r   r   r  r   r-   r0   r  r   r  r   r   r   contextr   ForkingPicklerr|   r  r   r   r	   r
   r   ImportErrorr.   r   CONNECTION_TIMEOUTr  r'   r  r  familiesr/   r   r   r+   r1   r9   r;   r   r   r   r   r   rN  r"  r>  r  r=  r  r  r  r  	frozensetr  maxr  r  _MD5_DIGEST_LENr  r  r  r  r*  r+  r  r  r  r  r  r  r   ERROR_NETNAME_DELETEDr  r   r  r  r  SelectSelectorr&  r$  r  r0  r.  r   r   r   <module>rG     s   3  	  	 
     1 **OO   ! ;
69NH<<7NH - & 0$
FF&X Xv g gTN NjGv GT* <<7&/j)V )X& <<76,v 6,p!> 
r @B 7&677  *O<24?8?2(*>* H>( >L <<7@ ..0M0MNML>` 
 y.))!..!00)6 <<7J= z#45K
: ~'=>F2 z#45a%  
||wGs   I# #JJ