Comment 2 for bug 323270

Revision history for this message
Ronald Blaschke (rblasch) wrote :

Not exactly sure, but I think hashlib is already available in 2.5, it's just that md5 is deprecated with 2.6. Here's what I did for my 2.6 install (the warning is just too annoying.)

=== modified file 'subvertpy/delta.py'
--- subvertpy/delta.py 2009-01-28 01:36:28 +0000
+++ subvertpy/delta.py 2009-01-30 18:56:10 +0000
@@ -18,7 +18,7 @@
 __author__ = "Jelmer Vernooij <email address hidden>"
 __docformat__ = "restructuredText"

-import md5
+import hashlib

 TXDELTA_SOURCE = 0
 TXDELTA_TARGET = 1
@@ -77,7 +77,7 @@
     :param handler: txdelta window handler function
     :return: MD5 hash over the stream
     """
- hash = md5.new()
+ hash = hashlib.md5()
     text = stream.read(block_size)
     while text != "":
         hash.update(text)