Have md5 raise a DeprecationWarning as per PEP 4.

This commit is contained in:
Brett Cannon 2007-05-30 22:24:28 +00:00
parent c249bdab92
commit 7eec217908
6 changed files with 17 additions and 4 deletions

View file

@ -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 md5 module is deprecated; use hashlib instead",
DeprecationWarning, 2)
from hashlib import md5
new = md5