Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4fec431

Browse files
committed
Issue #18599: Fix name attribute of _sha1.sha1() object. It now returns
'SHA1' instead of 'SHA'.
1 parent 25f043b commit 4fec431

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ Core and Builtins
5757
Library
5858
-------
5959

60+
- Issue #18599: Fix name attribute of _sha1.sha1() object. It now returns
61+
'SHA1' instead of 'SHA'.
62+
6063
- Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL.
6164

6265
- Issue #18559: Fix NULL pointer dereference error in _pickle module

Modules/sha1module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ SHA1_get_block_size(PyObject *self, void *closure)
415415
static PyObject *
416416
SHA1_get_name(PyObject *self, void *closure)
417417
{
418-
return PyUnicode_FromStringAndSize("SHA1", 3);
418+
return PyUnicode_FromStringAndSize("SHA1", 4);
419419
}
420420

421421
static PyObject *

0 commit comments

Comments
 (0)