+
    :i                         ^ RI t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHt ]R,
          t ! R R	]4      t ! R
 R]4      tR# )    N)mock)njit)TestCase)_TIMEOUT)metadatag      N@c                   ,   a  ] tR t^t o R tR tRtV tR# )_DummyClassc                    Wn         R # Nvalue)selfr   s   &&Z/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/tests/test_entrypoints.py__init___DummyClass.__init__   s    
    c                (    R V P                   ,          # )z_DummyClass(%f, %f)r   )r   s   &r   __repr___DummyClass.__repr__   s    $tzz11r   r   N)__name__
__module____qualname____firstlineno__r   r   __static_attributes____classdictcell____classdict__s   @r   r	   r	      s     2 2r   r	   c                      a  ] tR t^t o RtR tR tRt]P                  ! ]
P                  P                  RR4      ]8g  R4      R 4       tR	 tR
 tRtV tR# )TestEntrypointsz=
Test registration of init() functions from Numba extensions
c                   \         P                  ! R R7      p V\        P                  VP                  &   \
        P                  ! RRR4      p\         P                  P                  \
        RRV3/R7      ;_uu_ 4        ^ RI	H
p RVn        VP                  4        VP                  P                  4        VP                  4        VP                  P                  4        R	R	R	4       VP                  \        P                  9   d   \        P                  VP                   R	# R	#   + '       g   i     LN; i  TP                  \        P                  9   d   \        P                  TP                   i i ; i)
_test_numba_extensionr   initz_test_numba_extension:init_funcnumba_extensionsentry_pointsreturn_valueentrypointsFN)r   Mocksysmodulesr   importlib_metadata
EntryPointpatchobject
numba.corer)   _already_initializedinit_all	init_funcassert_called_once)r   modmy_entrypointr)   s   &   r   test_init_entrypoint$TestEntrypoints.test_init_entrypoint!   s    ii!89	.(+CKK%.999;MM """0=2BC #   3 490$$& 002 $$&002%* ||s{{*KK- ++ * ||s{{*KK- +s%   A&D: ?A"D'!D: 'D7	2D: :=E7c           	        \         P                  ! R R7      pVP                  ! R/ R\        R4      /B   V\        P
                  VP                  &   \        P                  ! RRR4      p\         P                  P                  \        RRV3/R7      ;_uu_ 4        ^ R	IHp R
Vn        \        P                  ! RR7      ;_uu_ 4       pVP!                  4        RRR4       RpX F  pV\#        V4      9   g   K   M	  \        R4      hVP$                  P'                  4        RRR4       VP                  \        P
                  9   d   \        P
                  VP                   R# R#   + '       g   i     L; i  + '       g   i     La; i  TP                  \        P
                  9   d   \        P
                  TP                   i i ; i)_test_numba_bad_extensionr"   zinit_func.side_effectbrokenr#   z#_test_numba_bad_extension:init_funcr$   r%   r&   r(   FT)recordNz2Numba extension module '_test_numba_bad_extension'z"Expected warning message not found )r   r*   configure_mock
ValueErrorr+   r,   r   r-   r.   r/   r0   r1   r)   r2   warningscatch_warningsr3   strr4   r5   )r   r6   r7   r)   wbad_strxs   &      r   test_entrypoint_tolerance)TestEntrypoints.test_entrypoint_toleranceG   sh    ii!<=M5z(7KLM$	.(+CKK%.995"M """0=2BC #   3380,,D99Q((* : OA#a&(  %%IJJ 002+2 ||s{{*KK- + :9 2 ||s{{*KK- +sB   A&F -E=	E*	E=;)E=$F *E:5E==F	F =G	RUN_ENTRY_EP_MAGIC_TOKENNzneeds tokenc                  a ^ RI oV3R lp\        P                  ! R4      pWn         V\        P
                  VP                  &   \        P                  ! RRR4      p\        P                  P                  \        RRV3/R7      ;_uu_ 4        \        R	 4       p\        ^
4      pV! V4       RRR4       VP                  \        P
                  9   d   \        P
                  VP                   R# R#   + '       g   i     LN; i  TP                  \        P
                  9   d   \        P
                  TP                   i i ; i)
r   Nc                    <aa  ! V3R  lRSP                   P                  4      oSP                  P                  P	                  \
        4      V3R l4       p SP                  P                  S4       ! VV3R lRSP                  P                  P                  4      4       oSP                  P                  S4      V3R l4       pSP                  P                  S4      V3R l4       pR# )c                   6   <a a ] tR t^t oVV 3R ltRtVtV ;t# )aTestEntrypoints.test_entrypoint_handles_type_extensions.<locals>.init_function.<locals>.DummyTypec                (   < \         SV `  R R7       R# )	DummyType)nameN)superr   )r   rP   	__class__s   &r   r   jTestEntrypoints.test_entrypoint_handles_type_extensions.<locals>.init_function.<locals>.DummyType.__init__   s    )T33Er   r>   r   r   r   r   r   r   r   __classcell__)rS   r   rP   s   @@r   rP   rN      s     F Fr   rP   c                    < S! 4       # r   r>   )valcrP   s   &&r   typer_DummyClasshTestEntrypoints.test_entrypoint_handles_type_extensions.<locals>.init_function.<locals>.typer_DummyClass   s     {"r   c                   8   <a a ] tR t^t oVV V3R ltRtVtV ;t# )bTestEntrypoints.test_entrypoint_handles_type_extensions.<locals>.init_function.<locals>.DummyModelc                Z   < R SP                   P                  3.p\        SV `  WV4       R# )r   N)typesfloat64rR   r   )r   dmmfe_typemembers
