mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Merge w/ 3.3 more fixes thanks to issue #17098
This commit is contained in:
		
						commit
						85ae3566d1
					
				
					 3 changed files with 296 additions and 271 deletions
				
			
		|  | @ -1724,10 +1724,13 @@ def _setup(sys_module, _imp_module): | |||
|         BYTECODE_SUFFIXES = DEBUG_BYTECODE_SUFFIXES | ||||
| 
 | ||||
|     module_type = type(sys) | ||||
|     for module in sys.modules.values(): | ||||
|     for name, module in sys.modules.items(): | ||||
|         if isinstance(module, module_type): | ||||
|             if not hasattr(module, '__loader__'): | ||||
|                 module.__loader__ = BuiltinImporter | ||||
|                 if name in sys.builtin_module_names: | ||||
|                     module.__loader__ = BuiltinImporter | ||||
|                 elif _imp.is_frozen(name): | ||||
|                     module.__loader__ = FrozenImporter | ||||
| 
 | ||||
|     self_module = sys.modules[__name__] | ||||
|     for builtin_name in ('_io', '_warnings', 'builtins', 'marshal'): | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brett Cannon
						Brett Cannon