Have md5 raise a DeprecationWarning as per PEP 4.
diff --git a/Lib/test/test_md5.py b/Lib/test/test_md5.py
index 1f08568..2c0e8e2 100644
--- a/Lib/test/test_md5.py
+++ b/Lib/test/test_md5.py
@@ -1,4 +1,7 @@
# Testing md5 module
+import warnings
+warnings.filterwarnings("ignore", "the md5 module is deprecated.*",
+ DeprecationWarning)
import unittest
from md5 import md5
diff --git a/Lib/test/test_pep247.py b/Lib/test/test_pep247.py
index 88f2461..1eb9462 100644
--- a/Lib/test/test_pep247.py
+++ b/Lib/test/test_pep247.py
@@ -3,6 +3,10 @@
# hashing algorithms.
#
+import warnings
+warnings.filterwarnings("ignore", "the md5 module is deprecated.*",
+ DeprecationWarning)
+
import md5, sha, hmac
def check_hash_module(module, key=None):
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
index 04f9ba5..67e52e9 100644
--- a/Lib/test/test_tarfile.py
+++ b/Lib/test/test_tarfile.py
@@ -5,7 +5,7 @@
import shutil
import tempfile
import StringIO
-import md5
+from hashlib import md5
import errno
import unittest
@@ -25,7 +25,7 @@
bz2 = None
def md5sum(data):
- return md5.new(data).hexdigest()
+ return md5(data).hexdigest()
def path(path):
return test_support.findfile(path)