DeprecationWarning on md5

Chris Rebert clp2 at
Thu Nov 19 03:12:45 CET 2009

On Wed, Nov 18, 2009 at 5:23 PM, Zeynel <azeynel1 at> wrote:
> Hello,
> I am a newbie both in Scrapy and Python. When I create a project with
> Scrapy I get these errors:
> C:\Python26\lib\site-packages\twisted\python\
> DeprecationWarning: the sha module is deprecated; use the hashlib
> module instead import sha
> C:\Python26\lib\site-packages\twisted\spread\
> DeprecationWarning: the md5 module is deprecated; use hashlib instead
> import md5
> C:\Python26\lib\site-packages\twisted\mail\
> DeprecationWarning: the MimeWriter module is deprecated; use the email
> package instead
> I found several references to this "bug" but I could not understand
> how to fix it. Can anyone help?

This is a "bug" in the version of Twisted you're using. What Python is
saying is that Twisted is using some modules from the Python stdlib
that are deprecated and will be removed in some future version of
Python, thus Twisted will /eventually/ need to be changed to use the
newer replacement library.
However, this is only a warning, not an error; the code will run just
fine until you update to the eventual Python version that removed said
deprecated libraries (by which time a new Twisted version will
probably be available with the necessary fixes made).

So, basically you can safely ignore the warnings, unless you want to
custom-patch your Twisted installation, which I wouldn't particularly
It's also entirely possible your Twisted is outdated and a new version
fixed to avoid using the deprecated modules is already available.

If you want to suppress the output of the warnings, see the docs for
the `warnings` module:


More information about the Python-list mailing list