Package: dput Version: 0.9.2.37 Severity: normal Tags: patch Hello,
as Ubuntu is currently switching to python 2.6 (I guess Debian will follow in the near future), dput produces the following warnings: ,---- | /usr/bin/dput:21: DeprecationWarning: the md5 module is deprecated; use hashlib instead | import pwd, stat, md5, sha, rfc822 | /usr/bin/dput:21: DeprecationWarning: the sha module is deprecated; use the hashlib module instead | import pwd, stat, md5, sha, rfc822 `---- Attached is a patch which makes dput use the hashlib module. Regards Michael
diff -Nru dput-0.9.2.37ubuntu2/dput dput-0.9.2.37ubuntu3/dput --- dput-0.9.2.37ubuntu2/dput 2009-02-10 16:04:34.000000000 +0100 +++ dput-0.9.2.37ubuntu3/dput 2009-03-02 11:37:39.000000000 +0100 @@ -18,7 +18,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import os, sys, string, re, glob, signal -import pwd, stat, md5, sha, rfc822 +import pwd, stat, rfc822 +from hashlib import md5, sha1 # Now import our modules import ConfigParser @@ -170,9 +171,9 @@ if hash == 'md5': hash_type = md5 else: - hash_type = sha + hash_type = sha1 - check_obj = hash_type.new() + check_obj = hash_type() for line in file_to_test.readlines(): check_obj.update(line)