Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 190418 Details for
Bug 262881
net-nntp/hellanzb shows deprecation warnings with python-2.6
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix python-2.6 DeprecationWarning
hellanzb-0.13-python_26_fixes.diff (text/plain), 2.58 KB, created by
rinus
on 2009-05-05 15:34:30 UTC
(
hide
)
Description:
Fix python-2.6 DeprecationWarning
Filename:
MIME Type:
Creator:
rinus
Created:
2009-05-05 15:34:30 UTC
Size:
2.58 KB
patch
obsolete
>Index: Hellanzb/Growl.py >=================================================================== >--- Hellanzb/Growl.py (Revision 1094) >+++ Hellanzb/Growl.py (Arbeitskopie) >@@ -7,7 +7,13 @@ > __contributors__ = "Ingmar J Stein (Growl Team)" > > import struct >-import md5 >+ >+# The md5 module has been deprecated as of Python 2.6. >+try: >+ from hashlib import md5 >+except ImportError: >+ from md5 import md5 >+ > from socket import AF_INET, SOCK_DGRAM, socket > > GROWL_UDP_PORT=9887 >@@ -51,7 +57,7 @@ > self.data += encoded > for default in self.defaults: > self.data += struct.pack("B", default) >- self.checksum = md5.new() >+ self.checksum = md5() > self.checksum.update(self.data) > if self.password: > self.checksum.update(self.password) >@@ -89,7 +95,7 @@ > self.data += self.title > self.data += self.description > self.data += self.application >- self.checksum = md5.new() >+ self.checksum = md5() > self.checksum.update(self.data) > if password: > self.checksum.update(password) >Index: Hellanzb/Util.py >=================================================================== >--- Hellanzb/Util.py (Revision 1094) >+++ Hellanzb/Util.py (Arbeitskopie) >@@ -28,9 +28,6 @@ > > class FatalError(Exception): > """ An error that will cause the program to exit """ >- def __init__(self, message): >- self.args = [message] >- self.message = message > > class EmptyForThisPool(Empty): > """ The queue is empty in terms of our current serverPool, but there are still segments to >Index: Hellanzb/HellaXMLRPC/HtPasswdAuth.py >=================================================================== >--- Hellanzb/HellaXMLRPC/HtPasswdAuth.py (Revision 1094) >+++ Hellanzb/HellaXMLRPC/HtPasswdAuth.py (Arbeitskopie) >@@ -8,7 +8,13 @@ > (c) Copyright 2005 Philip Jenvey > [See end of file] > """ >-import md5 >+ >+# The md5 module has been deprecated as of Python 2.6. >+try: >+ from hashlib import md5 >+except ImportError: >+ from md5 import md5 >+ > from twisted.web import static > from twisted.web.resource import Resource > >@@ -70,7 +76,7 @@ > > self.user = user > >- m = md5.new() >+ m = md5() > m.update(password) > del password > self.passwordDigest = m.digest() >@@ -90,7 +96,7 @@ > def authenticateUser(self, request): > username, password = request.getUser(), request.getPassword() > >- m = md5.new() >+ m = md5() > m.update(password) > > authenticated = username == self.user and self.passwordDigest == m.digest()
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 262881
: 190418 |
190420