PyModerator, DeprecationWarning: the sha module is deprecated; use the hashlib module instead import sha

Chris Rebert clp2 at
Thu Apr 23 03:32:42 CEST 2009

On Wed, Apr 22, 2009 at 6:16 PM, Jim Carlock
<jcarlock at> wrote:
> I downloaded Python 2.6.2 today. Anyone here know what that error in
> the subject really means and possibly what I should look at? I took
> a look at line 13 in the specified file and it states the line that
> it has a problem with.
> import sha

That's not an error/exception, it's a warning. Like it says, the 'sha'
module has been deprecated, which means that it is slated to be
removed in a future version of Python, hence you should phase out its
use. Like the message also says, the new 'hashlib' module is the 'sha'
module's replacement.

See also

I have a blog:

More information about the Python-list mailing list