[openstack-dev] Python 3

Brian Curtin brian.curtin at RACKSPACE.COM
Wed Jul 24 18:16:37 UTC 2013


On Jul 23, 2013, at 4:32 PM, Doug Hellmann <doug.hellmann at dreamhost.com<mailto:doug.hellmann at dreamhost.com>> wrote:




On Tue, Jul 23, 2013 at 4:41 PM, Logan McNaughton <logan at bacoosta.com<mailto:logan at bacoosta.com>> wrote:

I'm sure this has been asked before, but what exactly is the plan for Python 3 support?

Is the plan to support 2 and 3 at the same time? I was looking around for a blue print or something but I can't seem to find anything.

If Python 3 support is part of the plan, can I start running 2to3 and making edits to keep changes compatible with Python 2?

Eric replied with details, but I wanted to address the question of 2to3.

Using 2to3 is no longer the preferred way to port to Python 3. With changes that landed in 3.3, it is easier to create code that will run under python 2.7 and 3.3, without resorting to the translation steps that were needed for 3.0-3.2. Chuck Short has landed a series of patches modifying code by hand for some cases (mostly print and exceptions) and by using the six library in others (for iteration and module renaming).

Speaking of preferred ways to port, has there been any discussion about which version takes precedence when we have to do different things? For example, with imports, should we be trying the 2.x name first and falling back to 3.x on ImportError, or vice versa?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130724/f315ee93/attachment.html>


More information about the OpenStack-dev mailing list