summaryrefslogtreecommitdiffstats
path: root/Lib/uuid.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2007-05-31 19:20:00 (GMT)
committerBrett Cannon <bcannon@gmail.com>2007-05-31 19:20:00 (GMT)
commitc2aa09ad8055ba3e03da297608552d04b42e9aac (patch)
treed349deae79ade87b4e39098d067e114f50e1bcbb /Lib/uuid.py
parent03b75fa4e1331d4c9f5ff6385ff54fb522bc4cab (diff)
downloadcpython-c2aa09ad8055ba3e03da297608552d04b42e9aac.zip
cpython-c2aa09ad8055ba3e03da297608552d04b42e9aac.tar.gz
cpython-c2aa09ad8055ba3e03da297608552d04b42e9aac.tar.bz2
Have the sha module raise a DeprecationWarning as specified in PEP 4.
Diffstat (limited to 'Lib/uuid.py')
-rw-r--r--Lib/uuid.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/uuid.py b/Lib/uuid.py
index eb12d78..e21b070 100644
--- a/Lib/uuid.py
+++ b/Lib/uuid.py
@@ -529,8 +529,8 @@ def uuid4():
def uuid5(namespace, name):
"""Generate a UUID from the SHA-1 hash of a namespace UUID and a name."""
- import sha
- hash = sha.sha(namespace.bytes + name).digest()
+ from hashlib import sha1
+ hash = sha1(namespace.bytes + name).digest()
return UUID(bytes=hash[:16], version=5)
# The following standard UUIDs are for use with uuid3() or uuid5().