+
    Bi
                         ^ 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 R4      t ! R R4      t ! R R]P                  4      t ! R	 R
]4      t ! R R]4      tR# )    N)supportc            
          a  ] tR t^t o R tRR/R ltR tR tR tR]	P                  R	R
R]P                  R^R^
/R lt]	P                  ]P                  3R ltR tR t]P$                  R 4       tR tRtV tR
# )FunctionalTestCaseMixinc                ,    \         P                  ! 4       # N)asyncionew_event_loopselfs   &3/usr/lib/python3.14/test/test_asyncio/functional.pynew_loop FunctionalTestCaseMixin.new_loop   s    %%''    delayg{Gz?c               d    V P                   P                  \        P                  ! V4      4       R # r   )looprun_until_completer   sleep)r   r   s   &$r   run_loop_briefly(FunctionalTestCaseMixin.run_loop_briefly   s    		$$W]]5%9:r   c                r    V P                   P                  V4       V P                  P                  V4       R # r   )._FunctionalTestCaseMixin__unhandled_exceptionsappendr   default_exception_handler)r   r   contexts   &&&r   loop_exception_handler.FunctionalTestCaseMixin.loop_exception_handler   s(    ##**73		++G4r   c                    V P                  4       V n        \        P                  ! R 4       V P                  P	                  V P
                  4       . V n        R # r   )r   r   r   set_event_loopset_exception_handlerr   r   r
   s   &r   setUpFunctionalTestCaseMixin.setUp   s=    MMO	t$		''(C(CD&(#r   c                V    V P                   P                  4        V P                  '       d=   \        R 4       \        P                  ! V P                  4       V P                  R4       \        P                  ! R4       RV n         R#   \        P                  ! R4       RT n         i ; i)z2Unexpected calls to loop.call_exception_handler():z1unexpected calls to loop.call_exception_handler()N)r   closer   printpprintfailr   r   r
   s   &r   tearDown FunctionalTestCaseMixin.tearDown    sy    
	IIOO***JKd99:		MN ""4(DI ""4(DIs   +B	 <B	 	B(familyaddrNtimeoutbacklogmax_clientsc                  Vfa   \        \        R4      '       dI   V\        P                  8X  d4   \        P                  ! 4       ;_uu_ 4       pVP
                  pR R R 4       MRp\        P                  ! W2VR7      pVf   \        R4      hV^ 8:  d   \        R4      hVP                  V4       \        WWV4      #   + '       g   i     Lg; i)NAF_UNIX)r*   r-   timeout is required#only blocking sockets are supported)z	127.0.0.1r   )
hasattrsocketr0   tempfileNamedTemporaryFilenamecreate_serverRuntimeError
settimeoutTestThreadedServer)	r   server_progr*   r+   r,   r-   r.   tmpsocks	   &&$$$$$  r   
tcp_server"FunctionalTestCaseMixin.tcp_server-   s     <vy))f.F0022c88D 32 (##DI?455a<DEE !k; 	; 32s   B<<C	c                    \         P                   ! V\         P                  4      pVf   \        R4      hV^ 8:  d   \        R4      hVP                  V4       \	        WW4      # )Nr1   r2   )r4   SOCK_STREAMr9   r:   TestThreadedClient)r   client_progr*   r,   r>   s   &&&& r   
tcp_client"FunctionalTestCaseMixin.tcp_clientE   s\     }}VV%7%78?455a<DEE !. 	.r   c                ~    \        \        R 4      '       g   \        hV P                  ! VR\        P                  /VB # r0   r*   )r3   r4   NotImplementedErrorr?   r0   r   argskwargss   &*,r   unix_server#FunctionalTestCaseMixin.unix_serverT   2    vy))%%FV^^FvFFr   c                ~    \        \        R 4      '       g   \        hV P                  ! VR\        P                  /VB # rH   )r3   r4   rI   rE   r0   rJ   s   &*,r   unix_client#FunctionalTestCaseMixin.unix_clientY   rO   r   c              #  v  "   \         P                  ! 4       ;_uu_ 4       p\        P                  P	                  VR 4      p Vx   \        P
                  ! V4       RRR4       R#   \         d     Li ; i   \        P
                  ! T4       i   \         d     i i ; i; i  + '       g   i     R# ; i5i)r>   N)r5   TemporaryDirectoryospathjoinunlinkOSError)r   tdfns   &  r   unix_sock_name&FunctionalTestCaseMixin.unix_sock_name^   s     ((**bb&)BIIbM +*  IIbM  +**sp   B9!B%A8A'
B9'A52B%4A55B%8B":BB"BB"BB""B%%B6	0	B9c                     V P                   P                  4        V P                  V4       R #   T P                  T4       i ; ir   )r   stopr'   r   exs   &&r   _abort_socket_test*FunctionalTestCaseMixin._abort_socket_testj   s,    	IINNIIbMDIIbMs	   / A)__unhandled_exceptionsr   )__name__
__module____qualname____firstlineno__r   r   r   r!   r(   r4   AF_INETr   LOOPBACK_TIMEOUTr?   rE   rM   rQ   
contextlibcontextmanagerr\   rb   __static_attributes____classdictcell____classdict__s   @r   r   r      s     (; ;5); ..;; #33; 	;
  ";2 !.."33.G
G
 	 	 r   r   c                   J   a  ] tR t^vt o R tR tRRRR/R ltR tR	 tR
t	V t
R# )TestSocketWrapperc                    Wn         R # r   )_TestSocketWrapper__sockr   r>   s   &&r   __init__TestSocketWrapper.__init__x   s    r   c                    R p\        V4      V8  d9   V P                  V\        V4      ,
          4      pVR 8X  d   \        hW#,          pKH  V# )r   )lenrecvConnectionAbortedError)r   nbufdatas   &&  r   recv_allTestSocketWrapper.recv_all{   sA    #hl99QS\*Ds{,,KC
r   server_sideFserver_hostnameNc                  VP                  V P                  VVR R7      p VP                  4         T P                  P                  4        Y@n        R#    TP                  4        h ; i  T P                  P                  4        i ; i)F)r   r   do_handshake_on_connectN)wrap_socketrt   do_handshaker$   )r   ssl_contextr   r   ssl_socks   &&$$ r   	start_tlsTestSocketWrapper.start_tls   su     **KK[+$) + +
	 !!#
 KK	NNKKs   A A''A* *Bc                .    \        V P                  V4      # r   )getattrrt   )r   r7   s   &&r   __getattr__TestSocketWrapper.__getattr__   s    t{{D))r   c                `    R P                  \        V 4      P                  V P                  4      # )z	<{} {!r}>)formattypere   rt   r
   s   &r   __repr__TestSocketWrapper.__repr__   s#    !!$t*"5"5t{{CCr   )__sock)re   rf   rg   rh   rv   r   r   r   r   rm   rn   ro   s   @r   rr   rr   v   s5     #"&&*D Dr   rr   c                   2   a  ] tR t^t o R tR tR tRtV tR# )SocketThreadc                4    R V n         V P                  4        R# FN)_activerW   r
   s   &r   r_   SocketThread.stop   s    		r   c                &    V P                  4        V # r   )startr
   s   &r   	__enter__SocketThread.__enter__   s    

r   c                &    V P                  4        R # r   )r_   )r   excs   &*r   __exit__SocketThread.__exit__   s    		r   )r   N)	re   rf   rg   rh   r_   r   r   rm   rn   ro   s   @r   r   r      s      r   r   c                   ,   a  ] tR t^t o R tR tRtV tR# )rC   c                    \         P                  P                  V R R R4       RV n        W@n        W n        RV n        W0n        Wn        R # )Nztest-clientT)		threadingThreadrv   daemon_timeout_sockr   _prog_test)r   testr>   progr,   s   &&&&&r   rv   TestThreadedClient.__init__   s>    !!$dMB


r   c                     V P                  \        V P                  4      4       R #   \         d'   pT P                  P                  T4        R p?R # R p?ii ; ir   )r   rr   r   	Exceptionr   rb   r`   s   & r   runTestThreadedClient.run   sB    	.JJ(45 	.JJ))"--	.s   $( AAA)r   r   r   r   r   r   N)re   rf   rg   rh   rv   r   rm   rn   ro   s   @r   rC   rC      s     . .r   rC   c                   Z   a a ] tR t^t oR tV 3R ltR tR tR t]	R 4       t
RtVtV ;t# )r;   c                8   \         P                  P                  V R R R4       RV n        ^ V n        ^ V n        WPn        W@n        W n        RV n	        W0n
        \        P                  ! 4       w  V n        V n        V P                  P                  R4       Wn        R # )Nztest-serverTF)r   r   rv   r   _clients_finished_clients_max_clientsr   r   r   r   r4   
socketpair_s1_s2setblockingr   )r   r   r>   r   r,   r.   s   &&&&&&r   rv   TestThreadedServer.__init__   s|    !!$dMB!"'

#..0$(U#
r   c                @  <  V P                   '       d<   V P                   P                  4       R8w  d    V P                   P                  R4       \        SV `  4        V P                  P                  4        V P                  P                  4        V P                   P                  4        R#   \         d     Lki ; i  \        ST `  4        T P                  P                  4        T P                  P                  4        T P                   P                  4        i ; i)   s   stopN)	r   filenosendrY   superr_   r   r$   r   )r   	__class__s   &r   r_   TestThreadedServer.stop   s    
	xxxDHHOO-3HHMM'* GLNJJHHNNHHNN   GLNJJHHNNHHNNs.   B? B? B. .B<9B? ;B<<B? ?ADc                \    V P                   P                  R 4       V P                  4        R# r   )r   r   _runr
   s   &r   r   TestThreadedServer.run   s    

u%		r   c                "   V P                   '       d   V P                  V P                  8  d   R # \        P                  ! V P                  V P
                  .. . V P                  4      w  rpV P
                  V9   d   R # V P                  V9   g   K   V P                  P                  4       w  rEV ;P                  ^,          un        VP                  V P                  4        V;_uu_ 4        V P                  V4       R R R 4       EK
  R #   + '       g   i     EK  ; i  \         d/   pRT n          h   T P                  P                  T4       i ; iR p?ii ; i  \         d     EKl  \         d    T P                   '       g    R # h i ; i)NF)r   r   r   selectr   r   r   acceptr:   _handle_clientr   r   rb   BlockingIOErrorTimeoutError)r   rwxconnr+   ra   s   &      r   r   TestThreadedServer._run   s)   lll}} 1 11mmTXX&B?GA! xx1}zzQ>!%!2!2!4JD MMQ&MOODMM2>!T //5 "T1 0 "TT$ >',>! JJ99"=> ' # <<<	sf   E $
D" .D D" D	D" D" "E-E5D66EEEF-F6FFc                :    V P                  \        V4      4       R # r   )r   rr   ru   s   &&r   r   !TestThreadedServer._handle_client  s    

$T*+r   c                6    V P                   P                  4       # r   )r   getsocknamer
   s   &r   r+   TestThreadedServer.addr
  s    zz%%''r   )r   r   r   r   r   r   r   r   r   r   r   )re   rf   rg   rh   rv   r_   r   r   r   propertyr+   rm   rn   __classcell__)r   rp   s   @@r   r;   r;      s8     $ >D, ( ( (r   r;   )r   asyncio.eventsrk   rU   r&   r   r4   r5   r   r   r   r   rr   r   r   rC   r;    r   r   <module>r      si       	      a aR%D %DP9## . .&M( M(r   