mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	Renamed the repr module to reprlib.
Added stub module for repr.
This commit is contained in:
		
							parent
							
								
									5915a4dcfe
								
							
						
					
					
						commit
						95d97c7390
					
				
					 4 changed files with 13 additions and 1 deletions
				
			
		
							
								
								
									
										7
									
								
								Lib/lib-old/repr.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								Lib/lib-old/repr.py
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | ||||||
|  | from warnings import warnpy3k | ||||||
|  | warnpy3k("The repr module has been renamed to 'reprlib' in Python 3.0", | ||||||
|  |          stacklevel=2) | ||||||
|  | 
 | ||||||
|  | from sys import modules | ||||||
|  | import reprlib | ||||||
|  | modules[__name__] = repr | ||||||
|  | @ -210,7 +210,9 @@ class TestStdlibRenames(unittest.TestCase): | ||||||
| 
 | 
 | ||||||
|     renames = {'copy_reg': 'copyreg', 'Queue': 'queue', |     renames = {'copy_reg': 'copyreg', 'Queue': 'queue', | ||||||
|                'SocketServer': 'socketserver', |                'SocketServer': 'socketserver', | ||||||
|                'ConfigParser': 'configparser'} |                'ConfigParser': 'configparser', | ||||||
|  |                'repr': 'reprlib', | ||||||
|  |                } | ||||||
| 
 | 
 | ||||||
|     def check_rename(self, module_name, new_module_name): |     def check_rename(self, module_name, new_module_name): | ||||||
|         """Make sure that: |         """Make sure that: | ||||||
|  |  | ||||||
|  | @ -37,6 +37,9 @@ Extension Modules | ||||||
| Library | Library | ||||||
| ------- | ------- | ||||||
| 
 | 
 | ||||||
|  | - The repr module has been renamed 'reprlib'.  The old name is now | ||||||
|  |   deprecated. | ||||||
|  | 
 | ||||||
| - The statvfs module has been deprecated for removal in Python 3.0. | - The statvfs module has been deprecated for removal in Python 3.0. | ||||||
| 
 | 
 | ||||||
| - The sunaudiodev and SUNAUDIODEV modules have been deprecated for removal in | - The sunaudiodev and SUNAUDIODEV modules have been deprecated for removal in | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alexandre Vassalotti
						Alexandre Vassalotti