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

Skip to content

Commit 93a9328

Browse files
committed
whatsnew: hashlib.hash.name is now public and returns lowercase always.
1 parent 6e1bc7c commit 93a9328

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

Doc/whatsnew/3.4.rst

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,8 +748,15 @@ dictionaries containing the collections statistics since interpreter startup.
748748
hashlib
749749
-------
750750

751-
New :func:`hashlib.pbkdf2_hmac` function.
752-
(Contributed by Christian Heimes in :issue:`18582`)
751+
New :func:`hashlib.pbkdf2_hmac` function. (Contributed by Christian Heimes in
752+
:issue:`18582`)
753+
754+
The :attr:`~hashlib.hash.name` attribute of :mod:`hashlib` hash objects is now
755+
a formally supported interface. It has always existed in CPython's
756+
:mod:`hashlib` (although it did not return lower case names for all supported
757+
hashes), but it was not a public interface and so some other Python
758+
implementations have not previously supported it. (Contributed by Jason R.
759+
Coombs in :issue:`18532`.)
753760

754761

755762
hmac
@@ -1851,6 +1858,10 @@ Changes in the Python API
18511858
package. The ``__path__`` for frozen packages is now set to ``[]``
18521859
(:issue:`18065`).
18531860

1861+
* :attr:`hashlib.hash.name` now always returns the identifier in lower case.
1862+
Previously some builtin hashes had uppercase names, but now that it is a
1863+
formal public interface the naming has been made consistent (:issue:`18532`).
1864+
18541865

18551866
Changes in the C API
18561867
--------------------

0 commit comments

Comments
 (0)