pyaim-t-0.8.0.1-python26-warnings.patch 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. diff -Naur pyaimt-0.8.0.1/src/avatar.py pyaimt-0.8.0.1-py26//src/avatar.py
  2. --- pyaimt-0.8.0.1/src/avatar.py 2009-08-24 15:04:03.000000000 +0200
  3. +++ pyaimt-0.8.0.1-py26//src/avatar.py 2011-08-24 20:30:06.146311346 +0200
  4. @@ -6,7 +6,7 @@
  5. from twisted.words.xish.domish import Element
  6. from debug import LogEvent, INFO, WARN, ERROR
  7. import lang
  8. -import sha
  9. +from hashlib import sha1
  10. import base64
  11. import os
  12. import os.path
  13. @@ -46,7 +46,7 @@
  14. class Avatar:
  15. """ Represents an Avatar. Does not store the image in memory. """
  16. def __init__(self, imageData, avatarCache):
  17. - self.__imageHash = sha.sha(imageData).hexdigest()
  18. + self.__imageHash = sha1(imageData).hexdigest()
  19. self.__avatarCache = avatarCache
  20. def getImageHash(self):
  21. diff -Naur pyaimt-0.8.0.1/src/contact.py pyaimt-0.8.0.1-py26//src/contact.py
  22. --- pyaimt-0.8.0.1/src/contact.py 2009-08-24 15:04:03.000000000 +0200
  23. +++ pyaimt-0.8.0.1-py26//src/contact.py 2011-08-24 20:30:06.146311346 +0200
  24. @@ -8,7 +8,6 @@
  25. import config
  26. from debug import LogEvent, INFO, WARN, ERROR
  27. import lang
  28. -import sha
  29. import legacy
  30. import globals
  31. import base64
  32. diff -Naur pyaimt-0.8.0.1/src/legacy/aimt.py pyaimt-0.8.0.1-py26//src/legacy/aimt.py
  33. --- pyaimt-0.8.0.1/src/legacy/aimt.py 2009-08-24 15:04:03.000000000 +0200
  34. +++ pyaimt-0.8.0.1-py26//src/legacy/aimt.py 2011-08-24 20:32:28.187361518 +0200
  35. @@ -11,7 +11,6 @@
  36. import re
  37. import time
  38. import binascii
  39. -import md5
  40. import imgmanip
  41. diff -Naur pyaimt-0.8.0.1/src/legacy/buddies.py pyaimt-0.8.0.1-py26//src/legacy/buddies.py
  42. --- pyaimt-0.8.0.1/src/legacy/buddies.py 2009-08-24 15:04:03.000000000 +0200
  43. +++ pyaimt-0.8.0.1-py26//src/legacy/buddies.py 2011-08-24 20:30:06.147311326 +0200
  44. @@ -12,7 +12,7 @@
  45. import os.path
  46. import binascii
  47. import os.path
  48. -import md5
  49. +from hashlib import md5
  50. X = os.path.sep
  51. @@ -138,7 +138,7 @@
  52. avatarData = avatar.AvatarCache().setAvatar(imgmanip.convertToPNG(iconData))
  53. c.updateAvatar(avatarData, push=True)
  54. if not md5Hash:
  55. - m = md5.new()
  56. + m = md5()
  57. m.update(iconData)
  58. md5Hash = m.digest()
  59. if not numHash:
  60. diff -Naur pyaimt-0.8.0.1/src/legacy/glue.py pyaimt-0.8.0.1-py26//src/legacy/glue.py
  61. --- pyaimt-0.8.0.1/src/legacy/glue.py 2009-08-24 15:04:03.000000000 +0200
  62. +++ pyaimt-0.8.0.1-py26//src/legacy/glue.py 2011-08-24 20:31:20.066825898 +0200
  63. @@ -19,7 +19,7 @@
  64. import time
  65. import binascii
  66. import avatar
  67. -import md5
  68. +from hashlib import md5
  69. # The name of the transport
  70. name = "AIM Transport"
  71. @@ -450,7 +450,7 @@
  72. try:
  73. self.myavatar = imgmanip.convertToJPG(imageData)
  74. self.myavatarlen = len(self.myavatar)
  75. - m=md5.new()
  76. + m=md5()
  77. m.update(self.myavatar)
  78. self.myavatarsum = m.digest()
  79. self.myavatarstamp = time.time()
  80. diff -Naur pyaimt-0.8.0.1/src/tlib/oscar.py pyaimt-0.8.0.1-py26//src/tlib/oscar.py
  81. --- pyaimt-0.8.0.1/src/tlib/oscar.py 2009-08-24 15:04:03.000000000 +0200
  82. +++ pyaimt-0.8.0.1-py26//src/tlib/oscar.py 2011-08-24 20:30:22.415200813 +0200
  83. @@ -20,7 +20,7 @@
  84. from scheduler import Scheduler
  85. import struct
  86. -import md5
  87. +from hashlib import md5
  88. import string
  89. import socket
  90. import random
  91. @@ -106,9 +106,9 @@
  92. return dict,data
  93. def encryptPasswordMD5(password,key):
  94. - m=md5.new()
  95. + m=md5()
  96. m.update(key)
  97. - m.update(md5.new(password).digest())
  98. + m.update(md5(password).digest())
  99. m.update("AOL Instant Messenger (SM)")
  100. return m.digest()
  101. @@ -534,7 +534,7 @@
  102. self.iconSum = tlvs.get(0xd5,"")
  103. def updateIcon(self, iconData):
  104. - m=md5.new()
  105. + m=md5()
  106. m.update(iconData)
  107. self.iconSum = m.digest()
  108. log.msg("icon sum is %s" % binascii.hexlify(self.iconSum))