+++++++++++Python News
+++++++++++

(editors: check NEWS.help for information about editing NEWS using ReST.)

What's New in Python 2.6.1
==========================

*Release date: 04-Dec-2008*

Core and Builtins
-----------------

- Issue #3996: On Windows, the PyOS_CheckStack function would cause the
  interpreter to abort ("Fatal Python error: Could not reset the stack!")
  instead of throwing a MemoryError.

- Issue #4367: Python would segfault during compiling when the unicodedata
  module couldn't be imported and N escapes were present.

- Issue #4348: Some bytearray methods returned that didn't cause any change to
  the bytearray, returned the same bytearray instead of a copy.

- Issue #4317: Fixed a crash in the imageop.rgb2rgb8() function.

- Issue #4230: If ``__getattr__`` is a descriptor, it now functions correctly.

- Issue #4048: The parser module now correctly validates relative imports.

- Issue #4225: ``from __future__ import unicode_literals`` didn't work in an
  exec statement.

- Issue #4176: Fixed a crash when pickling an object which ``__reduce__``
  method does not return iterators for the 4th and 5th items.

- Issue #4209: Enabling unicode_literals and the print_function in the same
  __future__ import didn't work.

- On windows, os.chdir given unicode was not working if GetCurrentDirectoryW
  returned a path longer than MAX_PATH. (But It's doubtful this code path is
  really executed because I cannot move to such directory on win2k)

- Issue #4069: When set.remove(element) is used with a set element, the element
  is temporarily replaced with an equivalent frozenset. But the eventual
  KeyError would always report the empty frozenset([]) as the missing key. Now
  it correctly refers to the initial element.

- Fixed C99 style comments in several files. Python is now C89 compatible
  again.

Library
-------

- Issue #3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an
  exception.

- Issue #4363: The uuid.uuid1() and uuid.uuid4() functions now work even if
  the ctypes module is not present.

- Issue #4116: Resolve member name conflict in ScrolledCanvas.__init__.

- Issue #3774: Fixed an error when create a Tkinter menu item without command
  and then remove it.

- Fixed a modulefinder crash on certain relative imports.

- Issue #4150: Pdb's "up" command now works for generator frames in post-mortem
  debugging.

- Issue #4092: Return ArgInfo as promised in the documentation from
  inspect.getargvalues.

- Issue #3935: Properly support list subclasses in bisect's C implementation.

- Issue #4014: Don't claim that Python has an Alpha release status, in addition
  to claiming it is Mature.

Build
-----

- Issue #4389: Add icon to the uninstall entry in "add-and-remove-programs".

- Issue #4289: Remove Cancel button from AdvancedDlg.

- Issue #1656675: Register a drop handler for .py* files on Windows.

- Issue #4120: Exclude manifest from extension modules in VS2008.

- Issue #4091: Install pythonxy.dll in system32 again.

- Issue #4018: Disable "for me" installations on Vista.

- Issue #3758: Add ``patchcheck`` build target to .PHONY.

- Issue #4204: Fixed module build errors on FreeBSD 4.

C-API
-----

- Issue #4122: On Windows, fix a compilation error when using the
  Py_UNICODE_ISSPACE macro in an extension module.

Extension Modules
-----------------

- Issue #4365: Add crtassem.h constants to the msvcrt module.

- Issue #4396: The parser module now correctly validates the with statement.


What's New in Python 2.6 final
==============================

*Release date: 01-Oct-2008*

Core and Builtins
-----------------

- Issue #3967: Fixed a crash in the count() and find() methods of string-like
  objects, when the "start" parameter is a huge value.

- Issue #3965: Fixed a crash on Windows when open() is given an invalid
  filename or mode, and the filename is a unicode string.

- Bug #3951: Py_USING_MEMORY_DEBUGGER should not be enabled by default.

Library
-------

- Issue #3965: Allow repeated calls to turtle.Screen, by making it a
  true singleton object.

- Issue #3895: It was possible to crash the interpreter when an external timer
  was used with cProfile that returned an object that could not be converted
  into a float.

- Issue #3950: Made turtle respect scale factors.

- Issue #3547: Fixed ctypes structures bitfields of varying integer
  sizes.

- Issue #3879: A regression in urllib.getproxies_enviroment was fixed.

- Issue #3863: Disabled a unit test of fork being called from a thread
  when running on platforms known to exhibit OS bugs when attempting that.

Build
-----

- Bug #3989: Package the 2to3 script (as 2to3.py) in the Windows
  installer.

- Bug #3887: Package x64 version of CRT for AMD64 Windows binaries.


What's New in Python 2.6 release candidate 2?
=============================================

*Release date: 17-Sep-2008*

Core and Builtins
-----------------

Extension Modules
-----------------

- Security Issue #2: imageop did not validate arguments correctly and could
  segfault as a result.

- Issue #3886: Possible integer overflows in the _hashopenssl module were
  closed.

Tools/Demos
-----------

- Issue #3850: recursion tests in Misc/find_recursion_limit.py can raise
  AttributeError instead of RuntimeError, depending in which C API call
  exactly the recursion limit is exceeded. Consequently, both exception types
  are caught and silenced.

Build
-----

- Issue #3617: Include a licensing statement regarding the Microsoft
  C runtime in the Windows installer.


What's New in Python 2.6 release candidate 1?
=============================================

*Release date: 12-Sep-2008*

Core and Builtins
-----------------

- Issue #3642: Suppress warning in obmalloc when size_t is larger than uint.

- Issue #3743: In a few places, PY_FORMAT_SIZE_T was incorrectly used with
  PyString_FromFormat or PyErr_Format to display size_t values. The macro
  PY_FORMAT_SIZE_T is designed to select the correct format for the OS
  ``printf`` function, whereas PyString_FromFormat has an independent
  implementation and uses "%zd" on all platforms for size_t values.
  This makes a difference on win64, where ``printf`` needs "%Id" to display
  64bit values.

- Issue #3634: _weakref.ref(Exception).__init__() gave invalid return value on
  error.

- Issue #3777: long() applied to a float object now always return a long
  object; previously an int would be returned for small values. the __long__
  method is allowed to return either an int or a long, but the behaviour of
  float objects should not change to respect backward compatibility.

- Issue #3751: str.rpartition would perform a left-partition when called with
  a unicode argument.

- Issue #3683: Fix compilation when --without-threads is given.

- Issue #3668: Fix a memory leak with the "s*" argument parser in
  PyArg_ParseTuple and friends, which occurred when the argument for "s*"
  was correctly parsed but parsing of subsequent arguments failed.

