+
    Di(                    n  a  0 t $ ^ RIHt ^ RIt^ RIt^ RIHtHtHt ^ RI	H
t
Ht ^ RIHtHtHt ^ RIHtHt ^ RIt^ RIHt ^ RIHt ^R	IHt ^R
IHtHtHtHt ^RIH t  ^RI!H"t" ]PF                  R78  d   ^ RI$H%t% Rs&R]'R&   Rs(R]'R&   ^ s)R R lt*]R R l4       t+R R lt,R R lt-]P\                  ! RR7      R R l4       t/]P\                  ! RR7      R R  l4       t0]P\                  ! RR7      R! R" l4       t1]Pd                  ! R#]! 4       R$7      R% R& l4       t3]Pd                  R' R( l4       t4]Pd                  R) R* l4       t5 ! R+ R,4      t6]Pd                  ! R-R.7      R/ R0 l4       t7]Pd                  ! R-R.7      R1 R2 l4       t8]Pd                  R3 R4 l4       t9]Pd                  R5 R6 l4       t:R# )8    )annotationsN)Callable	GeneratorIterator)	ExitStackcontextmanager)isasyncgenfunctioniscoroutinefunctionismethod)Anycast)
SubRequest)Exit)get_available_backends)current_async_libraryget_async_backendreset_current_async_libraryset_current_async_library)iterate_exceptions)
TestRunner)ExceptionGroupzTestRunner | None_current_runnerzExitStack | None_runner_stackc                    V ^8  d   QhRRRR/# )   backendobjectreturnztuple[str, dict[str, Any]] )formats   "q/Users/tonyclaw/.openclaw/workspace/services/omi-webhook/venv/lib/python3.14/site-packages/anyio/pytest_plugin.py__annotate__r"       s     X X X4N X    c                p   \        V \        4      '       d   V / 3# \        V \        4      '       d}   \        V 4      ^8X  dm   \        V ^ ,          \        4      '       dP   \        V ^,          \        4      '       d3   \        \        \        \        \        \        3,          3,          V 4      # \        R4      h)r   z@anyio_backend must be either a string or tuple of (string, dict))
isinstancestrtuplelendictr   r   	TypeError)r   s   &r!   extract_backend_and_optionsr+       s}    '3{	GU	#	#G(9gaj#&&:gaj$+G+Gc4S>12G<<
V
WWr#   c               $    V ^8  d   QhRRRRRR/# )r   backend_namer&   backend_optionsdict[str, Any]r   zIterator[TestRunner]r   )r    s   "r!   r"   r"   +   s$     3 33(633r#   c              #  2  "   \         fw   \        V 4      p\        4       s\	        4       f&   \        V 4      p\        P                  \        V4       T;'       g    / p\        P                  VP                  V4      4      s \        ^,          s
 \         x  \        ^,          s
\        '       g%   \        f   Q h\        P                  4        R ;ss R # R #   \        ^,          s
\        '       g$   \        f   Q h\        P                  4        R ;ss i i ; i5iN)r   r   r   r   r   r   callbackr   enter_contextcreate_test_runner_runner_leasesclose)r-   r.   asynclibtokens   &&  r!   
get_runnerr9   *   s     
 $\2! "* .l;E""#>F)//R'55''8
 aN3!~ ,,,!.22MO  	!~ ,,,!.22MO s$   AD4DC ?D>DDc                    V ^8  d   QhRRRR/# )r   parserzpytest.Parserr   Noner   )r    s   "r!   r"   r"   H   s      ] t r#   c                .    V P                  R RRR7       R# )
