Take the 2-minute tour ×

I added a jabber support to my python bot by importing the xmppy library. However calling "import xmpp" attracts a few warnings:

/usr/lib/python2.6/site-packages/xmpp/auth.py:24: DeprecationWarning: the sha module is deprecated; use the hashlib module instead import sha,base64,random,dispatcher,re /usr/lib/python2.6/site-packages/xmpp/auth.py:26: DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5 it will be nice to fix this...

I thought I would fix this by unzipping the egg, fixing the module imports and rezipping it. After my operating however python does not recognize the library. I am getting *module not found* error. What is the **real** way of fixing an egg?

share|improve this question
Note that the deprecation warnings are disabled by default in more recent python versions, as they do not serve any useful purpose to a user. (OTOH, a developer should know about and fix them). See docs.python.org/dev/whatsnew/2.7.html. –  Macke Jan 18 '11 at 12:13

1 Answer 1

up vote 2 down vote accepted

First of all the message that you saw above are just some warning, DeprecationWarning to be exact that mean that some of the module that xmpp library use are deprecate (old module that will be remove in new version of python so they should be replaced by the new ones), and you shouldn't try to fix it, it's not your code :) .

So i will suggest to reinstall your xmpp library , if there is a new version maybe it will be up to date so the warning will not be there , if not just work with it , you don't have much choice, unless you use another library .

EDIT: The Deprecate warning have a meaning , you shouldn't disable them but if you must look here.

Hope it help .

share|improve this answer
is there a way of stopping the warnings to be printed to stderr? –  user568396 Jan 18 '11 at 11:34
@Tommy: look here stackoverflow.com/questions/879173/… ; Hope it help too –  mouad Jan 18 '11 at 11:42

Your Answer