- Issue #2534: speed up isinstance() and issubclass() by 50-70%, so as to
  match Python 2.5 speed despite the __instancecheck__ / __subclasscheck__
  mechanism. In the process, fix a bug where isinstance() and issubclass(),
  when given a tuple of classes as second argument, were looking up
  __instancecheck__ / __subclasscheck__ on the tuple rather than on each
  type object.

- Fix crashes on memory allocation failure found with failmalloc.

- Fix memory leaks found with valgrind and update suppressions file.

- Fix compiler warnings in opt mode which would lead to invalid memory reads.

- Fix problem using wrong name in decimal module reported by pychecker.

- Silenced another compiler warning about a used but not defined
  function 'stringlib_contains_obj'.

- Added warnings on the use of ``__getslice__``, ``__setslice__``, or
  ``__delslice__``.

- Issue #3678: Correctly pass LDFLAGS and LDLAST to the linker on shared
  library targets in the Makefile.

- Issue #1204: The configure script now tests for additional libraries
  that may be required when linking against readline. This fixes issues
  with x86_64 builds on some platforms (a few Linux flavors and OpenBSD).

C-API
-----

- Aliased PyObject_Bytes to PyObject_Str.

Library
-------

- Issue #3640: Pickling a list or a dict uses less local variables, to reduce
  stack usage in the case of deeply nested objects.

- Issue #3629: Fix sre "bytecode" validator for an end case.

- Issue #3811: The Unicode database was updated to 5.1.

- Issue #3781: Further warnings.catch_warnings() cleanup to prevent
  silent misbehaviour when a single instance is nested in multiple
  with statements, or when the methods are invoked in the wrong order.

- Issue #3809: Fixed spurious 'test.blah' file left behind by test_logging.

- Issue #3781: Clean up the API for warnings.catch_warnings() by having it
  return a list or None rather than a custom object.

- Issue #1638033: Cookie.Morsel gained the httponly attribute.

- Issue #3535: zipfile couldn't read some zip files larger than 2GB.

- Issue #3776: Deprecate the bsddb package for removal in 3.0.

- Issue #3762: platform.architecture() fails if python is lanched via
  its symbolic link.

- Issue #3772: Fixed regression problem in StreamHandler.emit().

- Issue 600362: Relocated parse_qs() and parse_qsl(), from the cgi module
  to the urlparse one. Added a PendingDeprecationWarning in the old
  module, it will be deprecated in the future.

- Issue #2562: Fix distutils PKG-INFO writing logic to allow having
  non-ascii characters and Unicode in setup.py meta-data.

- Issue #3726: Allow spaces in separators in logging configuration files.

- Issue #3719: platform.architecture() fails if there are spaces in the
  path to the Python binary.

- Issue 3602: Moved test.test_support.catch_warning() to
  warnings.catch_warnings() along with some API cleanup. Expanding the tests
  for catch_warnings() also led to an improvement in the raising of a
  DeprecationWarning related to warnings.warn_explicit().

- The deprecation warnings for the old camelCase threading API were removed.

- logging: fixed lack of use of encoding attribute specified on a stream.

- Silenced a trivial compiler warning in the sqlite module.

- Fixed two format strings in the _collections module.

- Issue #3703: _fileio.FileIO gave unhelpful error message when trying to open a
  directory.

- Issue #3708: os.urandom no longer goes into an infinite loop when passed a
  non-integer floating point number.

- Issue #3110: multiprocessing fails to compiel on solaris 10 due to missing
  SEM_VALUE_MAX.

Extension Modules
-----------------

- Issue #2975: When compiling several extension modules with Visual Studio 2008
  from the same python interpreter, some environment variables would grow
  without limit.

- Issue #3643: Added a few more checks to _testcapi to prevent segfaults by
  exploitation of poor argument checking.

- sqlite3: Changed docstring of iterdump() to mark method as "Non-standard".

- Issue #3103: Reduced globals symbols used by sqlite3 module and made sure all
  remaining ones have "pysqlite_" prefix.

- Issue #3846: Release the GIL during sqlite3_prepare calls. This improves
  concurrent access to the same SQLite database from multiple
  threads/processes.

Tests
-----

- Issue #3781: Add test.test_support.check_warnings() as a convenience
  wrapper for warnings.catch_warnings() that makes it easier to check
  that expected warning messages are being reported.

- Issue #3796: Some tests functions were not enabled in test_float.

- Issue #3768: Move test_py3kwarn over to the new API for catch_warnings().

Build
-----

- Issue #3833: Use a different upgrade code for Win64 installers.

- Issue #2271: Set SecureCustomProperties so that installation will properly
  use the TARGETDIR even for unprivileged users.

- Allow passing the MSI file name to merge.py.

- Issue #3758: Rename the 'check' target to 'patchcheck' so as to not clash
  with GNU build target guidelines.


What's New in Python 2.6 beta 3?
================================

*Release date: 20-Aug-2008*

Core and Builtins
-----------------

- Issue #1878: Remove Py_TPFLAGS_HAVE_VERSION_TAG from
  Py_TPFLAGS_DEFAULT when not building the core. This means 3rd party
  extensions do not automatically benefit from the class attribute
  cache; they will have to explicitly add Py_TPFLAGS_HAVE_VERSION_TAG
  to their tp_flags field if they care. This is a backwards
  compatibility feature; in 3.0, all types will use the cache by
  default.

- Keyword arguments can now follow starred arguments. (``f(a, *args,
  keyword=23)`` is now valid syntax.)

- ctypes function pointers that are COM methods have a boolean True
  value again.

- Issue #3139: Make buffer-interface thread-safe wrt. PyArg_ParseTuple,
  by denying s# to parse objects that have a releasebuffer procedure,
  and introducing s*.

- Issue #3537: Fix an assertion failure when an empty but presized dict
  object was stored in the freelist.

- Issue #1481296: Make long(float('nan')) and int(float('nan')) raise
  ValueError consistently across platforms.

- Issue #3479: On platforms where sizeof(int) is smaller than sizeof(long)
  (64bit Unix, for example), unichr() would truncate its argument and return
  u'x00' for unichr(2**32). Now it properly raises an OverflowError.

- Apply security patches from Apple.

- Issue #2542: Now that issubclass() may call arbitrary code, ensure that
  PyErr_ExceptionMatches returns 0 when an exception occurs there.

- Issue #1819: function calls with several named parameters are now on
  average 35% faster (as measured by pybench).

- Issue #2378: An unexpected UnboundLocalError or NameError could appear when
  the python debugger steps into a class statement: the free variables (local
  variables defined in an outer scope) would be deleted from the outer scope.

