deprecate sha1/md5_constructor from koji.util

These functions are now fully provided by hashlib. Commit removes their
usage from koji's codebase and leaves deprecation message in lib.

Final removal from lib is scheduled to 1.21.

Fixes: https://pagure.io/koji/issue/1487
This commit is contained in:
Tomas Kopecek 2019-06-11 11:37:51 +02:00 committed by Mike McLean
parent c76573312a
commit dfbe322222
8 changed files with 29 additions and 29 deletions

View file

@ -1,4 +1,5 @@
from __future__ import absolute_import
import hashlib
try:
import unittest2 as unittest
except ImportError:
@ -6,7 +7,7 @@ except ImportError:
import kojihub
from koji import GenericError
from koji.util import md5_constructor, adler32_constructor
from koji.util import adler32_constructor
class TestGetVerifyClass(unittest.TestCase):
@ -19,7 +20,7 @@ class TestGetVerifyClass(unittest.TestCase):
kojihub.get_verify_class(None) is None
def test_get_verify_class_is_md5(self):
kojihub.get_verify_class('md5') is md5_constructor
kojihub.get_verify_class('md5') is hashlib.md5
def test_get_verify_class_is_adler32(self):
kojihub.get_verify_class('adler32') is adler32_constructor