[Python-checkins] r84838 - python/branches/py3k/Doc/whatsnew/3.2.rst

antoine.pitrou python-checkins at python.org
Wed Sep 15 17:09:40 CEST 2010


Author: antoine.pitrou
Date: Wed Sep 15 17:09:40 2010
New Revision: 84838

Log:
Add entries to whatsnew



Modified:
   python/branches/py3k/Doc/whatsnew/3.2.rst

Modified: python/branches/py3k/Doc/whatsnew/3.2.rst
==============================================================================
--- python/branches/py3k/Doc/whatsnew/3.2.rst	(original)
+++ python/branches/py3k/Doc/whatsnew/3.2.rst	Wed Sep 15 17:09:40 2010
@@ -211,6 +211,12 @@
 
   (Proposed and implemented by Mark Dickinson; :issue:`9337`.)
 
+* :class:`memoryview` objects now have a :meth:`release()` method and support
+  the context manager protocol.  This allows timely release of any resources
+  that were acquired when requesting a buffer from the original object.
+
+  (Added by Antoine Pitrou; :issue:`9757`.)
+
 * The :func:`functools.wraps` decorator now adds a :attr:`__wrapped__` attribute
   pointing to the original callable function.  This allows wrapped functions to
   be introspected.  It also copies :attr:`__annotations__` if defined.  And now
@@ -397,6 +403,14 @@
   5-tuple), and :data:`ssl.OPENSSL_VERSION_NUMBER` (an integer).  (Added by
   Antoine Pitrou; :issue:`8321`.)
 
+* Instances of :class:`unittest.TestCase` have two new methods
+  :meth:`~unittest.TestCase.assertWarns` and :meth:`~unittest.TestCase.assertWarnsRegexp`
+  to check that a given warning type was triggered by the code under test::
+
+      with self.assertWarns(DeprecationWarning):
+          legacy_function('XYZ')
+
+
 * The previously deprecated :func:`string.maketrans` function has been removed
   in favor of the static methods, :meth:`bytes.maketrans` and
   :meth:`bytearray.maketrans`.  This change solves the confusion around which
@@ -464,7 +478,7 @@
 
   (Contributed by Antoine Pitrou; :issue:`7451`.)
 
-- Python's peephole optimizer now recognizes patterns such ``x in {1, 2, 3}`` as
+* Python's peephole optimizer now recognizes patterns such ``x in {1, 2, 3}`` as
   being a test for membership in a set of constants.  The optimizer recasts the
   :class:`set` as a :class:`frozenset` and stores the pre-built constant.
 
@@ -486,6 +500,14 @@
 
   (Patch by Florent Xicluna in :issue:`7622` and :issue:`7462`.)
 
+* Serializing and unserializing data using the :mod:`pickle` module is now
+  up to 4x faster, thanks to various optimizations initially contributed
+  to the Unladen Swalled project.
+
+  (Ported to Python 3 by Alexandre Vassalotti and Antoine Pitrou in
+  :issue:`9410`)
+
+
 Filenames and Unicode
 =====================
 
@@ -498,6 +520,8 @@
 The :mod:`os` module has two new functions: :func:`~os.fsencode` and
 :func:`~os.fsdecode`.
 
+.. XXX mention Victor's improvements for support of undecodable filenames.
+
 
 .. IDLE
    ====


More information about the Python-checkins mailing list