[Python-modules-commits] r8785 - in packages/pyrad/trunk/debian (4 files)
sharky at users.alioth.debian.org
sharky at users.alioth.debian.org
Fri Jun 12 14:48:57 UTC 2009
Date: Friday, June 12, 2009 @ 14:48:50
Author: sharky
Revision: 8785
add patch to fix python 2.6 deprecation warnings
Added:
packages/pyrad/trunk/debian/patches/
packages/pyrad/trunk/debian/patches/01-python26_deprecation_warnings.patch
Modified:
packages/pyrad/trunk/debian/changelog
packages/pyrad/trunk/debian/rules
Modified: packages/pyrad/trunk/debian/changelog
===================================================================
--- packages/pyrad/trunk/debian/changelog 2009-06-12 06:18:52 UTC (rev 8784)
+++ packages/pyrad/trunk/debian/changelog 2009-06-12 14:48:50 UTC (rev 8785)
@@ -1,3 +1,10 @@
+pyrad (1.1-6) UNRELEASED; urgency=low
+
+ * Add 01-python26_deprecation_warnings.patch from Ubuntu to fix
+ Python 2.6 DeprecationWarnings (Closes: #532843).
+
+ -- Jeremy Lainé <jeremy.laine at m4x.org> Fri, 12 Jun 2009 16:47:02 +0200
+
pyrad (1.1-5) unstable; urgency=low
* Update Standards-Version to 3.8.1 (no changes).
Added: packages/pyrad/trunk/debian/patches/01-python26_deprecation_warnings.patch
===================================================================
--- packages/pyrad/trunk/debian/patches/01-python26_deprecation_warnings.patch (rev 0)
+++ packages/pyrad/trunk/debian/patches/01-python26_deprecation_warnings.patch 2009-06-12 14:48:50 UTC (rev 8785)
@@ -0,0 +1,72 @@
+diff -Nur -x '*.orig' -x '*~' pyrad-1.1/pyrad/packet.py pyrad-1.1.new/pyrad/packet.py
+--- pyrad-1.1/pyrad/packet.py 2007-09-30 12:03:48.000000000 +0200
++++ pyrad-1.1.new/pyrad/packet.py 2009-06-12 08:01:05.911534696 +0200
+@@ -11,7 +11,7 @@
+
+ __docformat__ = "epytext en"
+
+-import md5, struct, types, random, UserDict
++import hashlib, struct, types, random, UserDict
+ from pyrad import tools
+
+ # Packet codes
+@@ -249,7 +249,7 @@
+ attr=self._PktEncodeAttributes()
+ header=struct.pack("!BBH", self.code, self.id, (20+len(attr)))
+
+- authenticator=md5.new(header[0:4] + self.authenticator
++ authenticator=hashlib.md5(header[0:4] + self.authenticator
+ + attr + self.secret).digest()
+
+ return header + authenticator + attr
+@@ -262,7 +262,7 @@
+ if rawreply is None:
+ rawreply=reply.ReplyPacket()
+
+- hash=md5.new(rawreply[0:4] + self.authenticator +
++ hash=hashlib.md5(rawreply[0:4] + self.authenticator +
+ rawreply[20:] + self.secret).digest()
+
+ if hash!=rawreply[4:20]:
+@@ -413,7 +413,7 @@
+
+ last=self.authenticator
+ while buf:
+- hash=md5.new(self.secret+last).digest()
++ hash=hashlib.md5(self.secret+last).digest()
+ for i in range(16):
+ pw+=chr(ord(hash[i]) ^ ord(buf[i]))
+
+@@ -447,12 +447,12 @@
+ if len(password)%16!=0:
+ buf+="\x00" * (16-(len(password)%16))
+
+- hash=md5.new(self.secret+self.authenticator).digest()
++ hash=hashlib.md5(self.secret+self.authenticator).digest()
+ result=""
+
+ last=self.authenticator
+ while buf:
+- hash=md5.new(self.secret+last).digest()
++ hash=hashlib.md5(self.secret+last).digest()
+ for i in range(16):
+ result+=chr(ord(hash[i]) ^ ord(buf[i]))
+
+@@ -494,7 +494,7 @@
+ @rtype: boolean
+ """
+ assert(self.raw_packet)
+- hash=md5.new(self.raw_packet[0:4] + 16*"\x00" +
++ hash=hashlib.md5(self.raw_packet[0:4] + 16*"\x00" +
+ self.raw_packet[20:] + self.secret).digest()
+
+ return hash==self.authenticator
+@@ -517,7 +517,7 @@
+
+ header=struct.pack("!BBH", self.code, self.id, (20+len(attr)))
+
+- self.authenticator=md5.new(header[0:4] + 16 * "\x00" + attr
++ self.authenticator=hashlib.md5(header[0:4] + 16 * "\x00" + attr
+ + self.secret).digest()
+
+ return header + self.authenticator + attr
Modified: packages/pyrad/trunk/debian/rules
===================================================================
--- packages/pyrad/trunk/debian/rules 2009-06-12 06:18:52 UTC (rev 8784)
+++ packages/pyrad/trunk/debian/rules 2009-06-12 14:48:50 UTC (rev 8785)
@@ -6,5 +6,6 @@
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
More information about the Python-modules-commits
mailing list