anyio_modestrictz-AnyIO plugin mode (either "strict" or "auto"))defaulthelpN)addini)r;   s   &r!   pytest_addoptionrC   H   s    
MM<  r#   c                    V ^8  d   QhRRRR/# )r   configzpytest.Configr   r<   r   )r    s   "r!   r"   r"   P   s     
 
] 
t 
r#   c                   V P                  R R4       V P                  R4      R8X  dd   V P                  P                  R4      '       dA   V P                  R4      R8X  d)   V P	                  \
        P                  ! R4      ^4       R# R# R# R# )markerszManyio: mark the (coroutine function) test to be run asynchronously via anyio.r>   autoasyncioasyncio_modezlAnyIO auto mode has been enabled together with pytest-asyncio auto mode. This may cause unexpected behavior.N)addinivalue_linegetinipluginmanager
has_pluginissue_config_time_warningpytestPytestConfigWarning)rE   s   &r!   pytest_configurerR   P   s    
W
 	l#v-  ++I66MM.)V3((&&< 	
 4 7 	.r#   T)hookwrapperc               $    V ^8  d   QhRRRRRR/# )r   
fixturedefr   requestr   zGenerator[Any]r   )r    s   "r!   r"   r"   d   s!     - -S -3 -> -r#   c              #    aaa"   R  VVV3R llpV P                   o\        S4      '       g   \        S4      '       d   RVP                  9   d   W n         V P                  pRV P                  9   ;o'       g   V ;P                  R,          un        RV P                  9   ;o'       g   V ;P                  R,          un         Rx SV n         W0n        # Rx #   ST n         Y0n        i ; i5i)c               (    V ^8  d   QhRRRRRRRR/# )r   anyio_backendr   rV   r   kwargsr   r   )r    s   "r!   r"   *pytest_fixture_setup.<locals>.__annotate__e   s(     = =s =Z =3 =3 =r#   c              ;  (  <"   VP                   '       dd   \        S4      '       dS   \        SP                  4      \        VP                   4      J d'   SP                  P                  VP                   4      pMSp\        V 4      w  rES'       d   WR &   S	'       d   WR&   \        WE4      ;_uu_ 4       p\        V4      '       d   VP                  W24       Rj  xL
  MVP                  W24      x  RRR4       R#  L"  + '       g   i     R# ; i5i)rY   rV   N)instancer   type__self____func____get__r+   r9   r	   run_asyncgen_fixturerun_fixture)
rY   rV   rZ   
local_funcr-   r.   runnerfunchas_backend_arghas_request_args
   &&,    r!   wrapper%pytest_fixture_setup.<locals>.wrappere   s      T]]#tG,<,<'==..w/?/?@JJ(CM(R%&3?# '966&!*--!66zJJJ((<<	 76J 766s6   BDD3&C>C<C>2
D<C>>D			DrY   rV   NrY   rV   )rf   r	   r
   fixturenamesargnames)rU   rV   ri   original_argnamerf   rg   rh   s   &&  @@@r!   pytest_fixture_setuprp   c   s     = =4 ??D$#6t#<#<g222%O)22'6*:M:M'MMOM##'99#'0J4G4G'GGOG##|3#7"&
&6#N #'
&6#s$   B#C*)C*C C*C''C*)tryfirstc               (    V ^8  d   QhRRRRRRRR/# )	r   	collectorzpytest.Module | pytest.Classnamer&   objr   r   r<   r   )r    s   "r!   r"   r"      s,     > >+>36>=C>	>r#   c                   V P                  W!4      '       d   \        VR 4      '       d   VP                  P                  MTp\	        V4      '       d   V P
                  P                  R4      R8H  pV P                  R4      p\        VRR
4      pV'       gC   V'       g;   \        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d(   \        P                  P                  R4      ! V4       R	# R	# R	# R	# )
hypothesisr>   rH   anyio
pytestmarkc              3  >   "   T F  qP                   R 8H  x  K  	  R# 5i)rx   N)rt   ).0markers   & r!   	<genexpr>,pytest_pycollect_makeitem.<locals>.<genexpr>   s     HK&{{g-Ks   TFrY   Nr   )istestfunctionhasattrrw   
inner_testr
   rE   rL   get_closest_markergetattranyrP   markusefixtures)rs   rt   ru   
