In association with heise online

21 February 2011, 11:11

Python 3.2 arrives with a better global interpreter lock - Update

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

The Python developers have released Python 3.2, the latest revision of the Python language. There are no syntactic changes in Python 3.2 since the developers chose to implement a moratorium, defined in PEP 3003, on syntax changes in November 2009, after Python 3.0 incorporated a large number of backwards incompatible changes to the language in 2008; the moratorium is due to be lifted this coming June. Python 3.2 is the first major update since the release of Python 3.1 in June 2009.

Update: The moratorium has expired for versions of Python coming after 3.2. This was confirmed by Guido van Rossum who is already working on Python 3.3 and wants to see PEP 380 incorporated in the next edition of the language.

One of the more major changes in Python 3.2 is an improved mechanism for handling the Global Interpreter Lock (GIL); the presence of the lock has an effect on multi-core systems where multi-threading applications effectively use only one CPU. The widely criticised GIL has been rewritten in Python 3.2 to provide more predictability and reduce overhead and system calls.

Also integrated is PEP 3148, the concurrent.futures module, which was inspired by the java.util.concurrent package; it offers a consistent API for the creation and management of threads and asynchronous processes. It is hoped that this will be the first of a number of concurrency related libraries in the concurrent namespace. Other improvements include the definition of a stable ABI for extensions for better future compatibility, a new module for argument parsing, support for new .pyc repository directories, a more usable email package and an enhanced datetime module with simpler time zone handling.

Python 3.2 also gets an implementation of PEP 391 which allows logging to be configured using Python dictionaries (rather than specifying formatting, handlers, filters and loggers in configuration files or programatically). The SSL modules and Python debugger have also been enhanced in Python 3.2.

For full details of all the changes in Python 3.2, there are release notes and Raymond Hettinger's detailed "What's New in Python 3.2". Python 3.2 is available for download for Windows (x86 and x86-64), Mac OS X (i386/PPC 32-bit or x86 64-bit and 32-bit) or as source code for compilation on Linux, Unix or Mac OS X. Python 3.2 is licensed under the Python Software Foundation Licence.


Print Version | Send by email | Permalink:

  • July's Community Calendar

The H Open

The H Security

The H Developer

The H Internet Toolkit