Package: rubber
Version: 1.1-2.3
Severity: important
Tags: patch
When rubber tries to take the md5 of files, it now crashes (it used to issue
a DeprecationWarning).
test.tex: ------------- 8< ------------------
\documentclass{article}
\begin{document}
test
\end{document}
------------------------ >8 ------------------
$ rubber test.tex
compiling test.tex...
Traceback (most recent call last):
File "/usr/bin/rubber", line 9, in <module>
sys.exit(Main()(sys.argv[1:]))
File "/usr/share/rubber/rubber/cmdline.py", line 296, in __call__
return self.main(cmdline)
File "/usr/share/rubber/rubber/cmdline.py", line 260, in main
ret = env.final.make(self.force)
File "/usr/share/rubber/rubber/__init__.py", line 237, in make
ret = self.run()
File "/usr/share/rubber/rubber/rules/latex/__init__.py", line 1223, in run
if self.compile(): return 1
File "/usr/share/rubber/rubber/rules/latex/__init__.py", line 1129, in compile
self.aux_md5[aux] = md5_file(aux)
File "/usr/share/rubber/rubber/util.py", line 22, in md5_file
m = md5.new()
AttributeError: 'builtin_function_or_method' object has no attribute 'new'
The attached (trivial) patch finishes the conversion to hashlib.
cheers
Stuart
diff -U2 -r rubber-1.1-old/src/util.py rubber-1.1/src/util.py
--- rubber-1.1-old/src/util.py 2010-09-24 10:47:49.000000000 +0100
+++ rubber-1.1/src/util.py 2010-09-24 10:46:01.000000000 +0100
@@ -20,5 +20,5 @@
Compute the MD5 sum of a given file.
"""
- m = md5.new()
+ m = md5()
file = open(fname)
for line in file.readlines():