1 |
hanno 10/07/02 00:09:27 |
2 |
|
3 |
Added: pyicq-t-0.8.1.5-python26-warnings.diff |
4 |
Log: |
5 |
pyicq-t: patch for python 2.6 deprecatoin warnings |
6 |
(Portage version: 2.1.8.3/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 net-im/pyicq-t/files/pyicq-t-0.8.1.5-python26-warnings.diff |
10 |
|
11 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-im/pyicq-t/files/pyicq-t-0.8.1.5-python26-warnings.diff?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-im/pyicq-t/files/pyicq-t-0.8.1.5-python26-warnings.diff?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: pyicq-t-0.8.1.5-python26-warnings.diff |
15 |
=================================================================== |
16 |
diff -Naur pyicqt-0.8.1.5/src/avatar.py p1//src/avatar.py |
17 |
--- pyicqt-0.8.1.5/src/avatar.py 2010-06-07 12:16:36.000000000 +0200 |
18 |
+++ p1//src/avatar.py 2010-06-07 12:16:16.000000000 +0200 |
19 |
@@ -6,7 +6,7 @@ |
20 |
from twisted.words.xish.domish import Element |
21 |
from debug import LogEvent, INFO, WARN, ERROR |
22 |
import lang |
23 |
-import sha |
24 |
+from hashlib import sha1 |
25 |
import base64 |
26 |
import os |
27 |
import os.path |
28 |
@@ -46,7 +46,7 @@ |
29 |
class Avatar: |
30 |
""" Represents an Avatar. Does not store the image in memory. """ |
31 |
def __init__(self, imageData, avatarCache): |
32 |
- self.__imageHash = sha.sha(imageData).hexdigest() |
33 |
+ self.__imageHash = sha1(imageData).hexdigest() |
34 |
self.__avatarCache = avatarCache |
35 |
|
36 |
def getImageHash(self): |
37 |
diff -Naur pyicqt-0.8.1.5/src/contact.py p1//src/contact.py |
38 |
--- pyicqt-0.8.1.5/src/contact.py 2010-06-07 12:16:43.000000000 +0200 |
39 |
+++ p1//src/contact.py 2010-06-07 12:16:16.000000000 +0200 |
40 |
@@ -8,7 +8,6 @@ |
41 |
import config |
42 |
from debug import LogEvent, INFO, WARN, ERROR |
43 |
import lang |
44 |
-import sha |
45 |
import legacy |
46 |
import globals |
47 |
import base64 |
48 |
diff -Naur pyicqt-0.8.1.5/src/legacy/buddies.py p1//src/legacy/buddies.py |
49 |
--- pyicqt-0.8.1.5/src/legacy/buddies.py 2009-08-24 14:37:59.000000000 +0200 |
50 |
+++ p1//src/legacy/buddies.py 2010-06-07 12:07:37.000000000 +0200 |
51 |
@@ -12,7 +12,7 @@ |
52 |
import os.path |
53 |
import binascii |
54 |
import os.path |
55 |
-import md5 |
56 |
+from hashlib import md5 |
57 |
|
58 |
X = os.path.sep |
59 |
|
60 |
@@ -188,7 +188,7 @@ |
61 |
avatarData = avatar.AvatarCache().setAvatar(imgmanip.convertToPNG(iconData)) |
62 |
c.updateAvatar(avatarData, push=True) |
63 |
if not md5Hash: |
64 |
- m = md5.new() |
65 |
+ m = md5() |
66 |
m.update(iconData) |
67 |
md5Hash = m.digest() |
68 |
if not numHash: |
69 |
diff -Naur pyicqt-0.8.1.5/src/legacy/glue.py p1//src/legacy/glue.py |
70 |
--- pyicqt-0.8.1.5/src/legacy/glue.py 2009-08-24 14:37:59.000000000 +0200 |
71 |
+++ p1//src/legacy/glue.py 2010-06-07 12:07:37.000000000 +0200 |
72 |
@@ -18,7 +18,7 @@ |
73 |
import time |
74 |
import binascii |
75 |
import avatar |
76 |
-import md5 |
77 |
+from hashlib import md5 |
78 |
import random |
79 |
|
80 |
from twisted.python import log |
81 |
@@ -398,7 +398,7 @@ |
82 |
try: |
83 |
self.myavatar = imgmanip.convertToJPG(imageData) |
84 |
self.myavatarlen = len(self.myavatar) |
85 |
- m=md5.new() |
86 |
+ m=md5() |
87 |
m.update(self.myavatar) |
88 |
self.myavatarsum = m.digest() |
89 |
self.myavatarstamp = time.time() |
90 |
diff -Naur pyicqt-0.8.1.5/src/legacy/icqt.py p1//src/legacy/icqt.py |
91 |
--- pyicqt-0.8.1.5/src/legacy/icqt.py 2009-08-24 14:37:59.000000000 +0200 |
92 |
+++ p1//src/legacy/icqt.py 2010-06-07 12:07:37.000000000 +0200 |
93 |
@@ -14,7 +14,6 @@ |
94 |
import time |
95 |
import datetime |
96 |
import binascii |
97 |
-import md5 |
98 |
import locale |
99 |
import struct |
100 |
|
101 |
diff -Naur pyicqt-0.8.1.5/src/tlib/oscar.py p1//src/tlib/oscar.py |
102 |
--- pyicqt-0.8.1.5/src/tlib/oscar.py 2009-08-24 14:37:59.000000000 +0200 |
103 |
+++ p1//src/tlib/oscar.py 2010-06-07 12:07:37.000000000 +0200 |
104 |
@@ -21,7 +21,7 @@ |
105 |
from scheduler import Scheduler |
106 |
|
107 |
import struct |
108 |
-import md5 |
109 |
+from hashlib import md5 |
110 |
import string |
111 |
import socket |
112 |
import random |
113 |
@@ -120,9 +120,9 @@ |
114 |
return dict,data |
115 |
|
116 |
def encryptPasswordMD5(password,key): |
117 |
- m=md5.new() |
118 |
+ m=md5() |
119 |
m.update(key) |
120 |
- m.update(md5.new(password).digest()) |
121 |
+ m.update(md5(password).digest()) |
122 |
m.update("AOL Instant Messenger (SM)") |
123 |
return m.digest() |
124 |
|
125 |
@@ -534,7 +534,7 @@ |
126 |
self.iconSum = tlvs.get(0xd5,"") |
127 |
|
128 |
def updateIcon(self, iconData): |
129 |
- m=md5.new() |
130 |
+ m=md5() |
131 |
m.update(iconData) |
132 |
self.iconSum = m.digest() |
133 |
log.msg("icon sum is %s" % binascii.hexlify(self.iconSum)) |