[Python-checkins] cpython: whatsnew: hmac accepts more bytes types, importlib decode_source, stat in C.

r.david.murray python-checkins at python.org
Sun Feb 2 18:53:16 CET 2014


http://hg.python.org/cpython/rev/558b26b6a342
changeset: 88899:558b26b6a342
user: R David Murray <rdmurray at bitdance.com>
date: Sun Feb 02 12:50:48 2014 -0500
summary:
 whatsnew: hmac accepts more bytes types, importlib decode_source, stat in C.
files:
 Doc/whatsnew/3.4.rst | 18 ++++++++++++++++++
 Misc/NEWS | 2 +-
 2 files changed, 19 insertions(+), 1 deletions(-)
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
@@ -732,6 +732,16 @@
 (Contributed by Christian Heimes in :issue:`18582`)
 
 
+hmac
+----
+
+:mod:`hmac` now accepts ``bytearray`` as well as ``bytes`` for the *key*
+argument to the :func:`~hmac.new` function, and the *msg* parameter to both the
+:func:`~hmac.new` function and the :meth:`~hmac.HMAC.update` method now
+accepts any type supported by the :mod:`hashlib` module. (Contributed
+by Jonas Borgström in :issue:`18240`.)
+
+
 html
 ----
 
@@ -794,6 +804,10 @@
 ``python -m`` can now be used with namespace packages. (Contributed
 by Brett Cannon in :issue:`18058`.)
 
+:mod:`importlib.util` has a new function :func:`~importlib.util.decode_source`
+that decodes source from bytes using universal newline processing. This is
+useful for implementing :meth:`.InspectLoader.get_source` methods.
+
 
 inspect
 -------
@@ -1387,6 +1401,10 @@
 
 * ``python -m`` now works with namespace packages.
 
+* The :mod:`stat` module is now implemented in C, which means it gets the
+ values for its constants from the C header files, instead of having the
+ values hard-coded in the python module as was previously the case.
+
 
 
 Significant Optimizations
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -2346,7 +2346,7 @@
 - Issue #18339: Negative ints keys in unpickler.memo dict no longer cause a
 segfault inside the _pickle C extension.
 
-- Issue 18240: The HMAC module is no longer restricted to bytes and accepts
+- Issue #18240: The HMAC module is no longer restricted to bytes and accepts
 any bytes-like object, e.g. memoryview. Original patch by Jonas Borgström.
 
 - Issue #18224: Removed pydoc script from created venv, as it causes problems
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /