mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Drop support for Python 2.4 in upload command.
This commit is contained in:
		
							parent
							
								
									6f71726ecd
								
							
						
					
					
						commit
						a384652d6d
					
				
					 1 changed files with 2 additions and 8 deletions
				
			
		|  | @ -5,10 +5,10 @@ | |||
| index). | ||||
| """ | ||||
| 
 | ||||
| import sys | ||||
| import os | ||||
| import io | ||||
| import platform | ||||
| import hashlib | ||||
| from base64 import standard_b64encode | ||||
| from urllib.request import urlopen, Request, HTTPError | ||||
| from urllib.parse import urlparse | ||||
|  | @ -17,12 +17,6 @@ | |||
| from distutils.spawn import spawn | ||||
| from distutils import log | ||||
| 
 | ||||
| # this keeps compatibility for 2.3 and 2.4 | ||||
| if sys.version < "2.5": | ||||
|     from md5 import md5 | ||||
| else: | ||||
|     from hashlib import md5 | ||||
| 
 | ||||
| class upload(PyPIRCCommand): | ||||
| 
 | ||||
|     description = "upload binary package to PyPI" | ||||
|  | @ -106,7 +100,7 @@ def upload_file(self, command, pyversion, filename): | |||
|             'content': (os.path.basename(filename),content), | ||||
|             'filetype': command, | ||||
|             'pyversion': pyversion, | ||||
|             'md5_digest': md5(content).hexdigest(), | ||||
|             'md5_digest': hashlib.md5(content).hexdigest(), | ||||
| 
 | ||||
|             # additional meta-data | ||||
|             'metadata_version': '1.0', | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jason R. Coombs
						Jason R. Coombs