Add Python 3 support to Cinder
It’s time to add Python 3 support to Cinder by generalizing the usage of the six module, in addition to the Python 2 support.
The goal is to make Cinder compatible with Python 3 at the end of the Liberty cycle.
For the rationale, the plan and work items, please see Nova Python 3 spec, since it's almost the same for Cinder:
http://
Summary of the plan:
* Write a few bunch of patches to fix the most obvious Python 3 syntax issues (dict.iteritems, 123L, reraise an exception, etc.) to allow to load unit tests
* Find a subset of unit tests which pass on Python 3.4 and add a py34 target in tox.ini to run them.
* Add a non-voting py34 check job running tox -e py34
* When the py34 check job becomes stable enough, make it voting. At this point, it's no more possible to add regressions on the Python 3 in the tests executed by tox -e py34
* Fix remaining tests one by one, each time add it to the py34 target of tox.ini
All Cinder dependencies are now compatible with Python 3! Latest changes related to dependencies:
* MySQL-python is not compatible with Python 3: it was replaced with PyMySQL, https:/
* rtslib-fb was not compatible with Python 3: Python 3 support was added in 2.1.56 by Victor Stinner
Python 3 patches for Cinder: https:/
For more information on Python 3, see the wiki page: https:/
Blueprint information
- Status:
- Complete
- Approver:
- Mike Perez
- Priority:
- Medium
- Drafter:
- Victor Stinner
- Direction:
- Approved
- Assignee:
- Victor Stinner
- Definition:
- Approved
- Series goal:
- Accepted for liberty
- Implementation:
- Implemented
- Milestone target:
- 7.0.0
- Started by
- Mike Perez
- Completed by
- Mike Perez
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
Replace basestring with six.string_types
Addressed by: https:/
Use six to fix imports on Python 3
Addressed by: https:/
Use six.reraise() for Python 3 compatibility
Addressed by: https:/
Get StringIO from six for Python 3 compatibility
Addressed by: https:/
Replace xrange() with six.moves.range()
Gerrit topic: https:/
Addressed by: https:/
Replace it.next() with next(it) for py3 compat
Addressed by: https:/
Drop L suffix from long integers
Addressed by: https:/
san driver: don't use relative Python import
Addressed by: https:/
Fix Python 3 issues in utils
Addressed by: https:/
Replace dict.iteritems() with dict.items()
Addressed by: https:/
Replace dict(obj.
Addressed by: https:/
Rewrite code merging two dictionaries
Addressed by: https:/
Replace dit.itervalues() with dict.values()
Addressed by: https:/
tox: add a basic py34 venv running a single test
Addressed by: https:/
Fix tox -e py34
Addressed by: https:/
Fix test_backup unit tests on Python 3
Addressed by: https:/
Port test_backup_ceph and test_rbd to Python 3
Addressed by: https:/
Fix Python 3 issues in the blockbridge driver
Addressed by: https:/
Fix Python 3 issues in the swift backup driver
Addressed by: https:/
Port dothill to Python 3
Addressed by: https:/
Port hitachi driver to Python 3
Addressed by: https:/
Port huawei driver to Python 3
Addressed by: https:/
Port IBM driver to Python 3
Addressed by: https:/
Port test_db_api to Python 3
Addressed by: https:/
Port remotefs driver to Python 3
Addressed by: https:/
Port drbdmanagedrv driver to Python 3
Addressed by: https:/
Port image/glance.py to Python 3
Addressed by: https:/
Fix Python 3 issues in targets unit tests
Addressed by: https:/
Fix Python 3 issues in cmd
Addressed by: https:/
Fix Python 3 issues in HDS tests
Addressed by: https:/
Fix Python 3 issues in Windows tests
Addressed by: https:/
Port more unit tests to Python 3
Addressed by: https:/
Port test_nfs to Python 3
Addressed by: https:/
Port volume transfer to Python 3
Addressed by: https:/
Python 3 incompatible expression fix
Addressed by: https:/
py3: Port pure driver test to Python 3
Addressed by: https:/
Fix Python 3 issues in wsgi
Addressed by: https:/
Port test_volume to Python 3
Addressed by: https:/
Fix volume throttling to Python 3
Addressed by: https:/
emc vmac driver: use integer division for Python 3
Addressed by: https:/
Fix various Python 3 issues
Addressed by: https:/
Port scheduler host manager to Python 3
Addressed by: https:/
Port netapp SSC Cmode to Python 3
Addressed by: https:/
Port test_netapp to Python 3
Addressed by: https:/
Port test_quobyte to Python 3
Addressed by: https:/
py3: Run unit tests with ostestr on Python 3.4
Addressed by: https:/
Port test_srb to Python 3
Addressed by: https:/
Port WSGI tests to Python 3
Addressed by: https:/
Port API to Python 3
Addressed by: https:/
Port API types extra specs to Python 3
Addressed by: https:/
Port image cache to Python 3
Addressed by: https:/
Port EMC scaleio to Python 3
Addressed by: https:/
Port violin driver to Python 3
Addressed by: https:/
Port _transfer_data() to Python 3
Addressed by: https:/
Port targets test_iet_driver to Python 3
Addressed by: https:/
Port IBM flashsystem to Python 3
Addressed by: https:/
Port API admin action tests to Python 3
Addressed by: https:/
WIP: Fix Python 3 issues in EMC vnx client
Addressed by: https:/
Port Windows drivers to Python 3
Addressed by: https:/
Port SolidFire to Python3
Addressed by: https:/
Modify test_hp3par to support random hash
Addressed by: https:/
Port HP 3part driver to Python 3
Addressed by: https:/
Port xio driver to Python 3
Addressed by: https:/
Port vmware datastore to Python 3
Addressed by: https:/
Port test_tintri to Python 3
Addressed by: https:/
Port cinder.
Addressed by: https:/
Port cinder.hacking to Python 3
Addressed by: https:/
Fix error handling in prophetstor driver
Addressed by: https:/
Port vzstorage to Python 3
Addressed by: https:/
Port zfssa driver to Python 3
Addressed by: https:/
Port IBM storewize_svc driver to Python 3
Addressed by: https:/
Port EMC Vmax to Python 3
Addressed by: https:/
Port key manager to Python 3
Addressed by: https:/
Port zonemanager to Python 3
Addressed by: https:/
Test middleware test_faults to Python 3
Addressed by: https:/
Revert "Port xio driver to Python 3"
Addressed by: https:/
xio: fix regression in authentication
Addressed by: https:/
Python 3: fix cinder.
Addressed by: https:/
Python 3: fix cinder.
Addressed by: https:/
Python 3: fix cinder.
Addressed by: https:/
Python 3: Use oslo_serializat
Addressed by: https:/
Python 3: fix cinder.
Addressed by: https:/
Python 3: fix cinder.
Addressed by: https:/
Python3: fix cinder.
Addressed by: https:/
Python 3: fix cinder.
Addressed by: https:/
Python 3: fix cinder.
Addressed by: https:/
Python 3: fix a lot of tests
Addressed by: https:/
Use six.moves.reduce instead of builtin reduce
Gerrit topic: https:/
Addressed by: https:/
Fix: range() is not the same in py3.x and py2.x
Addressed by: https:/
Port objects unit tests to Python 3
Addressed by: https:/
Port backup drivers to Python 3
Addressed by: https:/
Port API v1 to Python 3
Addressed by: https:/
hacking: Fix false positive in C302 check
Addressed by: https:/
Port volume_
Addressed by: https:/
Port utils.safe_
Addressed by: https:/
py3: Fix usage of JSON in API contrib
Addressed by: https:/
Port hgst driver to Python 3
Gerrit topic: https:/
Addressed by: https:/
Port test_emc_vnx to Python 3
Addressed by: https:/
Port netapp dataontap driver to Python 3
Addressed by: https:/
Fix last Python 3 issues in zonemanager
Addressed by: https:/
Enable all unit tests on Python 3.4
Addressed by: https:/
Replace unicode with six.text_type