Replace six.iteritems() with .items()

Registered by Spencer Yu

Replace six.iteritems() with .items()

1.As mentioned in [1], we should avoid using six.iteritems to achieve iterators. We can use dict.items instead, as it will return iterators in PY3 as well. And dict.items/keys will be more readable.

2.In py2, the performance about list should be negligible, see the link [2].

[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

I register this BP in launchpad because the code affected in nova is huge. So it will be reasonable to split the code changes into several patches. See https://review.openstack.org/#/c/411752/

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
Spencer Yu
Direction:
Needs approval
Assignee:
Spencer Yu
Definition:
Review
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Spencer Yu
Completed by
Spencer Yu

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/replace-iteritems-with-items,n,z

Addressed by: https://review.openstack.org/413431
    [1/3]Replace six.iteritems() with .items()

Addressed by: https://review.openstack.org/413470
    [2/3]Replace six.iteritems() with .items()

Addressed by: https://review.openstack.org/413513
    [3/3]Replace six.iteritems() with .items()

Addressed by: https://review.openstack.org/415080
    [3/3]Replace six.iteritems() with .items()

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.