mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	 b2cd54a4fb
			
		
	
	
		b2cd54a4fb
		
			
		
	
	
	
	
		
			
			This change makes sure all extension/builtin modules have their init function run first by the main interpreter before proceeding with import in the original interpreter (main or otherwise). This means when the import of a single-phase init module fails in an isolated subinterpreter, it won't tie any global state/callbacks to the subinterpreter.
		
			
				
	
	
		
			6 lines
		
	
	
	
		
			191 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			6 lines
		
	
	
	
		
			191 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import os
 | |
| from test.support import load_package_tests, Py_GIL_DISABLED
 | |
| 
 | |
| if not Py_GIL_DISABLED:
 | |
|     def load_tests(*args):
 | |
|         return load_package_tests(os.path.dirname(__file__), *args)
 |