Gentoo Archives: gentoo-commits

From: "Alexis Ballier (aballier)" <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-nntp/hellanzb/files: hellanzb-0.13-python_26_fixes.patch hellanzb-0.13-twisted-10.0.0.patch
Date: Fri, 23 Apr 2010 13:36:58
Message-Id: 20100423133653.801F1317E3@corvid.gentoo.org
1 aballier 10/04/23 13:36:53
2
3 Added: hellanzb-0.13-python_26_fixes.patch
4 hellanzb-0.13-twisted-10.0.0.patch
5 Log:
6 Add patch for compat. with twisted 10.0.0, grabbed from debian, bug #316725 by Michael Farrell <micolous+gentoo@×××××.com>, pach to fix warnings with python 2.6, bug #262881 by rinus.
7 (Portage version: 2.2_rc67/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 net-nntp/hellanzb/files/hellanzb-0.13-python_26_fixes.patch
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nntp/hellanzb/files/hellanzb-0.13-python_26_fixes.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nntp/hellanzb/files/hellanzb-0.13-python_26_fixes.patch?rev=1.1&content-type=text/plain
14
15 Index: hellanzb-0.13-python_26_fixes.patch
16 ===================================================================
17 https://bugs.gentoo.org/show_bug.cgi?id=262881
18
19 Index: Hellanzb/Growl.py
20 ===================================================================
21 --- Hellanzb/Growl.py (Revision 1094)
22 +++ Hellanzb/Growl.py (Arbeitskopie)
23 @@ -7,7 +7,13 @@
24 __contributors__ = "Ingmar J Stein (Growl Team)"
25
26 import struct
27 -import md5
28 +
29 +# The md5 module has been deprecated as of Python 2.6.
30 +try:
31 + from hashlib import md5
32 +except ImportError:
33 + from md5 import md5
34 +
35 from socket import AF_INET, SOCK_DGRAM, socket
36
37 GROWL_UDP_PORT=9887
38 @@ -51,7 +57,7 @@
39 self.data += encoded
40 for default in self.defaults:
41 self.data += struct.pack("B", default)
42 - self.checksum = md5.new()
43 + self.checksum = md5()
44 self.checksum.update(self.data)
45 if self.password:
46 self.checksum.update(self.password)
47 @@ -89,7 +95,7 @@
48 self.data += self.title
49 self.data += self.description
50 self.data += self.application
51 - self.checksum = md5.new()
52 + self.checksum = md5()
53 self.checksum.update(self.data)
54 if password:
55 self.checksum.update(password)
56 Index: Hellanzb/Util.py
57 ===================================================================
58 --- Hellanzb/Util.py (Revision 1094)
59 +++ Hellanzb/Util.py (Arbeitskopie)
60 @@ -28,9 +28,6 @@
61
62 class FatalError(Exception):
63 """ An error that will cause the program to exit """
64 - def __init__(self, message):
65 - self.args = [message]
66 - self.message = message
67
68 class EmptyForThisPool(Empty):
69 """ The queue is empty in terms of our current serverPool, but there are still segments to
70 Index: Hellanzb/HellaXMLRPC/HtPasswdAuth.py
71 ===================================================================
72 --- Hellanzb/HellaXMLRPC/HtPasswdAuth.py (Revision 1094)
73 +++ Hellanzb/HellaXMLRPC/HtPasswdAuth.py (Arbeitskopie)
74 @@ -8,7 +8,13 @@
75 (c) Copyright 2005 Philip Jenvey
76 [See end of file]
77 """
78 -import md5
79 +
80 +# The md5 module has been deprecated as of Python 2.6.
81 +try:
82 + from hashlib import md5
83 +except ImportError:
84 + from md5 import md5
85 +
86 from twisted.web import static
87 from twisted.web.resource import Resource
88
89 @@ -70,7 +76,7 @@
90
91 self.user = user
92
93 - m = md5.new()
94 + m = md5()
95 m.update(password)
96 del password
97 self.passwordDigest = m.digest()
98 @@ -90,7 +96,7 @@
99 def authenticateUser(self, request):
100 username, password = request.getUser(), request.getPassword()
101
102 - m = md5.new()
103 + m = md5()
104 m.update(password)
105
106 authenticated = username == self.user and self.passwordDigest == m.digest()
107
108
109
110 1.1 net-nntp/hellanzb/files/hellanzb-0.13-twisted-10.0.0.patch
111
112 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nntp/hellanzb/files/hellanzb-0.13-twisted-10.0.0.patch?rev=1.1&view=markup
113 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-nntp/hellanzb/files/hellanzb-0.13-twisted-10.0.0.patch?rev=1.1&content-type=text/plain
114
115 Index: hellanzb-0.13-twisted-10.0.0.patch
116 ===================================================================
117 https://bugs.gentoo.org/show_bug.cgi?id=316725
118 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=573221
119
120 --- xmlrpc.py 2010-03-10 18:29:19.000000000 -0600
121 +++ /usr/share/pyshared/Hellanzb/HellaXMLRPC/xmlrpc.py 2010-03-10 18:30:03.000000000 -0600
122 @@ -31,7 +31,7 @@
123 from twisted.python import log, reflect
124
125 import twisted.copyright
126 -if twisted.copyright.version >= '2.0.0':
127 +if twisted.copyright.version >= '2.0.0' or twisted.copyright.version >= '10.0.0':
128 from twisted.web import http
129 else:
130 from twisted.protocols import http
131 --- HtPasswdAuth.py 2010-03-10 18:30:29.000000000 -0600
132 +++ /usr/share/pyshared/Hellanzb/HellaXMLRPC/HtPasswdAuth.py 2010-03-10 18:30:49.000000000 -0600
133 @@ -19,7 +19,7 @@
134 from twisted.web.resource import Resource
135
136 import twisted.copyright
137 -if twisted.copyright.version >= '2.0.0':
138 +if twisted.copyright.version >= '2.0.0' or twisted.copyright.version >= '10.0.0':
139 from twisted.web import http
140 else:
141 from twisted.protocols import http
142 --- HellaReactor.py 2010-03-10 18:22:34.000000000 -0600
143 +++ /usr/share/pyshared/Hellanzb/HellaReactor.py 2010-03-10 18:30:07.000000000 -0600
144 @@ -9,7 +9,7 @@
145 import Hellanzb, sys, time
146
147 import twisted.copyright
148 -if twisted.copyright.version >= '2.0.0':
149 +if twisted.copyright.version >= '2.0.0' or twisted.copyright.version >= '10.0.0':
150 from twisted.internet.selectreactor import SelectReactor
151 from twisted.internet.selectreactor import _NO_FILENO
152 from twisted.internet.selectreactor import _NO_FILEDESC