inner_funcanyio_auto_moder|   own_markerss   &&&    r!   pytest_pycollect_makeitemr      s     **29#|2L2LS^^..RU
z**'..55lCvMO11':F!#|R8K3HKH333HKHHH''8= I + +r#   c                    V ^8  d   QhRRRR/# )r   
pyfuncitemr   r   zbool | Noner   )r    s   "r!   r"   r"      s     ! !3 !; !r#   c           
     p  a	a
a R  V	V
V3R llpV P                   P                  R4      pV'       Ed"   \        V4      w  o	o
\        V P                  R4      '       di   V P                  P
                  P                  oSP                  VP                  8w  d,   \        S4      '       d   WP                  P
                  n        R# \        V P                  4      '       du   V P                   pV P                  P                   Uu/ uF  qDW4,          bK  	  pp\        S	S
4      ;_uu_ 4       p VP                  V P                  V4        RRR4       R# R# u upi   \         d<   p\        T4       F&  p\        T\         \"        \$        34      '       g   K&  Yh	  h Rp?ii ; i  + '       g   i     R# ; i)c                    V ^8  d   QhRRRR/# )r   rZ   r   r   r<   r   )r    s   "r!   r"   (pytest_pyfunc_call.<locals>.__annotate__   s     3 3c 3d 3r#   c                    < \        SS4      ;_uu_ 4       pVP                  SV 4       R R R 4       R #   + '       g   i     R # ; ir1   )r9   run_test)rZ   re   r-   r.   original_funcs   , r!   run_with_hypothesis/pytest_pyfunc_call.<locals>.run_with_hypothesis   s/    o66&OOM62 7666s	   3A	rY   rw   NT)funcargsgetr+   r   ru   rw   r   __qualname__r
   _fixtureinforn   r9   r   r   r   r%   r   KeyboardInterrupt
SystemExit)r   r   r   r   argtestargsre   excgrpexcr-   r.   r   s   &        @@@r!   pytest_pyfunc_callr      s[   3 3 !!%%o6Gw(CG(L%o:>><00&NN55@@M))-@-M-MM&}55;NNN--8z~~..!**H6@6M6M6V6VW6VsX]*6VHWL/::fOOJNNH= ;  X & 1&9%cD2CZ+PQQ"%1  :  ;: s6   E+F$-EF!&,FFF!!F$$F5	module)scopeparamsc                    V ^8  d   QhRRRR/# )r   rV   r   r   r   )r    s   "r!   r"   r"      s      3 3 r#   c                    V P                   # r1   )paramrl   s   &r!   rY   rY      s    ==r#   c                    V ^8  d   QhRRRR/# )r   rY   r   r   r&   r   )r    s   "r!   r"   r"      s        c  c  r#   c                D    \        V \        4      '       d   V # V ^ ,          # )r   r%   r&   rk   s   &r!   anyio_backend_namer      s     -%%Qr#   c                    V ^8  d   QhRRRR/# )r   rY   r   r   r/   r   )r    s   "r!   r"   r"      s            r#   c                D    \        V \        4      '       d   / # V ^,          # )   r   rk   s   &r!   anyio_backend_optionsr      s    -%%	Qr#   c                  L    ] tR t^tRtR R lt]R R l4       tR
R R lltR	t	R# )FreePortFactorya+  
Manages port generation based on specified socket kind, ensuring no duplicate
ports are generated.

This class provides functionality for generating available free ports on the
system. It is initialized with a specific socket kind and can generate ports
for given address families while avoiding reuse of previously generated ports.

