dict.keys() compatibility in Python 2 and 3

Bug #1556350 reported by Tang Chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Medium
Tang Chen

Bug Description

In Python 2, dict.keys() will return a list. But in Python 3, it will return an iterator. So we need to fix all the assumptions that assuming dict.keys() is a list.

Tang Chen (tangchen)
Changed in python-openstackclient:
assignee: nobody → Tang Chen (tangchen)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/291973

Changed in python-openstackclient:
status: New → In Progress
Changed in python-openstackclient:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/291973
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=dc7e4fc15d80eed5a814f0b87e1860f0cd86c2ee
Submitter: Jenkins
Branch: master

commit dc7e4fc15d80eed5a814f0b87e1860f0cd86c2ee
Author: Tang Chen <email address hidden>
Date: Sat Mar 12 10:58:28 2016 +0800

    Fix dict.keys() compatibility for python 3

    In Python 2, dict.keys() will return a list.
    But in Python 3, it will return an iterator.
    So we need to fix all the places that assuming
    dict.keys() is a list.

    Change-Id: I8d1cc536377b3e5c644cfaa0892e40d0bd7c11b1
    Closes-Bug: #1556350

Changed in python-openstackclient:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-openstackclient 2.4.0

This issue was fixed in the openstack/python-openstackclient 2.4.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.