- Issue #2620: Overflow checking when allocating or reallocating memory
  was not always being done properly in some python types and extension
  modules. PyMem_MALLOC, PyMem_REALLOC, PyMem_NEW and PyMem_RESIZE have
  all been updated to perform better checks and places in the code that
  would previously leak memory on the error path when such an allocation
  failed have been fixed.

Library
-------

- Issue #3612: Added some missing basic types in ctypes.wintypes.

- The methods ``is_in_tuple()``, ``is_vararg()``, and ``is_keywordarg()`` of
  symtable.Symbol have been deprecated for removal in 3.0 and the next release.

- Issue #2234: distutils failed for some versions of the cygwin compiler. The
  version reported by these tools does not necessarily follow the python
  version numbering scheme, so the module is less strict when parsing it.

- Issue #2235: Added Py3k warnings for types which will become unhashable
  under the stricter __hash__ inheritance rules in 3.0. Several types
  which did not meet the rules for hash invariants and were already
  unhashable in 3.0 have now been explicitly flagged as unhashable in
  2.6 as well (collections.Mapping, collections.Set, unittest.TestSuite,
  xml.dom.minidom.NamedNodeMap, numbers.Number, UserList.UserList)

- Update __all__ for cookielib, csv, os, urllib2, and weakref to include things
  imported into the module but exposed as part of the module's API.

- Remove an unneeded import of abc.ABCMeta from 'inspect'.

- Remove unneeded imports of 'sys' and 'warnings' from 'io'.

- Remove unneeded imports of 'warnings' from shelve, filecmp, and dummy_thread.

- Issue #3575: Incremental decoder's decode function now takes bytearray
  by using 's*' instead of 't#'.

- Issue #2222: Fixed reference leak when occured os.rename()
  fails unicode conversion on 2nd parameter. (windows only)

- Issue 2464. urllib2 now supports a malformation in the URL received
  in a redirect.

- Silence the DeprecationWarning raised when importing mimetools in
  BaseHTTPServer, cgi (and rfc822), httplib.

- Issue #2776: fixed small issue when handling an URL with double slash
  after a 302 response in the case of not going through a proxy.

- Issue #2676: in the email package, content-type parsing was hanging on
  pathological input because of quadratic or exponential behaviour of a
  regular expression.

- Issue #3476: binary buffered reading through the new "io" library is now
  thread-safe.

- Silence the DeprecationWarning of rfc822 when it is imported by mimetools
  since mimetools itself is deprecated. Because modules are cached, all
  subsequent imports of rfc822 will not raise a visible DeprecationWarning.

- Issue #3134: shutil referenced undefined WindowsError symbol.

- Issue #1342811: Fix leak in Tkinter.Menu.delete. Commands associated to
  menu entries were not deleted.

- Copied the implementation of reduce() to _functools.reduce() to have a
  version that did not raise a DeprecationWarning under -3.

- Issue #3205: When iterating over a BZ2File fails allocating memory, raise
  a MemoryError rather than silently stop the iteration.

- Issue #3487: sre "bytecode" validator. Passing invalid "re-bytecode"
  to _sre.compile() will now be rejected. This should not affect anybody
  since the re.compile() function never generates invalid re-bytecode.

- Issue #3436: Make csv.DictReader's fieldnames attribute a property so that
  upon first access it can be automatically initialized from the csv file if
  it wasn't initialized during instantiation.

- Issue #2338: Create imp.reload() to help with transitioning to Python 3.0 as
  the reload() built-in has been removed.

- Changed code in the following modules/packages to remove warnings raised
  while running under the ``-3`` flag: aifc, asynchat, asyncore, bdb, bsddb,
  ConfigParser, cookielib, csv, difflib, distutils, DocXMLRPCServer, email,
  filecmp, fileinput, inspect, logging, modulefinder, pdb, pickle, profile,
  pstats, pydoc, re, rlcompleter, SimpleXMLRPCServer, shelve, socket,
  subprocess, sqlite3, tarfile, Tkinter, test.test_support, textwrap,
  threading, tokenize, traceback, urlparse, wsgiref, xml, xmlrpclib.

- Issue #3039: Fix tarfile.TarFileCompat.writestr() which always
  raised an AttributeError.

- Issue #2523: Fix quadratic behaviour when read()ing a binary file without
  asking for a specific length. This problem only affected files opened
  using the new "io" module, not the built-in open() function.

- Issue #3449: Update decimal module to use most recent specification
  (v. 1.68) and tests (v. 2.58) from IBM.

- Issue 3437: Bug fix in robotparser parsing of Allow: lines.

- Issue 1592: Improve error reporting when operations are attempted
  on a closed shelf.

- Deprecate the "ast" parser function aliases.

- Issue #3120: On 64-bit Windows the subprocess module was truncating handles.

- Issue #3303: Fix a crash in locale.strcoll() when calling it with
  invalid arguments.

- Issue #3302: Fix several crashes when calling locale's gettext functions
  with None arguments.

- Issue #3389: Allow resolving dotted names for handlers in logging
  configuration files.

- Deprecate the sunaudio module for removal in Python 3.0.

- Issue #3394: zipfile.writestr sets external attributes when passed a
  file name rather than a ZipInfo instance, so files are extracted with
  mode 0600 rather than 000 under Unix.

- Issue #1857: subprocess.Popen.poll gained an additional _deadstate keyword
  argument in python 2.5, this broke code that subclassed Popen to include its
  own poll method. Fixed my moving _deadstate to an _internal_poll method.

Build
-----

- Generate the PatternGrammar pickle during "make install".

Documentation
-------------

- Issue #2235: the C API function PyObject_HashNotImplemented and its
  interaction with the tp_hash slot (added in 2.6b2) are now documented

- Issue #643841: The language reference now provides more detailed
  coverage of the lookup process for special methods. The disclaimers
  regarding lack of coverage of new-style classes have also been
  removed, since the coverage is now fairly reasonable.


What's New in Python 2.6 beta 2?
================================

*Release date: 17-Jul-2008*

Core and Builtins
-----------------

- Issue #3156: Fix inconsistent behavior of the bytearray type: all
  its methods now allow for items objects that can be converted to
  an integer using operator.index().

- Issue #3360: Fix incorrect parsing of '020000000000.0', which
  produced a ValueError instead of giving the correct float.

- Issue #3083: Add alternate (#) formatting for bin, oct, hex output
  for str.format(). This adds the prefix 0b, 0o, or 0x, respectively.

