mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
In stdlib, use hashlib instead of deprecated md5 and sha modules.
This commit is contained in:
parent
fa42bd7af4
commit
bffb0bc064
6 changed files with 16 additions and 17 deletions
|
|
@ -21,7 +21,7 @@ import urlparse
|
|||
import plistlib
|
||||
import distutils.util
|
||||
import distutils.sysconfig
|
||||
import md5
|
||||
import hashlib
|
||||
import tarfile
|
||||
import tempfile
|
||||
import shutil
|
||||
|
|
@ -693,7 +693,7 @@ class PimpPackage:
|
|||
sys.stderr.write("Warning: no MD5Sum for %s\n" % self.fullname())
|
||||
return 1
|
||||
data = open(self.archiveFilename, 'rb').read()
|
||||
checksum = md5.new(data).hexdigest()
|
||||
checksum = hashlib.md5(data).hexdigest()
|
||||
return checksum == self._dict['MD5Sum']
|
||||
|
||||
def unpackPackageOnly(self, output=None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue