Make dict.keys() PY3 compatible
Bug #1583419 reported by
xiexs
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Undecided
|
Dinesh Bhor | ||
Rally |
Fix Released
|
Undecided
|
Yafei Yu | ||
networking-l2gw |
Fix Released
|
Undecided
|
qinchunhua | ||
neutron |
Fix Released
|
Undecided
|
Bin Zhou | ||
python-cinderclient |
Fix Released
|
Undecided
|
xiexs | ||
python-manilaclient |
Fix Released
|
Undecided
|
Dinesh Bhor | ||
python-troveclient |
Fix Released
|
Undecided
|
Dinesh Bhor | ||
tacker |
Fix Released
|
Undecided
|
qinchunhua | ||
watcher |
Fix Released
|
Undecided
|
weiweigu |
Bug Description
In PY3, dict.keys() will return a view of list but not a list anymore, i.e.
$ python3.4
Python 3.4.3 (default, Mar 31 2016, 20:42:37)
>>> body={"11":"22"}
>>> body[body.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'dict_keys' object does not support indexing
so for py3 compatible we should change it as follows:
>>> body[list(
'22'
Changed in python-cinderclient: | |
assignee: | nobody → xiexs (xiexs) |
status: | New → In Progress |
Changed in cinder: | |
assignee: | nobody → Dinesh Bhor (dinesh-bhor) |
Changed in python-manilaclient: | |
assignee: | nobody → Dinesh Bhor (dinesh-bhor) |
Changed in nova: | |
assignee: | nobody → Dinesh Bhor (dinesh-bhor) |
Changed in python-troveclient: | |
status: | New → In Progress |
Changed in python-troveclient: | |
assignee: | Dinesh Bhor (dinesh-bhor) → Peter Stachowski (peterstac) |
Changed in python-troveclient: | |
assignee: | Peter Stachowski (peterstac) → Dinesh Bhor (dinesh-bhor) |
Changed in rally: | |
assignee: | nobody → yuyafei (yu-yafei) |
Changed in neutron: | |
assignee: | nobody → Bin Zhou (binzhou) |
Changed in ceilometer: | |
assignee: | nobody → liuwei (liu-wei81) |
Changed in heat: | |
assignee: | nobody → liuwei (liu-wei81) |
Changed in python-ceilometerclient: | |
assignee: | nobody → liuwei (liu-wei81) |
Changed in python-heatclient: | |
assignee: | nobody → liuwei (liu-wei81) |
Changed in ceilometer: | |
status: | New → In Progress |
Changed in python-glanceclient: | |
assignee: | nobody → Ji.Wei (jiwei) |
Changed in tempest: | |
assignee: | nobody → Ji.Wei (jiwei) |
no longer affects: | heat |
no longer affects: | nova |
no longer affects: | ceilometer |
no longer affects: | python-ceilometerclient |
no longer affects: | python-heatclient |
no longer affects: | python-glanceclient |
Changed in tacker: | |
assignee: | nobody → Yan Songming (songmingyan) |
status: | New → Incomplete |
affects: | tacker → python-novaclient |
Changed in python-novaclient: | |
status: | Incomplete → In Progress |
no longer affects: | python-novaclient |
Changed in neutron: | |
assignee: | Bin Zhou (binzhou) → QunyingRan (ran-qunying) |
Changed in tacker: | |
assignee: | nobody → qinchunhua (qin-chunhua) |
status: | New → In Progress |
Changed in neutron: | |
assignee: | QunyingRan (ran-qunying) → Bin Zhou (binzhou) |
no longer affects: | tempest |
Changed in watcher: | |
assignee: | nobody → weiweigu (gu-weiwei) |
tags: | added: neutron-proactive-backport-potential |
Changed in networking-l2gw: | |
status: | New → Fix Released |
assignee: | nobody → qinchunhua (qin-chunhua) |
tags: | removed: neutron-proactive-backport-potential |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/293388 /git.openstack. org/cgit/ openstack/ python- cinderclient/ commit/ ?id=219c334f016 9fe485b05bb9e5a e99edd9685dfb1
Committed: https:/
Submitter: Jenkins
Branch: master
commit 219c334f0169fe4 85b05bb9e5ae99e dd9685dfb1
Author: xiexs <email address hidden>
Date: Thu May 19 00:11:50 2016 -0400
Make dict.keys() PY3 compatible
The dict.keys()[0] will raise a TypeError in PY3,
as dict.keys() doesn't return a list any more in PY3
but a view of list.
Change-Id: Ia6c0783ca8c851 4a06defbeed0fa9 ef24bbd9d4a
Closes-Bug: #1583419