- Issue #3008: the float type has a new instance method 'float.hex'
  and a new class method 'float.fromhex' to convert floating-point
  numbers to and from hexadecimal strings, respectively.

- Issue #2235: __hash__ is once again inherited by default. To allow
  collections.Hashable to remain meaningful in the presence of the
  default hash implementation (object.__hash__), it is now possible
  to explicit block inheritance of hash by setting __hash__=None at
  the Python level, or tp_hash=PyObject_HashNotImplemented at the C
  level.

- Issue #3221: Issue a RuntimeWarning instead of raising SystemError if
  the parent module cannot be found while performing an absolute import.
  This means that an incorrectly defined __package__ attribute will
  now only prevent relative imports in that module rather than causing
  all imports from that module to fail.

- Issue #2517: Allow unicode messages in Exceptions again by correctly
  bypassing the instance dictionary when looking up __unicode__ on
  new-style classes.

- Issue #3242: Fix a crash inside the print statement, if sys.stdout is
  set to a custom object whose write() method happens to install
  another file in sys.stdout.

- Issue #3088: Corrected a race condition in classes derived from
  threading.local: the first member set by a thread could be saved in
  another thread's dictionary.

- Issue #3004: Minor change to slice.indices(): the start and stop
  arguments are now treated identically, making the behaviour easier
  to describe and understand. For example, slice(None, -10,
  1).indices(9) now returns (0, 0, 1) instead of (0, -1, 1), and
  slice(None, 10, -1).indices(10) returns (9, 9, -1) instead of (9,
  10, -1).

- Issue #3219: Calling a function with repeated keyword arguments,
  f(a=2, a=23), would not cause a syntax error. This was a regression
  from 2.4 caused by the switch to the new compiler.

- Issue #2862: Make int and float freelist management consistent with
  other freelists. Changes their CompactFreeList apis into
  ClearFreeList apis and calls them via gc.collect().

Library
-------

- Issue #3554: ctypes.string_at and ctypes.wstring_at did call Python
  api functions without holding the GIL, which could lead to a fatal
  error when they failed.

- Issue #799428: Fix Tkinter.Misc._nametowidget to unwrap Tcl command objects.

- Issue #3395: fix reference in test_multiprocessing to old debugInfo method

- Issue #3312: Fix two crashes in sqlite3.

- Issue #1608818: Fix misbehavior in os.listdir() if readdir() fails.

- Issue #3125: Remove copy_reg in multiprocessing and replace it with
  ForkingPickler.register() to resolve conflict with ctypes.

- Issue #3090: Fixed ARCHFLAGS parsing on OS/X

- Issue #3313: Fixed a crash when a failed dlopen() call does not set
  a valid dlerror() message.

- Issue #3258: Fixed a crash when a ctypes POINTER type to an
  incomplete structure was created.

- Issue #3339: dummy_thread.acquire() should not return None.

- Issue #3285: Fractions from_float() and from_decimal() accept Integral arguments.

- Issue #3301: Bisect module behaved badly when lo was negative.

- Issue #839496: SimpleHTTPServer used to open text files in text mode. This is
  both unnecessary (HTTP allows text content to be sent in several forms) and
  wrong because the actual transmitted size could differ from the
  content-length. The problem had been corrected in the 2.4 branch, but never
  merged into trunk.

- Issue #2663: add filtering capability to shutil.copytree().

- Issue #1622: Correct interpretation of various ZIP header fields.

- Issue #1526: Allow more than 64k files to be added to Zip64 file.

- Issue #1746: Correct handling of zipfile archive comments (previously
  archives with comments over 4k were flagged as invalid). Allow writing
  Zip files with archives by setting the 'comment' attribute of a ZipFile.

- Issue #449227: The rlcompleter module now adds "(" to callable objects
  when completed.

- Issue #3190: Pydoc now hides the automatic module attribute __package__ (the
  handling is now the same as that of other special attributes like __name__).

- Issue #2885 (partial): The urllib.urlopen() function has been deprecated for
  removal in Python 3.0 in favor of urllib2.urlopen().

- Issue #2113: Fix error in subprocess.Popen if the select system call is
  interrupted by a signal.

- Issue #3309: Fix bz2.BZFile iterator to release its internal lock
  properly when raising an exception due to the bz2file being closed.
  Prevents a deadlock.

- Issue #3094: httplib.HTTPSConnection Host: headers no longer include the
  redundant ":443" port number designation when the connection is using the
  default https port (443).

- Issue #874900: after an os.fork() call the threading module state is cleaned
  up in the child process to prevent deadlock and report proper thread counts
  if the new process uses the threading module.

Tests
-----

- test.test_support.catch_warning now keeps track of all warnings it sees
  and is now better documented. Explicit unit tests for this context manager
  have been added to test_warnings.

Build
-----

- Issue #3215: Build sqlite3 as sqlite3.dll, not sqlite3.pyd.


Documentation
-------------

- Document that robotparser has been renamed to urllib.robotparser in
  Python 3.0.

- Document that urlparse has been renamed to urllib.parse in Python 3.0.

- Document that urllib2 is split across multiple modules and renamed in
  Python 3.0.

- Document that urllib is split across multiple modules and renamed in
  Python 3.0.


What's New in Python 2.6 beta 1?
================================

*Release date: 18-June-2008*

Core and Builtins
-----------------

- Issue #3211: warnings.warn_explicit() did not guard against its 'registry'
  argument being anything other than a dict or None. Also fixed a bug in error
  handling when 'message' and 'category' were both set to None, triggering a
  bus error.

- Issue #3100: Corrected a crash on deallocation of a subclassed weakref which
  holds the last (strong) reference to its referent.

- Add future_builtins.ascii().

- Several set methods now accept multiple arguments: update(), union(),
  intersection(), intersection_update(), difference(), and difference_update().

- Issue #2898: Added sys.getsizeof() to retrieve size of objects in bytes.

- New environment variable PYTHONIOENCODING.

- Patch #2488: Add sys.maxsize.

- Issue #2353: file.xreadlines() now emits a Py3k warning.

- Issue #2863: generators now have a ``gen.__name__`` attribute that
  equals ``gen.gi_code.co_name``, like ``func.__name___`` that equals
  ``func.func_code.co_name``. The repr() of a generator now also
  contains this name.

- Issue #2831: enumerate() now has a ``start`` argument.

- Issue #2801: fix bug in the float.is_integer method where a
  ValueError was sometimes incorrectly raised.

- Issue #2790: sys.flags was not properly exposing its bytes_warning
  attribute.

