bpo-33604: Bump removal notice from 3.6 to 3.8 and change PendingDeprecationWarning to DeprecationWarning as we had intended to do earlier...
Parameter *msg* can be of any type supported by :mod:`hashlib`.
Parameter *digestmod* can be the name of a hash algorithm.
- .. deprecated:: 3.4
+ .. deprecated-removed:: 3.4 3.8
MD5 as implicit default digest for *digestmod* is deprecated.
A hashlib constructor returning a new hash object. *OR*
A hash name suitable for hashlib.new().
Defaults to hashlib.md5.
- Implicit default to hashlib.md5 is deprecated and will be
- removed in Python 3.6.
+ Implicit default to hashlib.md5 is deprecated since Python
+ 3.4 and will be removed in Python 3.8.
Note: key and msg must be a bytes or bytearray objects.
"""
if digestmod is None:
_warnings.warn("HMAC() without an explicit digestmod argument "
- "is deprecated.", PendingDeprecationWarning, 2)
+ "is deprecated since Python 3.4, and will be removed "
+ "in 3.8",
+ DeprecationWarning, 2)
digestmod = _hashlib.md5
if callable(digestmod):
def wrapper(*args, **kwargs):
with warnings.catch_warnings():
warnings.filterwarnings("ignore",
- category=PendingDeprecationWarning)
+ category=DeprecationWarning)
return func(*args, **kwargs)
return wrapper
self.fail('Expected warning about small block_size')
def test_with_digestmod_warning(self):
- with self.assertWarns(PendingDeprecationWarning):
+ with self.assertWarns(DeprecationWarning):
key = b"\x0b" * 16
data = b"Hi There"
digest = "9294727A3638BB1C13F48EF8158BFC9D"
--- /dev/null
+Update HMAC md5 default to a DeprecationWarning, bump removal to 3.8.