My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 149: md5 and sha module will be deprecated in python 2.6
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by m.surkiz, Dec 22, 2008
/etc/init.d/pyicqt start
Starting PyICQ-t transport: 

/usr/share/pyicqt/src/avatar.py:9: DeprecationWarning: the sha module is 
deprecated; use the hashlib module instead
  import sha
/usr/share/pyicqt/src/tlib/oscar.py:23: DeprecationWarning: the md5 module 
is deprecated; use hashlib instead
  import md5

I propose to patch:

-import md5, sha
+try:
+    from hashlib import md5, sha1 as sha
+except ImportError:
+    from md5 import md5
+    from sha import sha

and:

- var=md5.new()
+ var=md5()

etc...
Dec 22, 2008
#1 m.surkiz
Affected files:

pyicqt> find ./src -name '*.py' |xargs grep 'import md5'
./src/tlib/oscar.py:import md5
./src/legacy/buddies.py:import md5
./src/legacy/glue.py:import md5
./src/legacy/icqt.py:import md5

pyicqt> find ./src -name '*.py' |xargs grep 'import sha'
./src/avatar.py:import sha
./src/contact.py:import sha
./src/twistfix/words/xish/xmlstream.py:    import sha

Dec 22, 2008
Project Member #2 r000ns...@gmail.com
I think prepare to Py3k still don't need. Currently only first set of a fixes for 2.6
branch available. It too raw yet
Dec 22, 2008
Project Member #3 r000ns...@gmail.com
And yeah, Twisted shall rewritten to 2.6 first
Dec 22, 2008
#4 m.surkiz
Yes, but openSUSE 11.1 include python 2.6 by default and not have old version of 
package 

:-(
Dec 22, 2008
Project Member #5 r000ns...@gmail.com
May be possible install 2.5.2 from 11.0?
Dec 22, 2008
#6 maxim.br...@gmail.com
Deprecated not obsoleted. Deprecated should work.
I tested python 2.6.1 + pyicq 0.8.1beta3 + twisted 8.1.0 + zope.interface 3.5.0 on
windows xp and it worked for me.
I had to update only zope.interface in my environment.
I believe pyicq should work on python 2.6.x without any regressions.
Dec 23, 2008
#7 m.surkiz
> May be possible install 2.5.2 from 11.0?

I tried it, unfortunately did not succeed, because many packages in openSUSE_11.1 
depend on python >= 2.6 :(


> I had to update only zope.interface in my environment.

I do not understand what the link between the deprecated modules in python and 
zope.interface? 
r000nster, how do you think?
Dec 23, 2008
Project Member #8 r000ns...@gmail.com
[After some investigation]

Zope-interface used in Twisted. 

Maxim done testing of transport with Python 2.6.1 and his installation worked a one
day without any problems.

hashlib module was added in 2.5.
md5 and sha modules were deprecated since 2.5, and in 2.6 were added
DeprecationWarnings for them. These modules really removed only in 3.0. 

Therefore even removing of stable Python from SUSE distribution don't shall be a
problem for running of transport. Just ignore these warnings
Labels: -Type-Defect Type-Enhancement
Jun 7, 2010
#9 hanno@hboeck.de
Patch to fix deprecation warnings. I have not made it compatible with python 2.4, but
I think that should be fine.
pyicq-t-0.8.1.5-python26-warnings.diff
3.4 KB   View   Download

Powered by Google Project Hosting