]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
dnssec/hash: remove obsolete module 348/head
authorTomas Krizek <tomas.krizek@nic.cz>
Wed, 2 Jan 2019 14:34:30 +0000 (15:34 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Wed, 2 Jan 2019 14:34:30 +0000 (15:34 +0100)
differences.md
dns/__init__.py
dns/hash.py [deleted file]

index 0896e8fc6d17c8ef40f02b96297578ce654c5218..89e0e80c0545af07176817965cc2013dd2c2eaf8 100644 (file)
@@ -4,3 +4,7 @@
 
 dnspython 2.0 rounds in the standard python 3 fashion; dnspython 1.x rounded
 in the python 2 style on both python 2 and 3.
+
+# Removed hash module
+
+dns.hash module was removed. Use Python built in hashlib instead.
index c1ce8e60616e92da23b66d330a838c250061696f..510b45e4720581547acf85b2b2a7b322cade6b8e 100644 (file)
@@ -24,7 +24,6 @@ __all__ = [
     'entropy',
     'exception',
     'flags',
-    'hash',
     'inet',
     'ipv4',
     'ipv6',
diff --git a/dns/hash.py b/dns/hash.py
deleted file mode 100644 (file)
index 1713e62..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
-
-# Copyright (C) 2011 Nominum, Inc.
-#
-# Permission to use, copy, modify, and distribute this software and its
-# documentation for any purpose with or without fee is hereby granted,
-# provided that the above copyright notice and this permission notice
-# appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
-# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-"""Hashing backwards compatibility wrapper"""
-
-import hashlib
-import warnings
-
-warnings.warn(
-    "dns.hash module will be removed in future versions. Please use hashlib instead.",
-    DeprecationWarning)
-
-hashes = {}
-hashes['MD5'] = hashlib.md5
-hashes['SHA1'] = hashlib.sha1
-hashes['SHA224'] = hashlib.sha224
-hashes['SHA256'] = hashlib.sha256
-hashes['SHA384'] = hashlib.sha384
-hashes['SHA512'] = hashlib.sha512
-
-
-def get(algorithm):
-    return hashes[algorithm.upper()]