- Issue #2196: hasattr() now lets exceptions which do not inherit
  Exception (KeyboardInterrupt, and SystemExit) propagate instead of
  ignoring them.

- Added checks for integer overflows, contributed by Google. Some are
  only available if asserts are left in the code, in cases where they
  can't be triggered from Python code.


Extension Modules
-----------------
- Issue #1179: [CVE-2007-4965] Integer overflow in imageop module.

- Issue #3116: marshal.dumps() had quadratic behavior for strings > 32Mb.

- Issue #2138: Add factorial() to the math module.

- The heapq module does comparisons using LT instead of LE. This
  makes its implementation match that used by list.sort().

- Issue #2819: add full-precision summation function to math module,
  based on Hettinger's ASPN Python Cookbook recipe.

- Issue #2592: delegate nb_index and the floor/truediv slots in
  weakref.proxy.

- Support os.O_ASYNC and fcntl.FASYNC if the constants exist on the
  platform.

- Support for Windows 9x has been removed from the winsound module.

- bsddb module updated to version 4.7.3.
  http://www.jcea.es/programacion/pybsddb.htm#bsddb3-4.7.3. This
  code should be compatible with Python 3.0.

- Issue #2858: Fix potential memory corruption when
  bsddb.db.DBEnv.lock_get and other bsddb.db object constructors
  raised an exception.

- Issue #2669: bsddb/__init__.py iteration no longer silently fails when
  the database has changed size during iteration. It now raises a
  RuntimeError in the same manner as a dictionary.

- Issue #2870: cmathmodule.c compile error.

- Added a threading.Thread.ident property.

Library
-------

- logging.config: Removed out-of-date comment in _install_handlers and
  used issubclass in place of equality comparison of classes.

- Issue #2722: Now the os.getcwd() supports very long path names.

- Issue #2888: Fixed the behaviour of pprint when working with nested
  structures, to match the behaviour of 2.5 and 3.0 (now follows the common
  sense).

- Issue #1817: cgi now correctly handles the querystring on POST requests

- Issue #3136: fileConfig()'s disabling of old loggers is now conditional via
  an optional disable_existing_loggers parameter, but the default value is
  such that the old behaviour is preserved. Thanks to Leandro Lucarella for
  the patch.

- Issue #3126: StreamHandler and FileHandler check before calling "flush" and
  "close" that the stream object has these, using hasattr (thanks to bobf for
  the patch).

- Issue #2912: platform.uname now tries to determine unknown information even if
  os.uname exists.

- The rfc822 module has been deprecated for removal in 3.0.

- The mimetools module has been deprecated for removal in 3.0.

- The ctypes.byref function now takes an optional second parameter
  which allows to specify an offset in bytes for the constructed
  pointer-like object.

- Added the ast module.

- Added the multiprocessing module, PEP 371.

- Factored out the indentation cleaning from inspect.getdoc() into
  inspect.cleandoc() to ease standalone use.

- Issue #1798: Add ctypes calling convention that allows safe access
  to errno.

- Issue #2404: ctypes objects support the new pep3118 buffer interface.

- Patch #2125: Add GetInteger and GetString methods for
  msilib.Record objects.

- Issue #2782: The datetime module's strftime methods now accept
  unicode format strings just as time.strftime always has.

- The sgmllib and htmllib modules have been deprecated for removal
  in Python 3.0.

- Issue #3011: locale module alias table was updated to the latest
  version from the X.org locale.alias file.

- Issue #1797 (partial fix): ctypes NULL function pointers have a
  False boolean value now.

- Issue #2985: Allow 64-bit integer responses (````) in XMLRPC
  transfers.

- Issue #2877: The UserString.MutableString class has been removed in
  Python 3.0.

- Do not close external file objects passed to tarfile.open(mode='w:bz2')
  when the TarFile is closed.

- Issue #2959: For consistency with other file-like objects, gzip's
  GzipFile.close() can now be called multiple times without raising
  an exception.

- Issue #1390: Raise ValueError in toxml when an invalid comment would
  otherwise be produced.

- Issue #2914: TimedRotatingFileHandler now takes an optional keyword
  argument "utc" to use UTC time rather than local time.

- Issue #2929: TimedRotatingFileHandler was using the wrong path when
  deleting old log files (filename only instead of full path).

- Issue #1775025: You can now specify zipfile members to open(),
  read() or extract() via a ZipInfo instance. This allows handling
  duplicate filenames in zipfiles.

- Issue #961805: Fix Text.edit_modified() in Tkinter.

- Issue #1793: Function ctypes.util.find_msvcrt() added that returns
  the name of the C runtime library that Python uses.
  ctypes.util.find_library(name) now call this function when name is
  'm' or 'c'.

- The statvfs module has been deprecated for removal in Python 3.0.

- The sunaudiodev and SUNAUDIODEV modules have been deprecated for
  removal in Python 3.0.

- The WAIT module from IRIX has been deprecated for removal in Python
  3.0.

- The torgb module from IRIX has been deprecated for removal in Python
  3.0.

- The SV module from IRIX has been deprecated for removal in Python
  3.0.

- The readcd module from IRIX has been deprecated for removal in
  Python 3.0.

- The panelparser module from IRIX has been deprecated for removal in
  Python 3.0.

- The panel module from IRIX has been deprecated for removal in Python
  3.0.

- The jpeg module from IRIX has been deprecated for removal in Python
  3.0.

- The IOCTL module from IRIX has been deprecated for removal in Python
  3.0.

- The IN module from IRIX has been deprecated for removal in Python
  3.0.

- The imgfile module from IRIX has been deprecated for removal in
  Python 3.0.

- The GLWS module from IRIX has been deprecated for removal in Python
  3.0.

- The GET module from IRIX has been deprecated for removal in Python
  3.0.

- The fm module from IRIX has been deprecated for removal in Python
  3.0.

- The FL, flp, and fl modules from IRIX have been deprecated for
  removal in Python 3.0.

- The FILE module on IRIX has been deprecated for removal in Python
  3.0.

- The ERRNO module on IRIX has been deprecated for removal in Python
  3.0.

- The DEVICE, GL, gl, and cgen modules (which indirectly includes
  cgensupport) have been deprecated for removal in Python 3.0.

- The CL, CL_old, and cl modules for IRIX have been deprecated for
  removal in Python 3.0.

- The cdplayer module for IRIX has been deprecated for removal in
  Python 3.0.

- The cddb module for IRIX has been deprecated for removal in Python
  3.0.

- The cd and CD modules for IRIX have been deprecated for removal in
  Python 3.0.

