Difference between revisions of "Python3"
JulienDanjou (talk | contribs) |
|||
Line 1: | Line 1: | ||
This page tracks the progress of Python 3 effort porting for OpenStack. | This page tracks the progress of Python 3 effort porting for OpenStack. | ||
+ | |||
+ | == Python 3 == | ||
+ | |||
+ | [http://techs.enovance.com/6521/openstack_python3 Why should OpenStack move to Python 3 right now?] | ||
+ | :''Python 3 is usually seen as the new Python version which breaks compatibility and raises new Unicode issues. Python 3 is much more than that. It’s a new clean language which has a more consistent syntax. It has many new features, not less than 15 new modules. Python 3 is already well supported by major Linux distributions, whereas Python 2.7 reached its end-of-life. Slowly, some bugs cannot be fixed in Python 2.7 anymore and are only fixed in the latest Python 3 release. Python 3 is now 5 years old and considered as a mature programming language.'' | ||
+ | |||
+ | == Port Python 2 code to Python 3 == | ||
+ | |||
+ | OpenStack project chose to use the same code base for Python 2 and Python 3. The [http://pythonhosted.org/six/ Six: Python 2 and 3 Compatibility Library] helps to write code working on both versions. | ||
+ | |||
+ | References to port Python 2 code to Python 3: | ||
+ | * [http://python3porting.com/ Porting to Python 3 Book] by Lennart Regebro, especially the [http://python3porting.com/differences.html Language differences and workarounds]. | ||
+ | * [http://docs.python.org/dev/howto/pyporting.html HOWTO: Porting Python 2 Code to Python 3] by Brett Cannon | ||
+ | * [https://wiki.python.org/moin/PortingPythonToPy3k Porting Python Code to 3.x] | ||
+ | * [http://code.google.com/p/python-incompatibility/ python-incompatibility]: Demonstrates incompatibilities between Python versions. | ||
+ | |||
+ | == Python 3 of OpenStack Depedencies == | ||
+ | |||
+ | * mox: use mox3 or port tests on mock which works on Python 3 (mock has been integrated in Python 3.3 as unittest.mock) | ||
+ | * eventlet: not available on Python 3 yet, alternatives: [http://docs.python.org/dev/library/asyncio.html asyncio] ([http://code.google.com/p/tulip/ Tulip] for Python 3.3+/[https://bitbucket.org/haypo/trollius Trollius] for Python 2), [http://www.tornadoweb.org/ Tornado] | ||
+ | |||
+ | == Portage in progress == | ||
+ | |||
+ | * Oslo Messaging: Portage in Progress by Victor Stinner ([https://review.openstack.org/#/dashboard/9107 dashboard]) | ||
+ | * keystoneclient: Portage in Progress by Cyril Roelandt ([https://review.openstack.org/#/dashboard/8122 dashboard]) | ||
+ | |||
+ | == Python 3 Status of OpenStack projects == | ||
See also [[Python3Deps]]. | See also [[Python3Deps]]. | ||
Line 22: | Line 49: | ||
|} | |} | ||
− | == | + | == Reports at OpenStack Summits == |
* Havana summit notes: https://etherpad.openstack.org/p/havana-python3 | * Havana summit notes: https://etherpad.openstack.org/p/havana-python3 | ||
* Icehouse summit notes: https://etherpad.openstack.org/p/IcehousePypyPy3 | * Icehouse summit notes: https://etherpad.openstack.org/p/IcehousePypyPy3 |
Revision as of 10:48, 7 January 2014
This page tracks the progress of Python 3 effort porting for OpenStack.
Contents
Python 3
Why should OpenStack move to Python 3 right now?
- Python 3 is usually seen as the new Python version which breaks compatibility and raises new Unicode issues. Python 3 is much more than that. It’s a new clean language which has a more consistent syntax. It has many new features, not less than 15 new modules. Python 3 is already well supported by major Linux distributions, whereas Python 2.7 reached its end-of-life. Slowly, some bugs cannot be fixed in Python 2.7 anymore and are only fixed in the latest Python 3 release. Python 3 is now 5 years old and considered as a mature programming language.
Port Python 2 code to Python 3
OpenStack project chose to use the same code base for Python 2 and Python 3. The Six: Python 2 and 3 Compatibility Library helps to write code working on both versions.
References to port Python 2 code to Python 3:
- Porting to Python 3 Book by Lennart Regebro, especially the Language differences and workarounds.
- HOWTO: Porting Python 2 Code to Python 3 by Brett Cannon
- Porting Python Code to 3.x
- python-incompatibility: Demonstrates incompatibilities between Python versions.
Python 3 of OpenStack Depedencies
- mox: use mox3 or port tests on mock which works on Python 3 (mock has been integrated in Python 3.3 as unittest.mock)
- eventlet: not available on Python 3 yet, alternatives: asyncio (Tulip for Python 3.3+/Trollius for Python 2), Tornado
Portage in progress
- Oslo Messaging: Portage in Progress by Victor Stinner (dashboard)
- keystoneclient: Portage in Progress by Cyril Roelandt (dashboard)
Python 3 Status of OpenStack projects
See also Python3Deps.
Project | Python 3 compatibility | CI tests running? | Blocked by | Comment |
---|---|---|---|---|
oslo.config | OK | https://review.openstack.org/#/c/37426/ | ||
pbr | OK | https://review.openstack.org/#/c/37426/ | ||
oslo-incubator | In progress | No |
|
Being worked on by Chuck Short and Julien Danjou |
Reports at OpenStack Summits
- Havana summit notes: https://etherpad.openstack.org/p/havana-python3
- Icehouse summit notes: https://etherpad.openstack.org/p/IcehousePypyPy3