md5 strange error

Mel mwilson at the-wire.com
Mon Dec 14 15:04:59 EST 2009


Rami Chowdhury wrote:
> On Mon, Dec 14, 2009 at 09:33, catalinfest at gmail.com
> <catalinfest at gmail.com> wrote:
>> now i have Fedora 12
>> Now when i try to use md5 , python say :
>> python
>> Python 2.6.2 (r262:71600, Aug 21 2009, 12:22:21)
>> [GCC 4.4.1 20090818 (Red Hat 4.4.1-6)] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>>>>> import md5
>> __main__:1: DeprecationWarning: the md5 module is deprecated; use
>> hashlib instead
>>>>> import md5

>> Why ?

> As the message says: the md5 module is deprecated, and you should use
> the hashlib module instead. I believe md5 is deprecated from Python
> 2.6 onwards, which may be why you have not seen this message before
> (Fedora 12 is the first Fedora to ship with Python 2.6).

When this gets in the way (package builds, etc.,) you can get rid of it by 
invoking Python with a command line argument:

python -Wignore::DeprecationWarning


	Mel.





More information about the Python-list mailing list