[Python-checkins] cpython: Drop support for Python 2.4 in upload command.
jason.coombs
python-checkins at python.org
Sat May 10 19:25:50 CEST 2014
http://hg.python.org/cpython/rev/796a80ac1c3f
changeset: 90614:796a80ac1c3f
user: Jason R. Coombs <jaraco at jaraco.com>
date: Sat May 10 13:22:43 2014 -0400
summary:
Drop support for Python 2.4 in upload command.
files:
Lib/distutils/command/upload.py | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py
--- a/Lib/distutils/command/upload.py
+++ b/Lib/distutils/command/upload.py
@@ -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 @@
'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',
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list