[Python-checkins] r77936 - python/trunk/Doc/whatsnew/2.7.rst

andrew.kuchling python-checkins at python.org
Wed Feb 3 03:19:14 CET 2010


Author: andrew.kuchling
Date: Wed Feb  3 03:19:14 2010
New Revision: 77936

Log:
Add various items

Modified:
   python/trunk/Doc/whatsnew/2.7.rst

Modified: python/trunk/Doc/whatsnew/2.7.rst
==============================================================================
--- python/trunk/Doc/whatsnew/2.7.rst	(original)
+++ python/trunk/Doc/whatsnew/2.7.rst	Wed Feb  3 03:19:14 2010
@@ -53,6 +53,11 @@
 release of 2.7 is currently scheduled for June 2010; the detailed
 schedule is described in :pep:`373`.
 
+Python 2.7 is planned to be the last major release in the 2.x series.
+Though more major releases have not been absolutely ruled out, it's
+likely that the 2.7 release will have an extended period of
+maintenance compared to earlier 2.x versions.
+
 .. Compare with previous release in 2 - 3 sentences here.
    add hyperlink when the documentation becomes available online.
 
@@ -458,10 +463,12 @@
   conversion function that supports arbitrary bases.
   (Patch by Gawain Bolton; :issue:`6713`.)
 
-* The :meth:`rindex`, :meth:`rpartition`, and :meth:`rsplit` methods
-  of string objects now uses a fast reverse-search algorithm instead of
-  a character-by-character scan.  This is often faster by a factor of 10.
-  (Added by Florent Xicluna; :issue:`7462`.)
+* The :meth:`split`, :meth:`replace`, :meth:`rindex`,
+  :meth:`rpartition`, and :meth:`rsplit` methods of string-like types
+  (strings, Unicode strings, and :class:`bytearray` objects) now use a
+  fast reverse-search algorithm instead of a character-by-character
+  scan.  This is sometimes faster by a factor of 10.  (Added by
+  Florent Xicluna; :issue:`7462` and :issue:`7622`.)
 
 * The :mod:`pickle` and :mod:`cPickle` modules now automatically
   intern the strings used for attribute names, reducing memory usage
@@ -648,6 +655,10 @@
   recorded in a gzipped file by providing an optional timestamp to
   the constructor.  (Contributed by Jacques Frechet; :issue:`4272`.)
 
+  Files in gzip format can be padded with trailing zero bytes; the
+  :mod:`gzip` module will now consume these trailing bytes.  (Fixed by
+  Tadek Pietraszek and Brian Curtin; :issue:`2846`.)
+
 * The default :class:`HTTPResponse` class used by the :mod:`httplib` module now
   supports buffering, resulting in much faster reading of HTTP responses.
   (Contributed by Kristjan Valur Jonsson; :issue:`4879`.)
@@ -667,7 +678,9 @@
 
   The :class:`io.FileIO` class now raises an :exc:`OSError` when passed
   an invalid file descriptor.  (Implemented by Benjamin Peterson;
-  :issue:`4991`.)
+  :issue:`4991`.)  The :meth:`truncate` method now preserves the
+  file position; previously it would change the file position to the
+  end of the new file.  (Fixed by Pascal Chambon; :issue:`6939`.)
 
 * New function: ``itertools.compress(data, selectors)`` takes two
   iterators.  Elements of *data* are returned if the corresponding
@@ -723,6 +736,14 @@
   passed to the callable.
   (Contributed by lekma; :issue:`5585`.)
 
+  The :class:`Pool` class, which controls a pool of worker processes,
+  now has an optional *maxtasksperchild* parameter.  Worker processes
+  will perform the specified number of tasks and then exit, causing the
+  :class:`Pool` to start a new worker.  This is useful if tasks may leak
+  memory or other resources, or if some tasks will cause the worker to
+  become very large.
+  (Contributed by Charles Cazabon; :issue:`6963`.)
+
 * The :mod:`nntplib` module now supports IPv6 addresses.
   (Contributed by Derek Morr; :issue:`1664`.)
 
