Python’s New Release Bridges the Gap

The open source Python programming language is on the verge a sweeping revamp in the form of version 3.0 of its platform — a release will deviate in many ways from the current, mainline Python 2.x series.

So how do you meet the needs of current 2.x Python developers while transitioning to the bleeding edge of Python 3.0 development? That’s where the new Python 2.6 release comes into play.

Python 2.6 is intended to help ease the migration of Python 2.x developers to Python 3.0, a major redesign of the language that’s about revisiting earlier design decisions that are now considered flaws — and fixing them, David Goodger, an officer of the Python Software Foundation, told As yet, no date has been set for the release of Python 3.0.

The move comes as the market for Python use is expanding, thanks its use on Google’s AppEngine and enterprise adoption is on the rise. Growing adoption, however, means that a growing population could be impacted with dramatic shifts in the project — an impact that Python 2.6 aims to soften.

“Python 2.6 isn’t about Python 3 compatibility, it’s about Python 2.x compatibility,” Goodger said. “We are not expecting or encouraging developers to migrate to Python 3 immediately, and the Python 2.x line will continue to be supported and improved for years to come. Python 2.6 is an upgrade intended for most developers of production systems. Python 3.0 is for those who like to live on the bleeding edge.”

He added that design aspects of Python 2.6 pave the way for migration to Python 3.0, a release with enhancements he sees as improving the foundations of Python going forward.

Kevin Dangoor, co-author of “Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites,” told that, in his opinion, Python 2.6 is a huge release — probably the biggest since Python 2.2. For him, too, the key to Python 2.6 is the fact that it is a stepping stone to Python 3.0.

“In many cases, Python 2.6 lets you selectively use Python 3.0 features today, without sacrificing compatibility with existing libraries,” Dangoor said. “For example, you can use the new Unicode literals or print function just with a simple import statement.”

Python 2.6 also includes new support for multiprocessing in multicore CPU machines, as well as improved AJAX capabilities by way of including JavaScript Object Notation in the standard Python library.

Backward compatibility has been a key hallmark of Python development overall. Python founder Guido van Rossum explained to that migrating from Python 2.5 to 2.6 should be as easy as migrating from Python 2.4 to 2.5, which he said had been an easy transition.

“Once you have your code running on 2.6, you can start getting ready for 3.0 in a number of ways,” Van Rossum said. “In particular, you can turn on ‘Py3k warnings,’ which will warn you about obsolete usage patterns for which alternatives already exist in 2.6. You can then change your code to use the modern alternative, and this will make you more ready for 3.0.”

Van Rossum is currently employed by Google, a company that is increasingly using Python for its own projects — among them the recently released Google App Engine platform. Google, however, will not be an early adopter of the latest Python release, at least for App Engine.

“There are no direct plans to start using Python 2.6 in App Engine yet,” Van Rossum said.

Instead, migrating to the Python 3.0 model of Python development is something that will take time. Goodger noted that in his view, the biggest challenge for Python 3.0 adoption will be exercising restraint.

“Developers who want to migrate their applications should go slowly,” he said. “It will take some time, probably years, before Python 3.x takes over from Python 2.x. Most applications rely on third-party libraries, which have to migrate first. Some applications need never migrate to Python 3. Python 2.x isn’t going away.”

Currently, Python 3.0 remains in development with a release expected soon, though Goodger declined to provide precise timing for its debut.

“I expect the final release of Python 3.0 within the next month or so, but the actual date will be determined by the state of the codebase,” Goodger said. “Python 3.0 will ship when it’s ready, and not before.”

News Around the Web