commit | c2aa09ad8055ba3e03da297608552d04b42e9aac | [log] [tgz] |
---|---|---|
author | Brett Cannon <bcannon@gmail.com> | Thu May 31 19:20:00 2007 +0000 |
committer | Brett Cannon <bcannon@gmail.com> | Thu May 31 19:20:00 2007 +0000 |
tree | d349deae79ade87b4e39098d067e114f50e1bcbb | |
parent | 03b75fa4e1331d4c9f5ff6385ff54fb522bc4cab [diff] [blame] |
Have the sha module raise a DeprecationWarning as specified in PEP 4.
diff --git a/Lib/sha.py b/Lib/sha.py index 9d914a9..7e6d7af 100644 --- a/Lib/sha.py +++ b/Lib/sha.py
@@ -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