DummyModelrS   numbas   &&& r   r   kTestEntrypoints.test_entrypoint_handles_type_extensions.<locals>.init_function.<locals>.DummyModel.__init__   s-     %++"5"56:G*d4S7Kr   r>   rU   )rS   r   rd   re   s   @@r   rd   r]      s     L Lr   rd   c                    < VP                   P                  VR 4      pSP                  P                  P	                  V 4      pV! VP
                  VP                  4      pVP                   P                  V4      Vn        VP                   P                  V4       VP                   P                  4       pSP                  P                  P                  VP                  V4      pSP                  P                  VP                  4       VR7      # )r   )is_error)pyapiobject_getattr_stringcorecgutilscreate_struct_proxycontextbuilderfloat_as_doubler   decreferr_occurredis_not_null	extendingNativeValue	_getvalue)	typobjrY   	value_objdummy_struct_proxydummy_structerr_flagrh   re   s	   &&&     r   unbox_dummycTestEntrypoints.test_entrypoint_handles_type_extensions.<locals>.init_function.<locals>.unbox_dummy   s    GG99#wG	%*ZZ%7%7%K%KC%P"1!))QYYG%&WW%<%<Y%G"y)77//1 ::--99!))XN22<3I3I3K<D 3 F Fr   c                   < S	P                   P                  P                  V 4      pV! VP                  VP                  4      pVP
                  P                  VP                  4      pVP
                  P                  \        4      pVP
                  P                  V4      pVP
                  P                  Wu34      pVP
                  P                  V4       VP
                  P                  V4       V# r   )rk   rl   rm   rn   ro   ri   float_from_doubler   serialize_objectr	   unserializecall_function_objargsrq   )
rw   rX   rY   rz   r{   ry   serialized_clazz	class_objresre   s
   &&&      r   	box_dummyaTestEntrypoints.test_entrypoint_handles_type_extensions.<locals>.init_function.<locals>.box_dummy   s    %*ZZ%7%7%K%KC%P"1!))QYYGGG55l6H6HI	#$77#;#;K#H GG//0@A	gg33I|Ly)y)
r   N)r_   Typert   typeof_implregisterr	   register_modelmodelsStructModelunboxbox)rZ   r}   r   rd   rP   re   s      @@r   init_functionNTestEntrypoints.test_entrypoint_handles_type_extensions.<locals>.init_function}   s    FEKK,, F __((11+># ?# __++I6L LU__33?? L 7L __""9-	F .	F __  +	 ,	r   _test_numba_init_sequencer#   z#_test_numba_init_sequence:init_funcr$   r%   r&   c                     V # r   r>   )rF   s   &r   fooDTestEntrypoints.test_entrypoint_handles_type_extensions.<locals>.foo   s    Hr   )re   r_   
ModuleTyper4   r+   r,   r   r-   r.   r   r/   r0   r   r	   )r   r   r6   r7   r   ivalre   s   &     @r   'test_entrypoint_handles_type_extensions7TestEntrypoints.test_entrypoint_handles_type_extensionsv   s
   
 	)	V :;%	.(+CKK%.995"M """0=2BC #  
   #2D	 ||s{{*KK- +  ||s{{*KK- +s$   A&D  C5/D 5D	 D =Ec                   \         P                  ! V\         P                  \         P                  VR 7      p\        P                  ! \
        VP                  4      p VP                  4        VP                  4       w  rVVP                  ^ 8w  d-   \        RVP                  : RVP                  4       : R24      hVP                  4       VP                  4       3VP                  4        #   TP                  4        i ; i))stdoutstderrenvzprocess failed with code z: stderr follows

)
subprocessPopenPIPE	threadingTimer_TEST_TIMEOUTkillstartcommunicate
returncodeAssertionErrordecodecancel)r   cmdliner   popentimeoutouterrs   &&&    r   run_cmdTestEntrypoints.run_cmd   s      (2(2%(*
 //-<		MMO((*HC1$$%%szz|56 6 ::<-NNGNNs   A>C, ,C>c                N   \         P                  P                  4       p\        V P                  4      VR &   V P
                  p\        V 4      P                  pRpV: RV: RV: 2p\        P                  RRV.pV P                  Wa4      w  rxRp	V	'       d   \        Wx4       R# R# )rJ   r   .z-mznumba.runtestsFN)osenvironcopyrC   rJ   r   typer   r+   
executabler   print)
r   env_copythemodtheclsmethnameinjected_methodr   r   r   _DEBUGs
   &         r   "test_entrypoint_extension_sequence2TestEntrypoints.test_entrypoint_extension_sequence   s    ::??$&)$*>*>&?"#d$$<(.A>>4)9?K<<2#O r   r>   )r   r   r   r   __doc__r8   rG   rJ   unittestskipIfr   r   getr   r   r   r   r   r   s   @r   r   r      sd     $.L+.Z "O__RZZ^^$5t<O"$K.$K.Z& r   r   )r+   r   r   r_   rA   r   r   r   re   r   numba.tests.supportr   numba.testing.mainr   _RUNNER_TIMEOUT	importlibr   r-   r   r0   r	   r   r>   r   r   <module>r      sM    
     	    ( : 4#%2& 2Gh Gr   