Make built-ins return an iterator where appropriate (e.g. range(), zip(), map(), filter(), etc.)
Remove input() and rename raw_input() to input(). If you need the old input(), use eval(input()).
Introduce trunc(), which would call the __trunc__() method on its argument; suggested use is for objects like float where calling __int__() has data loss, but an integral representation is still desired
Exception hierarchy changes
Add a bin() function for a binary representation of integers
Python 3.0 will break backwards compatibility with Python 2.x.
There is no requirement that Python 2.6 code will run unmodified on Python 3.0. Not even a subset.
Python 2.6 will support forward compatibility in the following two ways:
It will support a "Py3k warnings mode" which will warn dynamically (i.e. at runtime) about features that will stop working in Python 3.0, e.g. assuming that range() returns a list.
It will contain backported versions of many Py3k features, either enabled through __future__ statements or simply by allowing old and new syntax to be used side-by-side (if the new syntax would be a syntax error in 2.x).
The recommended development model for a project that needs to support Python 2.6 and 3.0 simultaneously is as follows:
You should have excellent unit tests with close to full coverage.
Port your project to Python 2.6.
Turn on the Py3k warnings mode.
Test and edit until no warnings remain.
Use the 2to3 tool to convert this source code to 3.0 syntax. Do not manually edit the output!
Test the converted source code under 3.0.
If problems are found, make corrections to the 2.6 version of the source code and go back to step 3.
When it's time to release, release separate 2.6 and 3.0 tarballs (or whatever archive form you use for releases).
It is recommended not to edit the 3.0 source code until you are ready to reduce 2.6 support to pure maintenance (i.e. the moment when you would normally move the 2.6 code to a maintenance branch anyway).
Automatically find/download/install/upgrade dependencies at build time using the EasyInstall tool , which supports downloading via HTTP, FTP, Subversion, and SourceForge, and automatically scans web pages linked from PyPI to find download links. (It's the closest thing to CPAN currently available for Python.)
Create Python Eggs - a single-file importable distribution format
virtualenv is a tool to create isolated Python environments. The basic usage is:
$ python virtualenv.py ENV
This creates ENV/lib/python2.4/site-packages , where any libraries you install will go. It also creates ENV/bin/python, which is a Python interpreter that uses this environment. Allows bootstrap scripts that prepare environment. Alternatives: