[Python-checkins] cpython: whatsnew: hmac *digestmod* accepts strings, and default is deprecated. (#17276)
r.david.murray
python-checkins at python.org
Sun Mar 9 20:17:44 CET 2014
http://hg.python.org/cpython/rev/c10ec51a2ce4
changeset: 89527:c10ec51a2ce4
parent: 89525:3ae2cd85a908
user: R David Murray <rdmurray at bitdance.com>
date: Sat Mar 08 22:43:12 2014 -0500
summary:
whatsnew: hmac *digestmod* accepts strings, and default is deprecated. (#17276)
files:
Doc/library/hmac.rst | 5 ++---
Doc/whatsnew/3.4.rst | 15 ++++++++++++++-
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/Doc/library/hmac.rst b/Doc/library/hmac.rst
--- a/Doc/library/hmac.rst
+++ b/Doc/library/hmac.rst
@@ -23,9 +23,8 @@
defaults to the :data:`hashlib.md5` constructor.
.. versionchanged:: 3.4
- Parameter *key* can be a bytes or bytearray object. Parameter *msg* can
- be of any type supported by :mod:`hashlib`.
-
+ Parameter *key* can be a bytes or bytearray object.
+ Parameter *msg* can be of any type supported by :mod:`hashlib`.
Paramter *digestmod* can be the name of a hash algorithm.
.. deprecated:: 3.4
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -826,6 +826,12 @@
accepts any type supported by the :mod:`hashlib` module. (Contributed
by Jonas Borgström in :issue:`18240`.)
+The *digestmod* argument to the :func:`hmac.new` function may now be any hash
+digest name recognized by :mod:`hashlib`. In addition, the current behavior in
+which the value of *digestmod* defaults to ``MD5`` is deprecated: in a
+future version of Python there will be no default value. (Contributed by
+Christian Heimes in :issue:`17276`.)
+
html
----
@@ -1849,6 +1855,9 @@
* The *strict* argument of :class:`~html.parser.HTMLParser` is deprecated.
+* The :func:`hmac.new` *digestmod* keyword having a default value (currently
+ ``MD5``) is deprecated.
+
Deprecated Functions and Types in the C API
-------------------------------------------
@@ -2139,7 +2148,11 @@
currently defaults to ``False`` for backward compatibility, but will
eventually be changed to default to ``True``. It is recommended that you add
this keyword, with the appropriate value, to any
- :class:`~html.parser.HTMLParser` calls in your code.
+ :class:`~html.parser.HTMLParser` calls in your code (:issue:`13633`).
+
+* Since the *digestmod* argument to the :func:`hmac.new` function will in the
+ future have no default, all calls to :func:`hmac.new` should be changed to
+ explicitly specify a *digestmod*. (:issue:`17276`).
Changes in the C API
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list