Deprecation Warning: the md5 module is deprecated; use hashlib instead import md5

900 views
Skip to first unread message

paul

unread,
Oct 12, 2010, 12:06:43 PM10/12/10
to TurboGears
Hi

I am just starting with turbogears on ubuntu 10.04.

When i run a commend . I get this error . how do i fix it ? thanks
tg-admin quickstart
/usr/lib/pymodules/python2.6/cherrypy/lib/cptools.py:3:
DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5

after creating a hello project
and running

python start-hello.py

i get the errors
/usr/lib/pymodules/python2.6/cherrypy/lib/cptools.py:3:
DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
/usr/lib/pymodules/python2.6/cherrypy/filters/sessionfilter.py:33:
DeprecationWarning: the sha module is deprecated; use the hashlib
module instead
import sha

thank you for your time .
Paul

Diez B. Roggisch

unread,
Oct 12, 2010, 12:37:03 PM10/12/10
to turbo...@googlegroups.com
On Tuesday, October 12, 2010 18:06:43 paul wrote:
> Hi
>
> I am just starting with turbogears on ubuntu 10.04.
>
> When i run a commend . I get this error . how do i fix it ? thanks

it's not an error, it is a warning. And you don't need to bother. It stems
from a change in the python standard library, and a package not being adapted
to this. But there is no functional problem with it.

Diez

Christopher Arndt

unread,
Oct 13, 2010, 9:55:34 AM10/13/10
to turbo...@googlegroups.com
Diez B. Roggisch schrieb:

You should be able to suppress the warning by inserting

import warnings
warnings.simplefilter("ignore", DeprecationWarning)

at the top of the commands.py module of your application (untested).

A new 2.x version of CherryPy which will fix this issue is currently in
beta stage. As soon as it's released, a new TurboGears 1 releases will
follow which will use it.

Chris

Reply all
Reply to author
Forward
0 new messages