Python 3 compatibility

Registered by ChangBo Guo(gcb)

This blueprint has been superseded. See the newer blueprint "Get Keystone Running in Python 3" for updated plans.

We will move to Python 3 in the future. More and more openstack projects are Python 3 compatible, especially the new stackforge projects. This main idea of this blueprint is using library six [1] to make the Keystone codes run both in Python 2 and Python 3.

[1]http://pythonhosted.org/six/

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
ChangBo Guo(gcb)
Direction:
Needs approval
Assignee:
ChangBo Guo(gcb)
Definition:
Superseded
Series goal:
None
Implementation:
Good progress
Milestone target:
None
Started by
Dolph Mathews
Completed by
Morgan Fainberg

Related branches

Sprints

Whiteboard

I'd love to see this completed in icehouse, but how realistic is that goal? Should this be 'ongoing' instead? Should the abandoned reviews above be restored? I also set a conservative Implementation status; please revise if you think there's a more accurate choice. -Dolph

We need Python 3 Jekins job support from CI infrastructure team , otherwise we are just fixing "KNOWN" Python 3 compatible issues, potential blockers still be there. I will try my best to make Keystone moved to Python 3 smoothly, but can't guarantee that if we can't test in Python 3. the abandoned reviews was abandoned on purpose(just removed them from the whiteboard), we decide to use six not oslo py3kcompat module. -gcb

Agree, I'd like to have a py33 gate job running and passing to consider this blueprint as Implemented. If it doesn't look like that's going to happen by the end of icehouse, we can retarget this to "ongoing" -Dolph

Gerrit topic: https://review.openstack.org/#q,topic:bp/keystone-py3kcompat,n,z

Addressed by: https://review.openstack.org/67453
    Replace urllib/urlparse with six.moves.*

Addressed by: https://review.openstack.org/67457 (merged)
    Use six.string_types replace basestring

Addressed by: https://review.openstack.org/67469 (merged)
    Use six.text_types replace unicode

Addressed by: https://review.openstack.org/68116 (merged)
    Use six to make dict work in Python 2 and Python 3

Addressed by: https://review.openstack.org/68527 (merged)
    Unify StringIO usage with six.StringIO

Addressed by: https://review.openstack.org/68568 (abandoned)
    Fix urllib2 compatibility in test

Addressed by: https://review.openstack.org/70384 (abandoned)
    override the range() builtin with six.moves.range

Gerrit topic: https://review.openstack.org/#q,topic:(detached,n,z

Addressed by: https://review.openstack.org/69795 (merged)
    Sync oslo's policy module

Addressed by: https://review.openstack.org/70816
    Overrides filter builtin using six

Addressed by: https://review.openstack.org/83832
    Moves database setup/teardown closer to its usage

Addressed by: https://review.openstack.org/83833
    wip: this needs to be made in oslo

Addressed by: https://review.openstack.org/83834
    First real Python 3 tests

Addressed by: https://review.openstack.org/83565
    Make the py33 Jenkins job happy

Addressed by: https://review.openstack.org/261253
    Replace unicode with six.text_type

Addressed by: https://review.openstack.org/264947
    Fix py34 problems in test_middleware

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.