+
    Bi9                     "   ^ 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	t	^ RI
t
^RIHtHt ] P                  R%R l4       tR tR tR tR&R	R'/R
 lltR t] P                  R%R l4       t] P                  R%R l4       tR(RRRR/R llt ! R R]4      t ! R R]4      tR tR t] P                  R 4       tR t] P                  R)R l4       tR t ] P                  R 4       t!R*RR/R llt"R t#R t$R R/R! lt%R R/R" lt&R#R/R$ lt'R# )+    N)unlinktemp_dirTc              #      "   V '       dI   \         P                  ! 4       ;_uu_ 4        \         P                  ! R R\        4       Rx  RRR4       R# Rx  R#   + '       g   i     R# ; i5i)ignorez.+ (module|package)N)warningscatch_warningsfilterwarningsDeprecationWarning)r   s   &1/usr/lib/python3.14/test/support/import_helper.py_ignore_deprecated_importsr      sJ      $$&&##H.C$68 '&
 	 '&&s   &A-!A	A-A*	$	A-c                 N     \         P                  V  R #   \         d     R # i ; iN)sysmodulesKeyError)names   &r   unloadr       s%    KK s    $$c           	         \        V 4       \        P                   Fm  p\        P                  P	                  WR ,           4      p\        VR,           4       R F,  p\        \        P                  P                  W#R7      4       K.  	  Ko  	  R# )z.pyc)optimizationN)       )	r   r   pathosjoinr   	importlibutilcache_from_source)modnamedirnamesourceopts   &   r   forgetr$   '   sa     7O88g7 	v|C9>>33F3MN      c                     \         P                  P                  V 4      pV R ,           p\        P                  ! W4       V# )r   )r   r   r   shutilmove)r"   pyc_file
legacy_pycs   &  r   make_legacy_pycr+   7   s3     ~~//7H#J
KK%r%   Frequired_onc                V   \        V4      ;_uu_ 4         \        P                  ! V 4      uuR R R 4       #   \         dT   p\        P
                  P                  \        T4      4      '       d   h \        P                  ! \        T4      4      hR p?ii ; i  + '       g   i     R # ; ir   )r   r   import_moduleImportErrorr   platform