- The al and AL modules for IRIX have been deprecated for removal in
  Python 3.0.

- Issue #1713041: fix pprint's handling of maximum depth.

- The timing module has been deprecated for removal in Python 3.0.

- The sv module has been deprecated for removal in Python 3.0.

- The multifile module has been deprecated as per PEP 4.

- The imageop module has been deprecated for removal in Python 3.0.

- Issue #2250: Exceptions raised during evaluation of names in
  rlcompleter's ``Completer.complete()`` method are now caught and
  ignored.

- Issue #2659: Added ``break_on_hyphens`` option to textwrap
  TextWrapper class.

- The mhlib module has been deprecated for removal in Python 3.0.

- The linuxaudiodev module has been deprecated for removal in Python
  3.0.

- The ihooks module has been deprecated for removal in Python 3.0.

- The fpformat module has been deprecated for removal in Python 3.0.

- The dl module has been deprecated for removal in Python 3.0.

- The Canvas module has been deprecated for removal in Python 3.0.

- The compiler package has been deprecated for removal in Python 3.0.

- The Bastion and rexec modules have been deprecated for removal in
  Python 3.0.

- The bsddb185 module has been deprecated for removal in Python 3.0.

- The pure module has been deprecated for removal in Python 3.0.

- Issue #2487: change the semantics of math.ldexp(x, n) when n is too
  large to fit in a C long. ldexp(x, n) now returns a zero (with
  suitable sign) if n is large and negative; previously, it raised
  OverflowError.

- The toaiff module has been deprecated for removal in Python 3.0.

- The test.testall module has been deprecated for removal in Python
  3.0.

- The new module has been deprecated for removal in Python 3.0.

- The user module has been deprecated for removal in Python 3.0.

- The stringold module has been deprecated for removal in Python 3.0.

- The mutex module has been deprecated for removal in Python 3.0.

- The imputil module has been deprecated for removal in Python 3.0.

- test.test_support.catch_warning() gained a 'record' argument.

- os.path.walk is deprecated in favor of os.walk.

- pdb gained the "until" command.

- The Mac Modules (including Carbon) have been deprecated for removal
  in Python 3.0.

- Library: on MacOS X you can now set ``ARCHFLAGS`` in the shell
  environment to control the '-arch' flags that are used to build
  an extension. This was added for compatibility with Apple's build
  of Python.

- The bundled OSX-specific copy of libbffi is now in sync with the version
  shipped with PyObjC 2.0 and includes support for x86_64 and ppc64 platforms.

- The threading module gained aliases for names that will be removed in the
  3.x series.

Build
-----

- The Windows installer now includes Tk 8.5, bzip2 1.0.5, and SQLite 3.5.9.

- Patch #1722225: Support QNX 6.

- ``Lib/lib-old`` is now added to sys.path.

- On MacOS X it is now possible to install the framework in 64-bit
  mode or even as a 4-way universal binary (that is, PPC, i386,
  PPC64 and x86_64 support in one binary).

  This is controlled by the configure argument ``--with-universal-archs``:

  - ``--with-universal-archs=all``: install 4-way universal

  - ``--with-universal-archs=32-bit``: install 2-way universal, 32-bit (the default)

  - ``--with-universal-archs=64-bit``: install 2-way universal, 64-bit

  This option should be used in combination with ``--enable-universalsdk=``.

  NOTE: 64-bit and 4-way builds are only suppported on Mac OS X 10.5 (or later).


C API
-----

- Add ``PyType_Modified()`` as a public API to clear the type cache.

- The PyBytes functions have been renamed to PyByteArray.

- The PyString functions have been renamed to PyBytes. A batch of
  defines were added so that the linker still sees the original
  PyString names.


What's New in Python 2.6 alpha 3?
=================================

*Release date: 08-May-2008*

Core and builtins
-----------------

- Issue #2719: backported the ``next()`` builtin from Python 3.

- Issue #2681: The octal literal ``0o8`` was incorrecly acctepted. Now
  it properly raises a SyntaxError.

- Issue #2617: Reserved -J and -X arguments for Jython, IronPython and
  other implementations of Python.

- Implemented PEP 370: Per user site-packages directory.

Extension Modules
-----------------

- Issue #2670: Fix a failure in urllib2.build_opener(), when passed
  two handlers that derive the same default base class.

- Added kill, terminate and send_signal(sig) to subprocess.Popen.

- Added phase(z) -> phi, polar(z) -> r, phi and rect(r, phi) -> z to
  the cmath module.

- Four new methods were added to the math and cmath modules: acosh,
  asinh, atanh and log1p.

- zlib.decompressobj().flush(value) no longer crashes the interpreter
  when passed a value less than or equal to zero.

- Issue #1631171: Re-implement the 'warnings' module in C (the
  original Python code has been kept as backup). This will allow for
  using the 'warning's machinery in such places as the parser where
  use of pure Python code is not possible. Both the ``showarning()``
  and ``formatwarning()`` gain an optional 'line' argument which is
  not called by default for backwards-compatibility reasons. Setting
  ``warnings.showwarning()`` to an implementation that lacks support
  for the ``line`` argument will raise a DeprecationWarning.

Library
-------

- The audiodev module has been deprecated for removal in Python 3.0.

- Issue #2750: Add the 'json' package. Based on simplejson 1.9 and
  contributed by Bob Ippolito.

- Issue #1734346: Support Unicode file names for zipfiles.

- Issue #2581: distutils: Vista UAC/elevation support for
  bdist_wininst.

- Issue #2635: Fix bug in 'fix_sentence_endings' textwrap.fill option,
  where an extra space was added after a word containing (but not
  ending in) '.', '!' or '?'.

- Add from_buffer() and from_buffer_copy() class methods to ctypes
  data types.

- Issue #2682: ctypes callback functions no longer contain a cyclic
  reference to themselves.

- The getpass module has been improved on Unix. It now uses /dev/tty
  by default and uses stderr instead of stdout. A GetPassWarning is
  issued when input echo cannot be controlled.

- Issue #2014: Allow XML-RPC datetime objects to have dates before
  1900-01-01.

- Issue #2439: Added new function pkgutil.get_data(), which is a
  convenience wrapper for the PEP 302 get_data() API.

- Issue #2616: The ctypes.pointer() and ctypes.POINTER() functions are
  now implemented in C for better performance.

- Issue #2408: The ``_types`` module, which was used as in
  implementation detail of the public ``types`` module, has been
  removed and replaced by pure python code.

- Issue #2513: distutils on Windows is now capable of cross-compiling
  extension modules between 32 and 64 bit platforms. See the distutls
  build documentation for more information.

