Python 3 compatibility
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.
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
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:/
Addressed by: https:/
Replace urllib/urlparse with six.moves.*
Addressed by: https:/
Use six.string_types replace basestring
Addressed by: https:/
Use six.text_types replace unicode
Addressed by: https:/
Use six to make dict work in Python 2 and Python 3
Addressed by: https:/
Unify StringIO usage with six.StringIO
Addressed by: https:/
Fix urllib2 compatibility in test
Addressed by: https:/
override the range() builtin with six.moves.range
Gerrit topic: https:/
Addressed by: https:/
Sync oslo's policy module
Addressed by: https:/
Overrides filter builtin using six
Addressed by: https:/
Moves database setup/teardown closer to its usage
Addressed by: https:/
wip: this needs to be made in oslo
Addressed by: https:/
First real Python 3 tests
Addressed by: https:/
Make the py33 Jenkins job happy
Addressed by: https:/
Replace unicode with six.text_type
Addressed by: https:/
Fix py34 problems in test_middleware