diff options
author | Brett Cannon <bcannon@gmail.com> | 2007-05-31 19:20:00 +0000 |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2007-05-31 19:20:00 +0000 |
commit | c2aa09ad8055ba3e03da297608552d04b42e9aac (patch) | |
tree | d349deae79ade87b4e39098d067e114f50e1bcbb /Lib/sha.py | |
parent | 03b75fa4e1331d4c9f5ff6385ff54fb522bc4cab (diff) | |
download | cpython-git-c2aa09ad8055ba3e03da297608552d04b42e9aac.tar.gz |
Have the sha module raise a DeprecationWarning as specified in PEP 4.
Diffstat (limited to 'Lib/sha.py')
-rw-r--r-- | Lib/sha.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/sha.py b/Lib/sha.py index 9d914a9b53..7e6d7afcb8 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 |