- Developer Tools
Sridhar Ratnakumar, February 22, 2011SHARE THIS:
Python 3.2 was released on Sunday and we swiftly prepared ActivePython 3.2 with all the familiar goodies:
- PyWin32: Python extensions for Windows - an essential set of packages to access the Windows API
- PyPM: ActiveState's binary package manager for Python - facilitates easy searching and installation of thousands of Python packages. No need to fiddle with compiling packages yourself.
- Essential tools:
easy_installfor source-based installation.
What's new in Python 3.2?
These are highlights from Python's 'What's New' document:
- Stable ABI: Extension modules built for 3.2 can continue to work with 3.3, 3.4 and so on.
argparse, an improved alternative to
optparseincluded in Python 2.7, is now available in 3.2 as well.
concurrent.futures: Inspired by
java.util.concurrent.package, this module abstracts threads/processes/RPC-calls by way of abstract executors with support for status checks, timeouts, cancellations, callbacks, access to results or exceptions.
futuresmakes it easier to switch from one concurrent implementation to another (e.g. from thread to process pool). Take a look at the examples: parallel URL fetching via threads or computing prime numbers in parallel processes.
- PYC repository directories: Have you ever faced "
.pycconflicts" between multiple Python versions? Python 3.2 introduced a new bytecode caching mechanism:
foo.pycgets a new name:
.sofiles), properly fixing such conflicts even across different Python interpreter implementations.
- WSGI for Python 3: The WSGI spec is now adapted for Python3's bytes/text distinction. See PEP 3333 for details. The Bottle web framework already supports this. Other web frameworks (Django, Flask, Pyramid, ...) needs to be ported to Python 3 first.
Progress of Py3k porting
As of now over 300 packages have been ported to Python 3. This includes NumPy, setuptools, SQLAlchemy (database ORM), nose (unit testing), pylint (static code analyzer), bottle (web/WSGI framework), Cython, pyparsing, PyQt, lxml (pythonic XML processing), coverage, appscript (Apple Script), modwsgi, cx_Freeze and cx_Oracle.
If you want to port your (or someone else's) package to Python 3, start from the information in the Python Wiki.
Python 3 Cookbook
It is worth noting that the next O'Reilly Python Cookbook (3rd edition) will feature Python 3 recipes exclusively. Its editors, David Beazley and Brian Jones, are soliciting feedback and contribution of new recipes from you. So if you want your program to appear in the next edition, post your recipes to the ActiveState Python Recipes site. Be sure to catalogue your recipes as Python 3.
Trackback URL for this post: