diff Lib/test/test_stringprep.py @ 38052:32a187f3d5ba legacy-trunk

In stdlib, use hashlib instead of deprecated md5 and sha modules.
author Georg Brandl <georg@python.org>
date Sun, 30 Apr 2006 08:57:35 +0000
parents 6f15e73b59f2
children 3b1396b01239 06145fbc7ab9
line wrap: on
line diff
--- a/Lib/test/test_stringprep.py	Sun Apr 30 07:06:11 2006 +0000
+++ b/Lib/test/test_stringprep.py	Sun Apr 30 08:57:35 2006 +0000
@@ -2,7 +2,6 @@
 # Since we don't have them, this test checks only a few codepoints.
 
 from test.test_support import verify, vereq
-import sha
 
 import stringprep
 from stringprep import *
@@ -73,6 +72,7 @@
 # unicode database. Instead, stringprep.py asserts the version of
 # the database.
 
+# import hashlib
 # predicates = [k for k in dir(stringprep) if k.startswith("in_table")]
 # predicates.sort()
 # for p in predicates:
@@ -83,6 +83,6 @@
 #         if f(unichr(i)):
 #             data[i] = "1"
 #     data = "".join(data)
-#     h = sha.sha()
+#     h = hashlib.sha1()
 #     h.update(data)
-#     print p,h.hexdigest()
+#     print p, h.hexdigest()