mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Have the sha module raise a DeprecationWarning as specified in PEP 4.
This commit is contained in:
parent
03b75fa4e1
commit
c2aa09ad80
6 changed files with 19 additions and 7 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue