+
     þÎjØ  ã                   ó¸   € ^ 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   &&ÚR/opt/data/home/.local/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   € Ø$ t§z¡zÕ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  € ô �iŠiÐ!8Ô9ˆð	.à(+ŒC�K‰K˜Ÿ™Ñ%ä.×9Ò9ØÐ9Ð;MóˆMô —‘×"Ñ"Ü"ØØ0°=Ð2BÐCð #÷ õ õ 3ð 49�Ô0à×$Ñ$Ô&ð —‘×0Ñ0Ô2ð ×$Ñ$Ô&Ø—‘×0Ñ0Ô2÷%ð* �|‰|œsŸ{™{Ô*Ü—K‘K §¡Ò-ñ +÷+÷ ûð* �|‰|œsŸ{™{Ô*Ü—K‘K §¡Ñ-ð +ú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  € ô �iŠiÐ!<Ô=ˆØ×ÒÑMÐ5´zÀ(Ó7KÐLÒMð$	.à(+ŒC�K‰K˜Ÿ™Ñ%ä.×9Ò9ØØ5Ø"óˆMô —‘×"Ñ"Ü"ØØ0°=Ð2BÐCð #÷ õ õ 3à38�Ô0ä×,Ò,°D×9Õ9¸QØ×(Ñ(Ô*÷ :ð O�Û�AØ¤# a£&Ö(Ùñ ô %Ð%IÓJÐJð —‘×0Ñ0Ô2÷+ð2 �|‰|œsŸ{™{Ô*Ü—K‘K §¡Ò-ñ +÷ :×9ú÷÷ ûð2 �|‰|œsŸ{™{Ô*Ü—K‘K §¡Ñ-ð +ú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_DummyClassÚhTestEntrypoints.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Ñ4°SÀ7Ö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_dummyÚcTestEntrypoints.test_entrypoint_handles_type_extensions.<locals>.init_function.<locals>.unbox_dummy�   sÍ   ø€ àŸG™G×9Ñ9¸#¸wÓG�	Ø%*§Z¡Z×%7Ñ%7×%KÑ%KÈCÓ%PÐ"Ù1°!·)±)¸Q¿Y¹YÓG�Ø%&§W¡W×%<Ñ%<¸YÓ%G�Ô"Ø—‘—‘˜yÔ)ØŸ7™7×/Ñ/Ó1�Ø Ÿ:™:×-Ñ-×9Ñ9¸!¿)¹)ÀXÓN�Ø—‘×2Ñ2°<×3IÑ3IÓ3KØ<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_dummyÚaTestEntrypoints.test_entrypoint_handles_type_extensions.<locals>.init_function.<locals>.box_dummyœ   s±   ø€ à%*§Z¡Z×%7Ñ%7×%KÑ%KÈCÓ%PÐ"Ù1°!·)±)¸Q¿Y¹YÓG�ØŸG™G×5Ñ5°l×6HÑ6HÓI�	Ø#$§7¡7×#;Ñ#;¼KÓ#HÐ ØŸG™G×/Ñ/Ð0@ÓA�	Ø—g‘g×3Ñ3°I¸|Ó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_functionÚNTestEntrypoints.test_entrypoint_handles_type_extensions.<locals>.init_function}   sÏ   ú€ ÷F˜EŸK™K×,Ñ,ô 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   ÚfooÚDTestEntrypoints.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_extensionsÚ7TestEntrypoints.test_entrypoint_handles_type_extensionsv   s
  ø€ ó
 	õ)	ôV ×ÒÐ:Ó;ˆØ%Œð	.à(+ŒC�K‰K˜Ÿ™Ñ%ä.×9Ò9ØØ5Ø"óˆMô —‘×"Ñ"Ü"ØØ0°=Ð2BÐCð #÷ õ ô
 ñó ðô # 2“�Ù�D”	÷ð �|‰|œsŸ{™{Ô*Ü—K‘K §¡Ò-ñ +÷÷ ûð �|‰|œsŸ{™{Ô*Ü—K‘K §¡Ñ-ð +ú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¯©Ø%(ô*ˆô
 —/’/¤-°·±Ó<ˆð		Ø�M‰MŒOØ×(Ñ(Ó*‰HˆCØ×Ñ 1Ô$Ý$à×%Ô% s§z¡z¦|ð5ó6ð 6ð —:‘:“< §¡£Ð-à�N‰NÕøˆG�N‰NÕú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_sequenceÚ2TestEntrypoints.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à‡_‚_�R—Z‘Z—^‘^Ð$5°tÓ<ÀÑ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   