[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Duplicity-talk] Version 0.5.04 on openSuse 11.1 - deprecation warni
From: |
Kenneth Loafman |
Subject: |
Re: [Duplicity-talk] Version 0.5.04 on openSuse 11.1 - deprecation warning |
Date: |
Tue, 06 Jan 2009 11:36:07 -0600 |
User-agent: |
Thunderbird 2.0.0.18 (X11/20081125) |
Michael Schneider wrote:
> Dear all,
>
> after upgrading my OS to Opensuse 11.1 and installing duplicity 0.5.04,
> I get the following warnings:
> /usr/lib/python2.6/site-packages/duplicity/gpg.py:23:
> DeprecationWarning: the sha module is deprecated;
> /usr/lib/python2.6/site-packages/duplicity/gpg.py:23:
> DeprecationWarning: the md5 module is deprecated;
>
> I got rid of these warnings by patching gpg.py as follows:
>
> *** gpg.py 2008-12-28 17:32:06.000000000 +0100
> --- gpg.py.orig 2008-12-28 15:30:45.000000000 +0100
> ***************
> *** 21,25 ****
> """duplicity's gpg interface, builds upon Frank Tobin's GnuPGInterface"""
>
> ! import select, os, sys, thread, hashlib, types, cStringIO, tempfile,
> re, gzip
> import GnuPGInterface, misc, log
>
> --- 21,25 ----
> """duplicity's gpg interface, builds upon Frank Tobin's GnuPGInterface"""
>
> ! import select, os, sys, thread, sha, md5, types, cStringIO, tempfile,
> re, gzip
> import GnuPGInterface, misc, log
>
> ***************
> *** 304,310 ****
> fp = path.open("rb")
> if hash == "SHA1":
> ! hash_obj = hashlib.sha1()
> elif hash == "MD5":
> ! hash_obj = hashlib.md5()
> else:
> assert 0, "Unknown hash %s" % (hash,)
> --- 304,310 ----
> fp = path.open("rb")
> if hash == "SHA1":
> ! hash_obj = sha.new()
> elif hash == "MD5":
> ! hash_obj = md5.new()
> else:
> assert 0, "Unknown hash %s" % (hash,)
Thanks!
This fix is in CVS now and runs under 2.3, 2.4, and 2.5. I don't have
2.6 installed, but it should run there as well.
...Ken
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Duplicity-talk] Version 0.5.04 on openSuse 11.1 - deprecation warning,
Kenneth Loafman <=