Following warnings are emitted when test_hmac ran with -Wall:
$ ./python -Wall -m test.regrtest test_hmac
[1/1] test_hmac
/home/serhiy/py/cpython/Lib/test/test_hmac.py:271: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated.
h = hmac.HMAC(b"key")
/home/serhiy/py/cpython/Lib/test/test_hmac.py:296: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated.
h = hmac.HMAC(bytearray(b"key"), bytearray(b"hash this!"))
/home/serhiy/py/cpython/Lib/test/test_hmac.py:303: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated.
h = hmac.HMAC(b"key", memoryview(b"hash this!"))
/home/serhiy/py/cpython/Lib/test/test_hmac.py:290: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated.
h = hmac.HMAC(b"key", b"hash this!")
/home/serhiy/py/cpython/Lib/test/test_hmac.py:320: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated.
h = hmac.HMAC(b"key")
/home/serhiy/py/cpython/Lib/test/test_hmac.py:327: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated.
h = hmac.HMAC(b"my secret key")
/home/serhiy/py/cpython/Lib/test/test_hmac.py:339: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated.
h1 = hmac.HMAC(b"key")
/home/serhiy/py/cpython/Lib/test/test_hmac.py:361: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated.
h1 = hmac.HMAC(b"key")
/home/serhiy/py/cpython/Lib/test/test_hmac.py:350: PendingDeprecationWarning: HMAC() without an explicit digestmod argument is deprecated.
h1 = hmac.HMAC(b"key")
1 test OK.
The proposed patch silences these warnings.
|