+
    P\i(  c                  sn  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]] Zformat   "8/usr/lib/python3.14/site-packages/anyio/pytest_plugin.py__annotate__r!       s     X X X4N X    c                sp   \        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strZtupleZlenZdictr   r
   Z	TypeError)r      &r    extract_backend_and_optionsr&       s}    '3{	GU	#	#G(9gaj#&&:gaj$+G+Gc4S>12G<<
V
WWr"   c               s$    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   r   r    r!   r!   +   s$     3 33(633r"   c              #  s
  "   \         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   \        P                  4        R ;ss R # R #   \        ^,          s
\        '       g   \        P                  4        R ;ss i i ; i5iN)r   r   r   r   r   r   Zcallbackr   enter_contextZcreate_test_runner_runner_leasesZclose)r'   r(   ZasynclibZtokens   &&  r    
get_runnerr-   *   s     
 $\2! "* .l;E""#>F)//R'55''8
 aN3!~!.22MO  	!~!.22MO s$   AD4DC 5D4D  Dc               r   )r   parserzpytest.Parserr   Noner   r   r   r    r!   r!   H   s      ] t r"   c                s.    V P                  R RRR7       R# )
anyio_modeZstrictz-AnyIO plugin mode (either "strict" or "auto"))ZdefaultZhelpN)Zaddini)r.   r%   r    pytest_addoptionr1   H   s    
MM<  r"   c               r   )r   configzpytest.Configr   r/   r   r   r   r    r!   r!   P   s     
 
] 
t 
r"   c                s   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# )ZmarkerszManyio: mark the (coroutine function) test to be run asynchronously via anyio.r0   autoZasyncioZasyncio_modezlAnyIO auto mode has been enabled together with pytest-asyncio auto mode. This may cause unexpected behavior.N)Zaddinivalue_linegetiniZpluginmanagerZ
has_pluginZissue_config_time_warningpytestZPytestConfigWarning)r2   r%   r    pytest_configurer6   P   s    
W
 	l#v-  ++I66MM.)V3((&&< 	
 4 7 	.r"   T)Zhookwrapperc               s$    V ^8  d   QhRRRRRR/# )r   
fixturedefr
   requestr   zGenerator[Any]r   r   r   r    r!   r!   d   s!     - -S -3 -> -r"   c              #  s  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               s(    V ^8  d   QhRRRRRRRR/# )r   anyio_backendr
   r8   r   kwargsr   r   r   r   r    r!   Z*pytest_fixture_setup.<locals>.__annotate__e   s(     = =s =Z =3 =3 =r"   c              ;  s(  <"   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)r9   r8   N)Zinstancer	   ZtypeZ__self__Z__func__Z__get__r&   r-   r   Zrun_asyncgen_fixtureZrun_fixture)