@@ -735,6 +756,10 @@
   contributed by Travis H.; :issue:`6508`.  Support for initgroups added
   by Jean-Paul Calderone; :issue:`7333`.)
 
+  The :func:`normpath` function now preserves Unicode; if its input path
+  is a Unicode string, the return value is also a Unicode string.
+  (Fixed by Matt Giuca; :issue:`5827`.)
+
 * The :mod:`pydoc` module now has help for the various symbols that Python
   uses.  You can now do ``help('<<')`` or ``help('@')``, for example.
   (Contributed by David Laban; :issue:`4739`.)
@@ -800,8 +825,15 @@
   (Contributed by Jeremy Hylton.)
 
 * The ``sys.version_info`` value is now a named tuple, with attributes
-  named ``major``, ``minor``, ``micro``, ``releaselevel``, and ``serial``.
-  (Contributed by Ross Light; :issue:`4285`.)
+  named :attr:`major`, :attr:`minor`, :attr:`micro`,
+  :attr:`releaselevel`, and :attr:`serial`.  (Contributed by Ross
+  Light; :issue:`4285`.)
+
+  :func:`sys.getwindowsversion` also returns a named tuple,
+  with attributes named :attr:`service_pack_major`,
+  :attr:`service_pack_minor`,
+  :attr:`suite_mask`, and :attr:`product_type`.  (Contributed by
+  Brian Curtin; :issue:`7766`.)
 
 * The :mod:`tarfile` module's default error handling has changed, to
   no longer suppress fatal errors.  The default error level was previously 0,
@@ -828,14 +860,20 @@
   a timeout was provided and the operation timed out.
   (Contributed by Tim Lesher; :issue:`1674032`.)
 
+* The :class:`UserDict` class is now a new-style class.  (Changed by
+  Benjamin Peterson.)
+
 * The :mod:`zipfile` module's :class:`ZipFile` now supports the context
   management protocol, so you can write ``with zipfile.ZipFile(...) as f: ...``.
   (Contributed by Brian Curtin; :issue:`5511`.)
 
   :mod:`zipfile` now supports archiving empty directories and
   extracts them correctly.  (Fixed by Kuba Wieczorek; :issue:`4710`.)
+  Reading files out of an archive is now faster, and interleaving
+  :meth:`read` and :meth:`readline` now works correctly.
+  (Contributed by Nir Aides; :issue:`7610`.)
 
-  The :func:`is_zipfile` function in the :mod:`zipfile` module now
+  The :func:`is_zipfile` function in the module now
   accepts a file object, in addition to the path names accepted in earlier
   versions.  (Contributed by Gabriel Genellina; :issue:`4756`.)
 
@@ -1063,10 +1101,12 @@
   instruction currently executing, and then look up the line number
   corresponding to that address.  (Added by Jeffrey Yasskin.)
 
-* New function: :cfunc:`PyLong_AsLongAndOverflow` approximates a Python long
-  integer as a C :ctype:`long`.  If the number is too large to fit into
-  a :ctype:`long`, an *overflow* flag is set and returned to the caller.
-  (Contributed by Case Van Horsen; :issue:`7528`.)
+* New functions: :cfunc:`PyLong_AsLongAndOverflow` and
+  :cfunc:`PyLong_AsLongLongAndOverflow`  approximates a Python long
+  integer as a C :ctype:`long` or :ctype:`long long`.
+  If the number is too large to fit into
+  the output type, an *overflow* flag is set and returned to the caller.
+  (Contributed by Case Van Horsen; :issue:`7528` and :issue:`7767`.)
 
 * New function: stemming from the rewrite of string-to-float conversion,
   a new :cfunc:`PyOS_string_to_double` function was added.  The old


More information about the Python-checkins mailing list