Have the sha module raise a DeprecationWarning as specified in PEP 4.

This commit is contained in:
Brett Cannon 2007-05-31 19:20:00 +00:00
parent 03b75fa4e1
commit c2aa09ad80
6 changed files with 19 additions and 7 deletions

View file

@ -3,6 +3,10 @@
# Copyright (C) 2005 Gregory P. Smith (greg@electricrain.com)
# Licensed to PSF under a Contributor Agreement.
import warnings
warnings.warn("the sha module is deprecated; use the hashlib module instead",
DeprecationWarning, 2)
from hashlib import sha1 as sha
new = sha