Let Oslo code compatible with Python 3

Registered by ChangBo Guo(gcb) on 2013-11-25

Though we only run Oslo code in Python2.6 and Python2.7, not in Python3. Some incubation and stackforge projects were enforced in Python3. They suffer from Python3 compatible issue . They must make change in Oslo first, then pass in their projects. This is an example [1]. This blueprint will follow tips in [2] to fix compatibility bug.

[1] https://review.openstack.org/#/c/58070/
[2] http://pythonhosted.org/six/

Blueprint information

Status:
Started
Approver:
Ben Nemec
Priority:
Undefined
Drafter:
ChangBo Guo(gcb)
Direction:
Needs approval
Assignee:
ChangBo Guo(gcb)
Definition:
Approved
Series goal:
None
Implementation:
Started
Milestone target:
None
Started by
ChangBo Guo(gcb) on 2013-11-26

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/make-python3-compatible,n,z

Addressed by: https://review.openstack.org/58245
    Use six.moves.configparser instead of ConfigParser

Addressed by: https://review.openstack.org/58258
    Replace removed items in Python3

Addressed by: https://review.openstack.org/58541
    Unify different names between Python2/3 with six.moves

Addressed by: https://review.openstack.org/58920
    Use six.iteritems for python 3.3 support in apiclient module

Addressed by: https://review.openstack.org/58808
    Encode response from FakeHTTPClient

Addressed by: https://review.openstack.org/58978
    Use six.iteritems to make dict work on Python2/3

Addressed by: https://review.openstack.org/59183
    Replace data structures' attribute with six module

Addressed by: https://review.openstack.org/59349
    Use urlutils functions instead of urllib/urllib2

Addressed by: https://review.openstack.org/55606
    Add basic Python 3 tests

Addressed by: https://review.openstack.org/63064
    Fix filter() usage due to python 3 compability

Addressed by: https://review.openstack.org/63367
    Remove string.lowercase usage

Addressed by: https://review.openstack.org/63436
    Use six.seraise() instead of `raise exc, val, tb`

Addressed by: https://review.openstack.org/64428
    Fixed usage of strutils.safe_encode due to py3

Addressed by: https://review.openstack.org/66278
    Run tests/unit/test_funcutils.py in PY3 enviroment

Addressed by: https://review.openstack.org/71577
    Fix usage of dict.keys in apiclient.exceptions

Addressed by: https://review.openstack.org/71596
    tests: set a default for lockutils

Addressed by: https://review.openstack.org/72963
    Use `six.text_type` instead of `str` in cliutils

Addressed by: https://review.openstack.org/74106
    Remove test_compat.py from py33 tests

Addressed by: https://review.openstack.org/74433
    cliutils: Python 3 support

Addressed by: https://review.openstack.org/74728
    fileutils: port to Python 3

Addressed by: https://review.openstack.org/75330
    Python3: define a __next__() method for ModelBase

Addressed by: https://review.openstack.org/75341
    Run tests for apiclient with python3

Addressed by: https://review.openstack.org/80321
    Python3: do not use contextlib.nested()

Addressed by: https://review.openstack.org/80370
    Python3: enable test_jsonutils.py

Addressed by: https://review.openstack.org/90532
    Activate tests.unit.test_imageutils under Python3

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.