summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-05-10 17:22:43 (GMT)
committerJason R. Coombs <jaraco@jaraco.com>2014-05-10 17:22:43 (GMT)
commita384652d6d7751f31e42ac525056963140a74ebb (patch)
treeae163e096acb6249a81f7a920cd58cd9420657f0 /Lib
parent6f71726ecdd61c9d0a7ce5cfe346f4214434649b (diff)
downloadcpython-a384652d6d7751f31e42ac525056963140a74ebb.zip
cpython-a384652d6d7751f31e42ac525056963140a74ebb.tar.gz
cpython-a384652d6d7751f31e42ac525056963140a74ebb.tar.bz2
Drop support for Python 2.4 in upload command.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/command/upload.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py
index 7824466..75498b1 100644
--- a/Lib/distutils/command/upload.py
+++ b/Lib/distutils/command/upload.py
@@ -5,10 +5,10 @@ Implements the Distutils 'upload' subcommand (upload package to a package
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.core import PyPIRCCommand
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 @@ class upload(PyPIRCCommand):
'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',