Remove usage of six library from main Cinder code

Registered by Bhagyashri Shewale on 2020-06-02

The Python 2.7 Support has been dropped since Ussuri (*1).
Then replace usage of six (a Python 2 and 3 compatibility library) with code for Python 3.

1. Please do this as a series of small patches instead of one big monolithic patch.

2. The Cinder project has a policy that it is OK for drivers to continue to use six as long as any of the releasable stable branches support Python 2 in order to make backports easier. So until Train goes to Extended Maintenance, we are leaving it up to the driver maintainers to decide whether or not they would like to remove six from master.

*1: https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Blueprint information

Status:
Started
Approver:
Brian Rosmaita
Priority:
High
Drafter:
Bhagyashri Shewale
Direction:
Approved
Assignee:
xuanyandong
Definition:
Approved
Series goal:
Accepted for wallaby
Implementation:
Needs Code Review
Milestone target:
milestone icon wallaby-1
Started by
Brian Rosmaita on 2020-10-12

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.opendev.org/#/q/topic:bp/six-removal

Addressed by: https://review.opendev.org/755231
    Remove six

Addressed by: https://review.opendev.org/756417
    Remove six of dir cinder/api/*

Addressed by: https://review.opendev.org/756453
    Remove six of dir cinder/backup/*

Addressed by: https://review.opendev.org/756456
    Remove six of dir cinder/db/*

Addressed by: https://review.opendev.org/756468
    Remove six of dir cinder/image/*

Addressed by: https://review.opendev.org/756474
    Remove six of dir cinder/brick,cinder/common,cinder/interface,cinder/objects

Addressed by: https://review.opendev.org/756526
    Remove six of dir cinder/scheduler/*

Addressed by: https://review.opendev.org/756608
    Remove six of dir cinder/volume/*

Addressed by: https://review.opendev.org/756611
    Remove six in files under cinder/*

Addressed by: https://review.opendev.org/756612
    Remove six of dir cinder/tests/functional/*

Addressed by: https://review.opendev.org/756616
    Remove six of dir cinder/tests/unit/*

Addressed by: https://review.opendev.org/756621
    Remove six of dir cinder/tests/unit/backup/*

Addressed by: https://review.opendev.org/756623
    Remove six of dir cinder/tests/unit/image&objects/*

Addressed by: https://review.opendev.org/756624
    Remove six of dir cinder/tests/unit/policies&scheduler&targets/*

Addressed by: https://review.opendev.org/756640
    Remove six of files under cinder/test/unit

Addressed by: https://review.opendev.org/756898
    Import HTTPStatus instead of http_client

Addressed by: https://review.opendev.org/757876
    Import HTTPStatus instead of http_client (policy tests)

Addressed by: https://review.opendev.org/757972
    Refactor some unit tests

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.