Users should not instantiate this class directly, but use the
``free_tcp_port_factory`` and ``free_udp_port_factory`` fixtures instead. For simple
uses cases, ``free_tcp_port`` and ``free_udp_port`` can be used instead.
c                    V ^8  d   QhRRRR/# )r   kindsocket.SocketKindr   r<   r   )r    s   "r!   r"   FreePortFactory.__annotate__   s     % %. %4 %r#   c                	H    Wn         \        \        ,          ! 4       V n        R # r1   )_kindsetint
_generated)selfr   s   &&r!   __init__FreePortFactory.__init__   s    
c(*r#   c                   V ^8  d   QhRR/# )r   r   r   r   )r    s   "r!   r"   r      s      ' r#   c                    V P                   # )z
The type of socket connection (e.g., :data:`~socket.SOCK_STREAM` or
:data:`~socket.SOCK_DGRAM`) used to bind for checking port availability

)r   )r   s   &r!   r   FreePortFactory.kind   s     zzr#   Nc                    V ^8  d   QhRRRR/# )r   familyzsocket.AddressFamily | Noner   r   r   )r    s   "r!   r"   r      s     $ $: $c $r#   c           	        Ve   V.pMF\         P                  .p\         P                  '       d    VP                  \         P                  4        ^ p\        4       ;_uu_ 4       pV F  pVP                  \         P                   ! WP                  4      4      pV\         P                  8X  d   RMRp VP                  Wc34       T'       d   Kh  TP                  4       ^,          pK  	  W0P                  9  d(   V P                  P                  V4       VuuRRR4       # RRR4       K    \         d      K  i ; i  + '       g   i     EK  ; i)z
Return an unbound port for the given address family.

:param family: if omitted, both IPv4 and IPv6 addresses will be tried
:return: a port number

Nz::1z	127.0.0.1)socketAF_INEThas_ipv6appendAF_INET6r   r3   r   bindOSErrorgetsocknamer   add)r   r   familiesportstacksockaddrs   &&     r!   __call__FreePortFactory.__call__   s     xH'H0D&F ..v}}VZZ/PQD$*foo$=5;D		4,/  4#//1!4 ' ??2++D1#  #  s8   $AD>3D+D>AD>+D;	6D>:D;	;D>>E	)r   r   r1   )
__name__
__module__r   __firstlineno____doc__r   propertyr   r   __static_attributes__r   r#   r!   r   r      s*    %  $ $r#   r   session)r   c                   V ^8  d   QhRR/# r   r   r   r   )r    s   "r!   r"   r"     s     / / /r#   c                 4    \        \        P                  4      # r1   )r   r   SOCK_STREAMr   r#   r!   free_tcp_port_factoryr     s    6--..r#   c                   V ^8  d   QhRR/# r   r   )r    s   "r!   r"   r"   #  s     . . .r#   c                 4    \        \        P                  4      # r1   )r   r   
SOCK_DGRAMr   r#   r!   free_udp_port_factoryr   "  s    6,,--r#   c                    V ^8  d   QhRRRR/# )r   r   Callable[[], int]r   r   r   )r    s   "r!   r"   r"   (       # #): #s #r#   c                    V ! 4       # r1   r   )r   s   &r!   free_tcp_portr   '       ""r#   c                    V ^8  d   QhRRRR/# )r   r   r   r   r   r   )r    s   "r!   r"   r"   -  r   r#   c                    V ! 4       # r1   r   )r   s   &r!   free_udp_portr   ,  r   r#   )      );__conditional_annotations__
__future__r   r   syscollections.abcr   r   r   
contextlibr   r   inspectr	   r
   r   typingr   r   rP   _pytest.fixturesr   _pytest.outcomesr    r   _core._eventloopr   r   r   r   _core._exceptionsr   abcr   version_infoexceptiongroupr   r   __annotations__r   r5   r+   r9   rC   rR   hookimplrp   r   r   fixturerY   r   r   r   r   r   r   r   )r   s   @r!   <module>r      s   " "  
 9 9 0 E E   ' ! $  2 g-%)" )"& &X 3 3:
& T"- #-` $>  >" $!  !H h'='?@ A        :$ :$z i / !/ i . !. # # # #r#   