开发者

How to fix a python egg?

开发者 https://www.devze.com 2023-02-05 02:02 出处:网络
I added a jabber support to my python bot by importing the xmppy library. However calling \"import xmpp\" attracts a few warnings:

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,ba开发者_开发问答se64,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?


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 .

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号