r9   r8   r:   Z
local_funcr'   r(   runnerfunchas_backend_arghas_request_args
   &&,    r    wrapperZ%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r9   r8   Nr9   r8   )r<   r   r   Zfixturenamesargnames)r7   r8   r?   Zoriginal_argnamer<   r=   r>   s   &&  @@@r    pytest_fixture_setuprC   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*)Ztryfirstc               s(    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   r   r    r!   r!      s,     > >+>36>=C>	>r"   c                s   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	# )
hypothesisr0   r3   anyioZ
pytestmarkc              3  s>   "   T F  qP                   R 8H  x  K  	  R# 5i)rH   N)rE   )Z.0markers   & r    Z	<genexpr>Z,pytest_pycollect_makeitem.<locals>.<genexpr>   s     HK&{{g-Ks   TFr9   Nr   )ZistestfunctionhasattrrG   
inner_testr   r2   r4   Zget_closest_markerZgetattrZanyr5   ZmarkZusefixtures)rD   rE   rF   Z
inner_funcZanyio_auto_moderI   Zown_markerss   &&&    r    pytest_pycollect_makeitemrL      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               r   )r   
pyfuncitemr
   r   zbool | Noner   r   r   r    r!   r!      s     ! !3 !; !r"   c           
     sp  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               r   )r   r:   r
   r   r/   r   r   r   r    r!   Z(pytest_pyfunc_call.<locals>.__annotate__   s     3 3c 3d 3r"   c                 s   < \        SS4      ;_uu_ 4       pVP                  SV 4       R R R 4       R #   + '       g   i     R # ; ir*   )r-   run_test)r:   r;   r'   r(   original_funcs   , r    run_with_hypothesisZ/pytest_pyfunc_call.<locals>.run_with_hypothesis   s/    o66&OOM62 7666s	   3A	r9   rG   NT)funcargsZgetr&   rJ   rF   rG   rK   __qualname__r   Z_fixtureinforB   r-   rN   r   r   r#   r   ZKeyboardInterruptZ
SystemExit)rM   rP   r   rQ   ZargZtestargsr;   ZexcgrpZexcr'   r(   rO   s   &        @@@r    pytest_pyfunc_callrS      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	Zmodule)scopeZparamsc               s     V ^8  d   QhRRRR/# )r   r8   r
   r   r   r   r   r    r!   r!      s      3 3 r"   c                    V P                   # r*   )ZparamrA   r%   r    r9   r9      s    ==r"   c               r   )r   r9   r
   r   r$   r   r   r   r    r!   r!      s        c  c  r"   c                sD    \        V \        4      '       d   V # V ^ ,          # )r    r#   r$   r@   r%   r    anyio_backend_namerW      s     -%%Qr"   c               r   )r   r9   r
   r   r)   r   r   r   r    r!   r!      s            r"   c                sD    \        V \        4      '       d   / # V ^,          # )i   rV   r@   r%   r    anyio_backend_optionsrX      s    -%%	Qr"   c                  sL    ] 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               r   )r   kindsocket.SocketKindr   r/   r   r   r   r    r!   FreePortFactory.__annotate__   s     % %. %4 %r"   c                	sH    Wn         \        \        ,          ! 4       V n        R # r*   )_kindZsetint
_generated)selfrZ   s   &&r    __init__ZFreePortFactory.__init__   s    
c(*r"   c                   V ^8  d   QhRR/# )r   r   r[   r   r   r   r    r!   r\      s      ' r"   c                rU   )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`   r%   r    rZ   ZFreePortFactory.kind   s     zzr"   Nc               r   )r   familyzsocket.AddressFamily | Noner   r^   r   r   r   r    r!   r\      s     $ $: $c $r"   c           	     s   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)socketZAF_INETZhas_ipv6ZappendZAF_INET6r   r+   r]   ZbindZOSErrorZgetsocknamer_   Zadd)r`   rc   ZfamiliesZportZstackZsockZaddrs   &&     r    __call__Z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]   r*   )
Z__name__Z
__module__rR   Z__firstlineno__Z__doc__ra   ZpropertyrZ   re   Z__static_attributes__r   r"   r    rY   rY      s*    %  $ $r"   rY   Zsession)rT   c               rb   r   r   rY   r   r   r   r    r!   r!     s     / / /r"   c                 4    \        \        P                  4      # r*   )rY   rd   ZSOCK_STREAMr   r"   r    free_tcp_port_factoryrh     s    6--..r"   c               rb   rf   r   r   r   r    r!   r!   #  s     . . .r"   c                 rg   r*   )rY   rd   Z
SOCK_DGRAMr   r"   r    free_udp_port_factoryri   "  s    6,,--r"   c               r   )r   rh   Callable[[], int]r   r^   r   r   r   r    r!   r!   (       # #): #s #r"   c                    V ! 4       # r*   r   )rh   r%   r    free_tcp_portrm   '       ""r"   c               r   )r   ri   rj   r   r^   r   r   r   r    r!   r!   -  rk   r"   c                rl   r*   r   )ri   r%   r    free_udp_portro   ,  rn   r"   )i   i   );__conditional_annotations__Z
__future__r   rd   ZsysZcollections.abcr   r   r   Z
contextlibr   r   Zinspectr   r   r	   Ztypingr
   r   r5   Z_pytest.fixturesr   Z_pytest.outcomesr   Z r   Z_core._eventloopr   r   r   r   Z_core._exceptionsr   Zabcr   Zversion_infoZexceptiongroupr   r   Z__annotations__r   r,   r&   r-   r1   r6   ZhookimplrC   rL   rS   Zfixturer9   rW   rX   rY   rh   ri   rm   ro   )rp   s   @r    <module>rq      s   " "  
 9 9 0 E E   ' ! $  2 g-%)" )"& &X 3 3:
& T"- #-` $>  >" $!  !H h'='?@ A        :$ :$z i / !/ i . !. # # # #r"   