From: Christian Heimes Date: Tue, 30 Jul 2013 13:32:57 +0000 (+0200) Subject: Issue #18599: Fix name attribute of _sha1.sha1() object. It now returns X-Git-Tag: v3.4.0a1~44^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4fec4314cf24d78a498c85e4dc039df5ef7fcc54;p=thirdparty%2FPython%2Fcpython.git Issue #18599: Fix name attribute of _sha1.sha1() object. It now returns 'SHA1' instead of 'SHA'. --- diff --git a/Misc/NEWS b/Misc/NEWS index 281ab3ed5f55..82b1081fda73 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -57,6 +57,9 @@ Core and Builtins Library ------- +- Issue #18599: Fix name attribute of _sha1.sha1() object. It now returns + 'SHA1' instead of 'SHA'. + - Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL. - Issue #18559: Fix NULL pointer dereference error in _pickle module diff --git a/Modules/sha1module.c b/Modules/sha1module.c index f824bb3b5abf..d0f318d3fd28 100644 --- a/Modules/sha1module.c +++ b/Modules/sha1module.c @@ -415,7 +415,7 @@ SHA1_get_block_size(PyObject *self, void *closure) static PyObject * SHA1_get_name(PyObject *self, void *closure) { - return PyUnicode_FromStringAndSize("SHA1", 3); + return PyUnicode_FromStringAndSize("SHA1", 4); } static PyObject *