summaryrefslogtreecommitdiffstats
path: root/Modules/clinic
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-07-31 06:50:16 (GMT)
committerGitHub <noreply@github.com>2018-07-31 06:50:16 (GMT)
commitf1d36d8efaecd5c84cb35e35119b283f37d83c40 (patch)
tree055434182e3f7859d01386eac0766fc7a1d69193 /Modules/clinic
parent4b8a7f51da224d1a0ad8159935f78ba4e6e16037 (diff)
downloadcpython-f1d36d8efaecd5c84cb35e35119b283f37d83c40.zip
cpython-f1d36d8efaecd5c84cb35e35119b283f37d83c40.tar.gz
cpython-f1d36d8efaecd5c84cb35e35119b283f37d83c40.tar.bz2
bpo-33729: Fix issues with arguments parsing in hashlib. (GH-8346)
* help(hashlib) didn't work because of incorrect module name in blake2b and blake2s classes. * Constructors blake2*(), sha3_*(), shake_*() and keccak_*() incorrectly accepted keyword argument "string" for binary data, but documented as accepting the "data" keyword argument. Now this parameter is positional-only. * Keyword-only parameters in blake2b() and blake2s() were not documented as keyword-only. * Default value for some parameters of blake2b() and blake2s() was None, which is not acceptable value. * The length argument for shake_*.digest() was wrapped out to 32 bits. * The argument for shake_128.digest() and shake_128.hexdigest() was not positional-only as intended. * TypeError messages for incorrect arguments in all constructors sha3_*(), shake_*() and keccak_*() incorrectly referred to sha3_224. Also made the following enhancements: * More accurately specified input and result types for strings, bytes and bytes-like objects. * Unified positional parameter names for update() and constructors. * Improved formatting.
Diffstat (limited to 'Modules/clinic')
-rw-r--r--Modules/clinic/_hashopenssl.c.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/clinic/_hashopenssl.c.h b/Modules/clinic/_hashopenssl.c.h
index cbc8638..070f829 100644
--- a/Modules/clinic/_hashopenssl.c.h
+++ b/Modules/clinic/_hashopenssl.c.h
@@ -58,7 +58,7 @@ PyDoc_STRVAR(_hashlib_hmac_digest__doc__,
"hmac_digest($module, /, key, msg, digest)\n"
"--\n"
"\n"
-"Single-shot HMAC");
+"Single-shot HMAC.");
#define _HASHLIB_HMAC_DIGEST_METHODDEF \
{"hmac_digest", (PyCFunction)_hashlib_hmac_digest, METH_FASTCALL|METH_KEYWORDS, _hashlib_hmac_digest__doc__},
@@ -99,4 +99,4 @@ exit:
#ifndef _HASHLIB_SCRYPT_METHODDEF
#define _HASHLIB_SCRYPT_METHODDEF
#endif /* !defined(_HASHLIB_SCRYPT_METHODDEF) */
-/*[clinic end generated code: output=b5b90821caf05391 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=b129f1a6ec7b8503 input=a9049054013a1b77]*/