Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 211519 Details for
Bug 295042
dev-python/pyzor-0.5.0-r1 fails when called from spamassassin: deprecation warnings
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
python26_warnings.patch
python26_warnings.patch (text/plain), 2.63 KB, created by
Peter Gantner (a.k.a. nephros)
on 2009-11-29 13:57:02 UTC
(
hide
)
Description:
python26_warnings.patch
Filename:
MIME Type:
Creator:
Peter Gantner (a.k.a. nephros)
Created:
2009-11-29 13:57:02 UTC
Size:
2.63 KB
patch
obsolete
># Description: Fix python2.6 deprecation warnings ># Origin: Ubuntu ># Author: Alessio Treglia <quadrispro@ubuntu.com> ># Bug-Ubuntu: https://bugs.launchpad.net/bugs/394775 >diff -Nur -x '*.orig' -x '*~' pyzor-0.5.0/lib/pyzor/client.py pyzor-0.5.0.new/lib/pyzor/client.py >--- pyzor-0.5.0/lib/pyzor/client.py 2009-04-29 22:53:50.000000000 +0200 >+++ pyzor-0.5.0.new/lib/pyzor/client.py 2009-08-01 12:27:55.749263645 +0200 >@@ -10,7 +10,7 @@ > import tempfile > import mimetools >-import multifile >+import email >-import sha >+import hashlib > > import pyzor > from pyzor import * >@@ -402,12 +402,12 @@ > del p2 > > saltfile = open(randfile) >- salt = saltfile.read(sha.digest_size) >+ salt = saltfile.read(hashlib.sha1().digest_size) > del saltfile > >- salt_digest = sha.new(salt) >+ salt_digest = hashlib.sha1(salt) > >- pass_digest = sha.new() >+ pass_digest = hashlib.sha1() > pass_digest.update(salt_digest.digest()) > pass_digest.update(p1) > sys.stdout.write("salt,key:\n") >@@ -498,7 +498,7 @@ > if len(offsets) == 0: > return > >- self._digest = sha.new() >+ self._digest = hashlib.sha1() > > if len(offsets) <= self.atomic_num_lines: > self.handle_atomic(fp) >diff -Nur -x '*.orig' -x '*~' pyzor-0.5.0/lib/pyzor/__init__.py pyzor-0.5.0.new/lib/pyzor/__init__.py >--- pyzor-0.5.0/lib/pyzor/__init__.py 2009-04-29 22:53:50.000000000 +0200 >+++ pyzor-0.5.0.new/lib/pyzor/__init__.py 2009-08-01 12:28:20.268413580 +0200 >@@ -8,7 +8,7 @@ > import os.path > import re > import sys >-import sha >+import hashlib > import tempfile > import random > import ConfigParser >@@ -114,7 +114,7 @@ > > class DataDigest(str): > # hex output doubles digest size >- value_size = sha.digest_size * 2 >+ value_size = hashlib.sha1().digest_size * 2 > > def __init__(self, value): > if len(value) != self.value_size: >@@ -285,7 +285,7 @@ > """returns a digest object""" > typecheck(msg, Message) > >- return sha.new(str(msg)) >+ return hashlib.sha1(str(msg)) > > hash_msg = staticmethod(hash_msg) > >@@ -295,7 +295,7 @@ > typecheck(key, long) > typecheck(user, Username) > >- return sha.new("%s:%x" % (Username, key)).hexdigest().lower() >+ return hashlib.sha1("%s:%x" % (Username, key)).hexdigest().lower() > > hash_key = staticmethod(hash_key) > >@@ -316,7 +316,7 @@ > > h_msg = self.hash_msg(msg) > >- return sha.new("%s:%d:%s" % (h_msg.digest(), ts, hashed_key)).hexdigest().lower() >+ return hashlib.sha1("%s:%d:%s" % (h_msg.digest(), ts, hashed_key)).hexdigest().lower() > > sign_msg = classmethod(sign_msg) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 295042
: 211519