diff options
author | Brett Cannon <bcannon@gmail.com> | 2007-05-31 19:20:00 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2007-05-31 19:20:00 (GMT) |
commit | c2aa09ad8055ba3e03da297608552d04b42e9aac (patch) | |
tree | d349deae79ade87b4e39098d067e114f50e1bcbb /Lib/uuid.py | |
parent | 03b75fa4e1331d4c9f5ff6385ff54fb522bc4cab (diff) | |
download | cpython-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.py | 4 |
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(). |