diff options
author | Hanno Böck <hanno@gentoo.org> | 2010-07-02 00:09:27 +0000 |
---|---|---|
committer | Hanno Böck <hanno@gentoo.org> | 2010-07-02 00:09:27 +0000 |
commit | e767ab4d2f9eba91169839b57f87b39254088a65 (patch) | |
tree | 496eed38710124cf362ca076c4b7607bd7f99ec1 /net-im | |
parent | Fix typo. (diff) | |
download | gentoo-2-e767ab4d2f9eba91169839b57f87b39254088a65.tar.gz gentoo-2-e767ab4d2f9eba91169839b57f87b39254088a65.tar.bz2 gentoo-2-e767ab4d2f9eba91169839b57f87b39254088a65.zip |
pyicq-t: patch for python 2.6 deprecatoin warnings
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'net-im')
-rw-r--r-- | net-im/pyicq-t/ChangeLog | 6 | ||||
-rw-r--r-- | net-im/pyicq-t/files/pyicq-t-0.8.1.5-python26-warnings.diff | 118 | ||||
-rw-r--r-- | net-im/pyicq-t/pyicq-t-0.8.1.5.ebuild | 12 |
3 files changed, 131 insertions, 5 deletions
diff --git a/net-im/pyicq-t/ChangeLog b/net-im/pyicq-t/ChangeLog index 000d2bc630d3..88c1f0679256 100644 --- a/net-im/pyicq-t/ChangeLog +++ b/net-im/pyicq-t/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-im/pyicq-t # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-im/pyicq-t/ChangeLog,v 1.19 2010/04/23 19:56:48 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-im/pyicq-t/ChangeLog,v 1.20 2010/07/02 00:09:27 hanno Exp $ + + 02 Jul 2010; Hanno Boeck <hanno@gentoo.org> pyicq-t-0.8.1.5.ebuild, + +files/pyicq-t-0.8.1.5-python26-warnings.diff: + Fix deprecation warnings with python 2.6. 23 Apr 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> pyicq-t-0.8.1.5.ebuild: diff --git a/net-im/pyicq-t/files/pyicq-t-0.8.1.5-python26-warnings.diff b/net-im/pyicq-t/files/pyicq-t-0.8.1.5-python26-warnings.diff new file mode 100644 index 000000000000..fd8e9e5ab8f0 --- /dev/null +++ b/net-im/pyicq-t/files/pyicq-t-0.8.1.5-python26-warnings.diff @@ -0,0 +1,118 @@ +diff -Naur pyicqt-0.8.1.5/src/avatar.py p1//src/avatar.py +--- pyicqt-0.8.1.5/src/avatar.py 2010-06-07 12:16:36.000000000 +0200 ++++ p1//src/avatar.py 2010-06-07 12:16:16.000000000 +0200 +@@ -6,7 +6,7 @@ + from twisted.words.xish.domish import Element + from debug import LogEvent, INFO, WARN, ERROR + import lang +-import sha ++from hashlib import sha1 + import base64 + import os + import os.path +@@ -46,7 +46,7 @@ + class Avatar: + """ Represents an Avatar. Does not store the image in memory. """ + def __init__(self, imageData, avatarCache): +- self.__imageHash = sha.sha(imageData).hexdigest() ++ self.__imageHash = sha1(imageData).hexdigest() + self.__avatarCache = avatarCache + + def getImageHash(self): +diff -Naur pyicqt-0.8.1.5/src/contact.py p1//src/contact.py +--- pyicqt-0.8.1.5/src/contact.py 2010-06-07 12:16:43.000000000 +0200 ++++ p1//src/contact.py 2010-06-07 12:16:16.000000000 +0200 +@@ -8,7 +8,6 @@ + import config + from debug import LogEvent, INFO, WARN, ERROR + import lang +-import sha + import legacy + import globals + import base64 +diff -Naur pyicqt-0.8.1.5/src/legacy/buddies.py p1//src/legacy/buddies.py +--- pyicqt-0.8.1.5/src/legacy/buddies.py 2009-08-24 14:37:59.000000000 +0200 ++++ p1//src/legacy/buddies.py 2010-06-07 12:07:37.000000000 +0200 +@@ -12,7 +12,7 @@ + import os.path + import binascii + import os.path +-import md5 ++from hashlib import md5 + + X = os.path.sep + +@@ -188,7 +188,7 @@ + avatarData = avatar.AvatarCache().setAvatar(imgmanip.convertToPNG(iconData)) + c.updateAvatar(avatarData, push=True) + if not md5Hash: +- m = md5.new() ++ m = md5() + m.update(iconData) + md5Hash = m.digest() + if not numHash: +diff -Naur pyicqt-0.8.1.5/src/legacy/glue.py p1//src/legacy/glue.py +--- pyicqt-0.8.1.5/src/legacy/glue.py 2009-08-24 14:37:59.000000000 +0200 ++++ p1//src/legacy/glue.py 2010-06-07 12:07:37.000000000 +0200 +@@ -18,7 +18,7 @@ + import time + import binascii + import avatar +-import md5 ++from hashlib import md5 + import random + + from twisted.python import log +@@ -398,7 +398,7 @@ + try: + self.myavatar = imgmanip.convertToJPG(imageData) + self.myavatarlen = len(self.myavatar) +- m=md5.new() ++ m=md5() + m.update(self.myavatar) + self.myavatarsum = m.digest() + self.myavatarstamp = time.time() +diff -Naur pyicqt-0.8.1.5/src/legacy/icqt.py p1//src/legacy/icqt.py +--- pyicqt-0.8.1.5/src/legacy/icqt.py 2009-08-24 14:37:59.000000000 +0200 ++++ p1//src/legacy/icqt.py 2010-06-07 12:07:37.000000000 +0200 +@@ -14,7 +14,6 @@ + import time + import datetime + import binascii +-import md5 + import locale + import struct + +diff -Naur pyicqt-0.8.1.5/src/tlib/oscar.py p1//src/tlib/oscar.py +--- pyicqt-0.8.1.5/src/tlib/oscar.py 2009-08-24 14:37:59.000000000 +0200 ++++ p1//src/tlib/oscar.py 2010-06-07 12:07:37.000000000 +0200 +@@ -21,7 +21,7 @@ + from scheduler import Scheduler + + import struct +-import md5 ++from hashlib import md5 + import string + import socket + import random +@@ -120,9 +120,9 @@ + return dict,data + + def encryptPasswordMD5(password,key): +- m=md5.new() ++ m=md5() + m.update(key) +- m.update(md5.new(password).digest()) ++ m.update(md5(password).digest()) + m.update("AOL Instant Messenger (SM)") + return m.digest() + +@@ -534,7 +534,7 @@ + self.iconSum = tlvs.get(0xd5,"") + + def updateIcon(self, iconData): +- m=md5.new() ++ m=md5() + m.update(iconData) + self.iconSum = m.digest() + log.msg("icon sum is %s" % binascii.hexlify(self.iconSum)) diff --git a/net-im/pyicq-t/pyicq-t-0.8.1.5.ebuild b/net-im/pyicq-t/pyicq-t-0.8.1.5.ebuild index f5901a87d228..629aca815b3a 100644 --- a/net-im/pyicq-t/pyicq-t-0.8.1.5.ebuild +++ b/net-im/pyicq-t/pyicq-t-0.8.1.5.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-im/pyicq-t/pyicq-t-0.8.1.5.ebuild,v 1.3 2010/04/23 19:56:48 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-im/pyicq-t/pyicq-t-0.8.1.5.ebuild,v 1.4 2010/07/02 00:09:27 hanno Exp $ -NEED_PYTHON=2.3 +EAPI="3" inherit eutils python @@ -26,6 +26,10 @@ RDEPEND="${DEPEND} webinterface? ( >=dev-python/nevow-0.4.1 ) >=dev-python/imaging-1.1" +src_prepare() { + epatch "${FILESDIR}/${P}-python26-warnings.diff" +} + src_install() { local inspath @@ -50,7 +54,7 @@ src_install() { } pkg_postinst() { - python_mod_optimize $(python_get_sitedir)/${PN} + python_mod_optimize ${PN} elog "A sample configuration file has been installed in /etc/jabber/${PN}.xml." elog "Please edit it and the configuration of your Jabber server to match." @@ -65,5 +69,5 @@ pkg_postinst() { } pkg_postrm() { - python_mod_cleanup $(python_get_sitedir)/${PN} + python_mod_cleanup ${PN} } |