Mercurial > cpython-lru_cache-weakref
changeset 64772:1debff42ea46
Add entries to whatsnew
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Wed, 15 Sep 2010 15:09:40 +0000 |
| parents | ad63f966923c |
| children | f2ec0115f8b2 |
| files | Doc/whatsnew/3.2.rst |
| diffstat | 1 files changed, 25 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Doc/whatsnew/3.2.rst Wed Sep 15 13:06:09 2010 +0000 +++ b/Doc/whatsnew/3.2.rst Wed Sep 15 15:09:40 2010 +0000 @@ -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 ====
