diff options
author | Gregory P. Smith <greg@krypto.org> | 2019-10-18 03:30:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-18 03:30:42 (GMT) |
commit | f33c57d5c780da1500619f548585792bb5b750ee (patch) | |
tree | d73bb962abdea1b31e27dc01c070a595a4f74fb5 /Misc | |
parent | d8ca2354ed30c12b9ce37c4535222b700a727b32 (diff) | |
download | cpython-f33c57d5c780da1500619f548585792bb5b750ee.zip cpython-f33c57d5c780da1500619f548585792bb5b750ee.tar.gz cpython-f33c57d5c780da1500619f548585792bb5b750ee.tar.bz2 |
bpo-33604: Raise TypeError on missing hmac arg. (GH-16805)
Also updates the documentation to clarify the situation surrounding
the digestmod parameter that is required despite its position in the
argument list as of 3.8.0 as well as removing old python2 era
references to "binary strings".
We indavertently had this raise ValueError in 3.8.0 for the missing
arg. This is not considered an API change as no reasonable code would
be catching this missing argument error in order to handle it.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2019-10-15-09-47-40.bpo-33604.J12cWT.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2019-10-15-09-47-40.bpo-33604.J12cWT.rst b/Misc/NEWS.d/next/Library/2019-10-15-09-47-40.bpo-33604.J12cWT.rst new file mode 100644 index 0000000..fbd7300 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-10-15-09-47-40.bpo-33604.J12cWT.rst @@ -0,0 +1,3 @@ +Fixed `hmac.new` and `hmac.HMAC` to raise TypeError instead of ValueError +when the digestmod parameter, now required in 3.8, is omitted. Also +clarified the hmac module documentation and docstrings. |