Mercurial > hg
changeset 29342:c27dc3c31222
util: drop local aliases for md5, sha1, sha256, and sha512
This used to be needed to paper over hashlib not being in all Pythons
we support, but that's not a problem anymore, so we can simplify
things a little bit.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Fri, 10 Jun 2016 00:13:23 -0400 |
parents | 0d83ad967bf8 |
children | e095b9e753f7 |
files | mercurial/util.py |
diffstat | 1 files changed, 3 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/util.py Fri Jun 10 00:12:33 2016 -0400 +++ b/mercurial/util.py Fri Jun 10 00:13:23 2016 -0400 @@ -64,10 +64,6 @@ else: from . import posix as platform -md5 = hashlib.md5 -sha1 = hashlib.sha1 -sha256 = hashlib.sha256 -sha512 = hashlib.sha512 _ = i18n._ cachestat = platform.cachestat @@ -138,9 +134,9 @@ return getattr(thing, attr, _notset) is not _notset DIGESTS = { - 'md5': md5, - 'sha1': sha1, - 'sha512': sha512, + 'md5': hashlib.md5, + 'sha1': hashlib.sha1, + 'sha512': hashlib.sha512, } # List of digest types from strongest to weakest DIGESTS_BY_STRENGTH = ['sha512', 'sha1', 'md5']