- Issue #815646: Individual file objects may now be used from multiple
  threads at once without fear of crashing the Python interpreter. If
  file.close() is called while an object is in use by another thread
  an IOError exception will be raised and the file will not be closed.

- The bundled libffi copy is now in sync with the recently released
  libffi3.0.5 version, apart from some small changes to
  Modules/_ctypes/libffi/configure.ac.

- Issue #2385: distutils.core.run_script() makes __file__ available,
  so the controlled environment will more closely mirror the typical
  script environment. This supports setup.py scripts that refer to
  data files.

Tests
-----

- Issue #2550: The approach used by client/server code for obtaining
  ports to listen on in network-oriented tests has been refined in an
  effort to facilitate running multiple instances of the entire
  regression test suite in parallel without issue.
  test_support.bind_port() has been fixed such that it will always
  return a unique port -- which wasn't always the case with the
  previous implementation, especially if socket options had been set
  that affected address reuse (i.e. SO_REUSEADDR, SO_REUSEPORT). The
  new implementation of bind_port() will actually raise an exception
  if it is passed an AF_INET/SOCK_STREAM socket with either the
  SO_REUSEADDR or SO_REUSEPORT socket option set. Furthermore, if
  available, bind_port() will set the SO_EXCLUSIVEADDRUSE option on
  the socket it's been passed. This currently only applies to
  Windows. This option prevents any other sockets from binding to the
  host/port we've bound to, thus removing the possibility of the
  'non-deterministic' behaviour, as Microsoft puts it, that occurs
  when a second SOCK_STREAM socket binds and accepts to a host/port
  that's already been bound by another socket. The optional preferred
  port parameter to bind_port() has been removed. Under no
  circumstances should tests be hard coding ports!

  test_support.find_unused_port() has also been introduced, which will
  pass a temporary socket object to bind_port() in order to obtain an
  unused port. The temporary socket object is then closed and
  deleted, and the port is returned. This method should only be used
  for obtaining an unused port in order to pass to an external program
  (i.e. the -accept [port] argument to openssl's s_server mode) or as
  a parameter to a server-oriented class that doesn't give you direct
  access to the underlying socket used.

  Finally, test_support.HOST has been introduced, which should be used
  for the host argument of any relevant socket calls (i.e. bind and
  connect).

  The following tests were updated to following the new conventions:
  test_socket, test_smtplib, test_asyncore, test_ssl, test_httplib,
  test_poplib, test_ftplib, test_telnetlib, test_socketserver,
  test_asynchat and test_socket_ssl.

  It is now possible for multiple instances of the regression test
  suite to run in parallel without issue.

Build
-----

- Issue #1496032: On alpha, use -mieee when gcc is the compiler.

- Issue #2544: On HP-UX systems, use 'gcc -shared' for linking when
  gcc is used as compiler.

- Issue #2573: On MacOS X it is now possible to install the framework
  with a different name using --with-framework-name=NAME.

C API
-----

- Added implementation of copysign, acosh, asinh, atanh and log1p to
  the new files Include/pymath.h and Python/pymath.h for platforms
  which provide the functions through their libm. The files also
  contains several helpers and constants for math.

- Added a new convenience macro, PyErr_WarnPy3k, for issuing Py3k warnings.


What's New in Python 2.6 alpha 2?
=================================

*Release date: 02-Apr-2008*

Core and builtins
-----------------

- Issue #1733757: The interpreter would hang on shutdown if the
  tracing function set by sys.settrace is still active and happens to
  call threading.currentThread().

- Patch #1442: properly report exceptions when the PYTHONSTARTUP file
  cannot be executed.

- The compilation of a class nested in another class used to leak one
  reference on the outer class name.

- Patch #1810: compile() can now compile _ast trees as returned by
  ``compile(..., PyCF_ONLY_AST)``.

- Patch #2426: Added sqlite3.Connection.iterdump method to allow easy
  dumping of databases. Contributed by Paul Kippes at PyCon 2008.

- Patch #2477: Added from __future__ import unicode_literals.

- Added backport of bytearray type.

- Issue #2355: add Py3k warning for buffer().

- Issue #1477: With narrow Unicode builds, the unicode escape sequence
  Uxxxxxxxx did not accept values outside the Basic Multilingual
  Plane. This affected raw unicode literals and the
  'raw-unicode-escape' codec. Now UTF-16 surrogates are generated in
  this case, like normal unicode literals and the 'unicode-escape'
  codec.

- Issue #2348: add Py3k warning for file.softspace.

- Issue #2346/#2347: add Py3k warnings for __methods__ and
  __members__.

- Issue #2358: Add a Py3k warning on sys.exc_clear() usage.

- Issue #2400: Allow relative imports to "import *".

- Issue #1745: Backport print function with ``from __future__ import
  print_function``.

- Issue #2332: add new attribute names for instance method objects.
  The two changes are: im_self -> __self__ and im_func -> __func__

- Issue #2379: Raise a Py3K warning for __getitem__ or __getslice__ on
  exception instances.

- Issue #2371: Add a Py3k warning when catching an exception that
  doesn't derive from BaseException.

- Issue #2341: Add a Py3k warning when raising an exception that
  doesn't derive from BaseException.

- Issue #2321: use pymalloc for unicode object string data to reduce
  memory usage in some circumstances.

- PEP 3127: octal literals now start with "0o". Old-style octal
  literals are still valid. There are binary literals with a prefix of
  "0b". This also affects int(x, 0).

- Issue #2359: Adding deprecation warnings for array.{read,write}.

- Issue #1779871: GNU gcc can now build Python on OS X because the
  flags -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd are no
  longer passed.

- Add a warning when asserting a non-empty tuple which is always true.

- Issue #2179: speed up with statement execution by storing the exit
  method on the stack instead of in a temporary variable (patch by
  Jeffrey Yaskin)

- Issue #2238: Some syntax errors in *args and **kwargs expressions
  could give bogus error messages.

- Issue #2143: Fix embedded readline() hang on SSL socket EOF.

Extension Modules
-----------------

- Patch #2240: Implement signal.setitimer and signal.getitimer.

Library
-------

- Issue #2315: logging.handlers: TimedRotatingFileHandler now accounts
  for daylight savings time in calculating the next rollover.

- Issue #2316: logging.handlers: TimedRotatingFileHandler now
  calculates rollovers correctly even when nothing is logged for a
  while.

- Issue #2317: logging.handlers: TimedRotatingFileHandler now uses
  improved logic for removing old files.

- Issue #2495: tokenize.untokenize now inserts a space between two
  consecutive string literals; previously, ["" ""] was rendered as
  [""""], which is incorrect python code.

- Issue #2248: return the result of the QUIT command. from
  SMTP.quit().

- Backport of Python 3.0's io module.

- Issue #2482: Make sure that the coefficient of a Decimal is always
  stored as a str instance, not as a unicode instance. This ensures
  that str(Decimal) is always an instance of str.

- Issue #2478: fix failure of decimal.Decimal(0).sqrt()

- Issue #2432: give DictReader the dialect and line_num attributes
  advertised in the docs.

- Issue #2460: Make Ellipsis object copyable.

- Issue #1681432: Add triangular distribution to the random module

- Issue #2136: urllib2's auth handler now allows single-quoted realms
  in the WWW-Authenticate header.

- Issue #2434: Enhanced platform.win32_ver() to also work on Python
  installation which do not have the win32all package installed.

- Added support to platform.uname() to also report the machine and
  processor information on Windows XP and later. As a result,
  platform.machine() and platform.processor() will report this
  information as well.

- The library implementing the 2to3 conversion, lib2to3, was added to
  the standard distribution.

- Issue #1747858: Fix chown to work with large uid's and gid's on
  64-bit platforms.

- Issue #1202: zlib.crc32 and zlib.adler32 no longer return different
  values on 32-bit vs. 64-bit python interpreters. Both were correct,
  but they now both return a signed integer object for consistency.

- Issue #1158: add %f format (fractions of a second represented as
  microseconds) to datetime objects. Understood by both strptime and
  strftime.

- Issue #705836: struct.pack(">f", x) now raises OverflowError on all
  platforms when x is too large to fit into an IEEE 754 float;
  previously it only raised OverflowError on non IEEE 754 platforms.

- Issues #2166, #1741 and #1531505: now distutils deals with HOME
  correctly under win32

- Patch #1858: distutils: added multiple server support in .pypirc

- Issue #1106316: pdb.post_mortem()'s parameter, "traceback", is now
  optional: it defaults to the traceback of the exception that is
  currently being handled (is mandatory to be in the middle of an
  exception, otherwise it raises ValueError).

- Issue #1193577: A .shutdown() method has been added to SocketServers
  which terminates the .serve_forever() loop.

- Issue #2220: handle rlcompleter attribute match failure more
  gracefully.

- Issue #2225: py_compile, when executed as a script, now returns a
  non- zero status code if not all files could be compiled
  successfully.

- Bug #1725737: In distutils' sdist, exclude RCS, CVS etc. also in the
  root directory, and also exclude .hg, .git, .bzr, and _darcs.

- Issue #1872: The struct module typecode for _Bool has been changed
  from 't' to '?'.

- The bundled libffi copy is now in sync with the recently released
  libffi3.0.4 version, apart from some small changes to
  Modules/_ctypes/libffi/configure.ac. On OS X, preconfigured libffi
  files are used. On all linux systems the --with-system-ffi
  configure option defaults to "yes".

- Issue #1577: shutil.move() now calls os.rename() if the destination
  is a directory instead of copying-then-remove-source.

Tests
-----

- test_nis no longer fails when test.test_support.verbose is true and
  NIS is not set up on the testing machine.

- Output comparison tests are no longer supported.

- Rewrite test_errno to use unittest and no longer be a no-op.

- GHOP 234: Convert test_extcall to doctest.

- GHOP 290: Convert test_dbm and test_dummy_threading to unittest.

- GHOP 293: Convert test_strftime, test_getargs, and test_pep247 to
  unittest.

- Issue #2055: Convert test_fcntl to unittest.

- Issue 1960: Convert test_gdbm to unittest.

- GHOP 294: Convert test_contains, test_crypt, and test_select to
  unittest.

- GHOP 238: Convert test_tokenize to use doctest.

- GHOP 237: Rewrite test_thread using unittest.

- Patch #2232: os.tmpfile might fail on Windows if the user has no
  permission to create files in the root directory.

Build
-----

- A new script 2to3 is now installed, to run the 2.x to 3.x converter.

- Python/memmove.c and Python/strerror.c have been removed; both
  functions are in the C89 standard library.

- Patch #2284: Add -x64 option to rt.bat.

C API
-----

- Patch #2477: Added PyParser_ParseFileFlagsEx() and
  PyParser_ParseStringFlagsFilenameEx().


What's New in Python 2.6 alpha 1?
=================================

*Release date: 29-Feb-2008*

Core and builtins
-----------------

- Issue #2051: pyc and pyo files are no longer created with permission
  644. The mode is now inherited from the py file.

- Issue #2067: file.__exit__() now calls subclasses' close() method.

- Patch #1759: Backport of PEP 3129 class decorators.

- Issue #1881: An internal parser limit has been increased. Also see
  issue 215555 for a discussion.

- Added the future_builtins module, which contains hex() and oct().
  These are the PEP 3127 version of these functions, designed to be
  compatible with the hex() and oct() builtins from Python 3.0. They
  differ slightly in their output formats from the existing, unchanged
  Python 2.6 builtins. The expected usage of the future_builtins
  module is:
  from future_builtins import hex, oct

- Issue #1600: Modifed PyOS_ascii_formatd to use at most 2 digit
  exponents for exponents with absolute value < 100. Follows C99
  standard. This is a change on Windows, which would use 3 digits.
  Also, added 'n' to the formats that PyOS_ascii_formatd understands,
  so that any alterations it does to the resulting string will be
  available in stringlib/formatter.h (for float.__format__).

- Implemented PEP 3101, Advanced String Formatting. This adds a new
  builtin format(); a format() method for str and unicode; a
  __format__() method to object, str, unicode, int, long, float, and
  datetime; the class string.Formatter; and the C API
  PyObject_Format().

- Fixed several potential crashes, all caused by specially crafted
  __del__ methods exploiting objects in temporarily inconsistent
  state.

- Issue #2115: Important speedup in setting __slot__ attributes. Also
  prevent a possible crash: an Abstract Base Class would try to access
  a slot on a registered virtual subclass.

- Fixed repr() and str() of complex numbers with infinity or nan as
  real or imaginary part.

- Clear all free lists during a gc.collect() of the highest generation
  in order to allow pymalloc to free more arenas. Python may give back
  memory to the OS earlier.

- Issue #2045: Fix an infinite recursion triggered when printing a
  subclass of collections.defaultdict, if its default_factory is set
  to a bound method.

- Fixed a minor memory leak in dictobject.c. The content of the free
  list was not freed on interpreter shutdow