startswithtupleunittestSkipTeststr)r   
deprecatedr,   msgs   &&$ r   r.   r.   E   sz     
$J	/	/	.**40 
0	/  	.||&&u['9::##CH--	. 
0	/	/s'   B6BABBBB(	c                 "   / p\         ;QJ d    . R  V  4       F  NK  	  5M! R  V  4       4      p\        \        P                  4       FC  pW09   g   VP	                  V4      '       g   K"  \        P                  P                  V4      W&   KE  	  V# )c              3   2   "   T F  qR ,           x  K  	  R# 5i).N ).0r   s   & r   	<genexpr>+_save_and_remove_modules.<locals>.<genexpr>Y   s     2EDCZZEs   )r2   listr   r   r1   pop)namesorig_modulesprefixesr    s   &   r   _save_and_remove_modulesrD   W   sk    Lu2E2uu2E22H$w11(;;$'KKOOG$<L! % r%   c              #      "   \         P                  ! V '       d   ^MR4        Rx  \         P                  ! ^ 4       R#   \         P                  ! ^ 4       i ; i5ir   N)_imp"_override_frozen_modules_for_tests)enableds   &r   frozen_modulesrK   `   s=      	++AbA3//2//2   !AA  A AAc              #      "   \         P                  ! V '       d   ^MR4      p Rx  \         P                  ! V4       R#   \         P                  ! T4       i ; i5irF   )rH   '_override_multi_interp_extensions_check)rJ   olds   & r   multi_interp_extensions_checkrP   n   s?      
6
6Gq
LC:44S944S9rL   r6   	usefrozenc          	      `   \        V4      ;_uu_ 4        \        V4      p\        V4      pV 0VmVmp\        V4      pV F  pR \        P                  V&   K  	   \        V4      ;_uu_ 4         V F  p\        V4       K  	  \        P                  ! T 4      uuR R R 4       \        T4       \        P                  P                  T4       uuR R R 4       #   \         d?     R R R 4       \        T4       \        P                  P                  T4       R R R 4       R # i ; i  + '       g   i     M; i \        T4       \        P                  P                  T4       M/  \        T4       \        P                  P                  T4       i ; i R R R 4       R #   + '       g   i     R # ; ir   )r   r?   rD   r   r   rK   
__import__r/   updater   r.   )r   freshblockedr6   rQ   rA   rB   r    s   &&&$$   r   import_fresh_modulerW      sP   D 
$J	/	/ Uw-(((/6G#'CKK  	-	** #("7+ $) !..t4 +* %U+KK|,+ 
0	/  #   + %U+KK|,+ 
0	/   +** %U+KK|, %U+KK|,,+ 
0	/	/	/sr   AFE"-D#	/CD#	
E""*FD "D#	#E"+*FD  D#	#D3.E"7+F",FFF-	c                   :   a  ] tR t^t o RR/R ltR tR tRtV tR# )CleanImportrQ   Fc               T   \         P                  P                  4       V n        V Fn  pV\         P                  9   g   K  \         P                  V,          pVP                  V8w  d   \         P                  VP                   \         P                  V Kp  	  \        V4      V n        R # r   )r   r   copyoriginal_modules__name__rK   _frozen_modules)selfrQ   module_namesmodule_namemodules   &$*  r   __init__CleanImport.__init__   st     # 0 0 2'Kckk)[1
 ??k1FOO4KK, (  .i8r%   c                :    V P                   P                  4        V # r   )r^   	__enter__r_   s   &r   rf   CleanImport.__enter__   s    &&(r%   c                    \         P                  P                  V P                  4       V P                  P
                  ! V!   R # r   )r   r   rT   r\   r^   __exit__r_   
ignore_excs   &*r   rj   CleanImport.__exit__   s.    4001%%z2r%   )r^   r\   N	r]   
__module____qualname____firstlineno__rc   rf   rj   __static_attributes____classdictcell____classdict__s   @r   rY   rY      s      9 93 3r%   rY   c                   2   a  ] tR t^t o R tR tR tRtV tR# )DirsOnSysPathc                    \         P                  R ,          V n        \         P                  V n        \         P                  P	                  V4       R# :NNNN)r   r   original_valueoriginal_objectextend)r_   pathss   &*r   rc   DirsOnSysPath.__init__   s.    !hhqk"xxr%   c                    V # r   r;   rg   s   &r   rf   DirsOnSysPath.__enter__   s    r%   c                j    V P                   \        n        V P                  \        P                  R &   R# ry   )r{   r   r   rz   rk   s   &*r   rj   DirsOnSysPath.__exit__   s"    ''))r%   )r{   rz   Nrn   rt   s   @r   rw   rw      s     
* *r%   rw   c                  @    \         P                  P                  4       3# r   )r   r   r[   r;   r%   r   modules_setupr      s    ;;r%   c                 `   \         P                  P                  4        UUu. uF!  w  rVP                  R 4      '       g   K  W3NK#  	  ppp\         P                  P	                  4        \         P                  P                  V4       \         P                  P                  V 4       R# u uppi )z
encodings.N)r   r   itemsr1   clearrT   )
oldmoduleskv	encodingss   &   r   modules_cleanupr      s{     %(KK$5$5$7 0$7DALL. !$7I 0KKKKy! KKz"0s   B*B*c               #   f   "   \        4       w  p  R x  \        V 4       R #   \        T 4       i ; i5ir   )r   r   )saveds    r   isolated_modulesr     s(     
 HUs   1! 1.1c                 @    ^ RI Hp VP                  RRR7      ! V 4      # )r   )mockzos.register_at_forkT)create)r3   r   patch)funcr   s   & r   mock_register_at_forkr     s      ::+D:9$??r%   c              #   j  "   ^ RI Hp T ;'       g    Rp \        4       ;_uu_ 4       pVP                  W0V4      p\        P
                  P                  V R4      p \        P                  P                  ^ V4       W3x  \        P                  P                  V4       Ve   V\        P
                  V &   M!\        P
                  P                  V R4        RRR4       R#   Te   T\        P
                  T &   i \        P
                  P                  T R4       i ; i  + '       g   i     R# ; i5i)r   )script_helperspamN)
test.supportr   r   make_scriptr   r   r@   r   insertremove)r   r"   r   tempdirr   
old_modules   &&    r   ready_to_importr   %  s     * >>6D	w((?[[__T40
	,HHOOAw'*HHOOG$%$.D!d+ 
 %$.D!d+ 
s5   %D33DAC"9D
D3":DDD0	*	D3c           	      |    \        V4      p\        P                  ! R V RV  RV  R24      p^RIHp V! RRV4       R# )z/
        import sys
        modules_to_block = z
        if unexpected := modules_to_block & sys.modules.keys():
            startup = ", ".join(unexpected)
            raise AssertionError(f'unexpectedly imported at startup: {startup}')

        import z
        if unexpected := modules_to_block & sys.modules.keys():
            after = ", ".join(unexpected)
            raise AssertionError(f'unexpectedly imported after importing z: {after}')
        )assert_python_okz-Sz-cN)	frozensettextwrapdedentr   r   )imported_modulemodules_to_blockscriptr   s   &&  r   ensure_lazy_importsr   <  sb     !!12__,- .
    !J KZIZ [		F 0T4(r%   c              #   *  "   \        4       p\        P                  P                  W4      pVf   \        P
                  ! V 4      pMM\        \        4      ! V 4      pVP                  P                  VP                  4       V\        P                  V &    Vx  W!J d#   \        P                  P                  V R 4       R # V\        P                  V &   R #   Y!J d"   \        P                  P                  T R 4       i T\        P                  T &   i ; i5ir   )
objectr   r   getr   r.   type__dict__rT   r@   )r   missingorigmods   &   r   module_restoredr   R  s      hG;;??4)D|%%d+3ioDMM*D%	?KKOOD$' $CKK ?KKOOD$' $CKKs   BDC <D;DDispkgc                    \         P                  P                  V VR VR7      p\         P                  P	                  V4      # )z<import_helper>)origin
is_package)r   	machinery
ModuleSpecr   module_from_spec)r   loaderr   specs   &&$ r   create_moduler   f  s@    )) 	 * D >>**400r%   c                 b    \         P                  V ,          ;rER pVe   WEV3#  V'       g%   V'       g   \        V 4      h\         P                  V   \        P
                  ! V 4      pWEV3#   \         d	    R;rERp LYi ; i  \         d"    T'       d   T'       g   Rp\        YT4      p LEi ; i)FNT)r   r   r   ModuleNotFoundErrorr   r.   _add_module)r   r   	addparent	clearnoner   r   r   s   &&&&   r   _ensure_moduler   q  s    	&[[&&
 ?g%%  %d++KK2%%d+
 g/  &  2YI$y12s/   A, B ,A?>A?B.B.B.-B.c                 V   \        V \        4      '       d   T p\        W1R 7      pVP                  p M+V P                  p\
        P                  P                  V 4      pV\        P                  V&   VRJd4   V P                  '       d"   \        V P                  RV\        V4      4       V# ))r   FT)
isinstancer5   r   __spec__r   r   r   r   r   r   parentr   bool)r   r   r   r   r   s   &&&  r   r   r     s}    $D.||yynn--d3CKK$+++t{{D)T)_EJr%   parentsc                    \        V R V4      # Fr   r   r   s   &$r   
add_moduler     s    
 tUG,,r%   c                    \        V R V4      # Tr   r   s   &$r   add_packager     s    
 tT7++r%   r   c                    \         P                  P                  V 4      e   \         P                  V ,          pV# \        V RRV4      w  p pV# )NFT)r   r   r   r   )r   r   r   _s   &$  r   ensure_module_importedr     sI     {{t(kk$ J #4i@	QJr%   r   r   r;   )r;   r;   )Nr   r   )(
contextlibrH   r   importlib.machineryimportlib.utilr   r'   r   r   r3   r   	os_helperr   r   contextmanagerr   r   r$   r+   r.   rD   rK   rP   rW   r   rY   rw   r   r   r   r   r   r   r   r   r   r   r   r   r   r;   r%   r   <module>r      sd        	  
    '  O . .$ 
3 
3 : :&7-#(7-"'7-t#3& #3L*F *2#$  @ , ,,), % %&1e 1:- -, ,d r%   