summaryrefslogtreecommitdiff
path: root/Lib/uuid.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2007-05-30 22:24:28 +0000
committerBrett Cannon <bcannon@gmail.com>2007-05-30 22:24:28 +0000
commit7eec2179081c86e1a79c5f17b43346e14fc8fb53 (patch)
treedb14dd573c2ec2801d4a622440f7d47235bec19f /Lib/uuid.py
parentc249bdab92cc6fd933fb4972356a3fb0a0865ec4 (diff)
downloadcpython-git-7eec2179081c86e1a79c5f17b43346e14fc8fb53.tar.gz
Have md5 raise a DeprecationWarning as per 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 ae3da25ca5..eb12d7810a 100644
--- a/Lib/uuid.py
+++ b/Lib/uuid.py
@@ -506,8 +506,8 @@ def uuid1(node=None, clock_seq=None):
def uuid3(namespace, name):
"""Generate a UUID from the MD5 hash of a namespace UUID and a name."""
- import md5
- hash = md5.md5(namespace.bytes + name).digest()
+ from hashlib import md5
+ hash = md5(namespace.bytes + name).digest()
return UUID(bytes=hash[:16], version=3)
def uuid4():