mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	Issue #17177: Stop using imp in distutils
This commit is contained in:
		
							parent
							
								
									7822e123c4
								
							
						
					
					
						commit
						61c3556c14
					
				
					 7 changed files with 26 additions and 22 deletions
				
			
		|  | @ -4,7 +4,7 @@ | |||
| (install all Python modules).""" | ||||
| 
 | ||||
| import os | ||||
| import imp | ||||
| import importlib.util | ||||
| import sys | ||||
| 
 | ||||
| from distutils.core import Command | ||||
|  | @ -165,10 +165,10 @@ def _bytecode_filenames(self, py_filenames): | |||
|             if ext != PYTHON_SOURCE_EXTENSION: | ||||
|                 continue | ||||
|             if self.compile: | ||||
|                 bytecode_files.append(imp.cache_from_source( | ||||
|                 bytecode_files.append(importlib.util.cache_from_source( | ||||
|                     py_file, debug_override=True)) | ||||
|             if self.optimize > 0: | ||||
|                 bytecode_files.append(imp.cache_from_source( | ||||
|                 bytecode_files.append(importlib.util.cache_from_source( | ||||
|                     py_file, debug_override=False)) | ||||
| 
 | ||||
|         return bytecode_files | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brett Cannon
						Brett Cannon