]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Replace dict.iteritems() with dict.items()
authorVictor Stinner <vstinner@redhat.com>
Fri, 12 Jun 2015 12:53:05 +0000 (14:53 +0200)
committerVictor Stinner <vstinner@redhat.com>
Fri, 12 Jun 2015 13:18:57 +0000 (15:18 +0200)
commit55eca11e07b2f82beeaef24e2f969fa7f44621cf
treef59f8af9b1f6fe827511a5c852f958a1fbe2398b
parent28c52a82a21082db23ad4b4505bf313459366549
Replace dict.iteritems() with dict.items()

This change adds Python 3 compatibility to the modified code.

Replace also six.iteritems(obj) with obj.items().

The iteritems() method of Python 2 dictionaries was renamed to items()
on Python 3. As discussed on the openstack-dev mailing list, iteritems()
must be replaced with items(), six.iteritems() should not be used. In
OpenStack, the overhead of creating a temporary list with dict.items()
on Python 2 is negligible.

Blueprint cinder-python3
Change-Id: Ic3d8fd6b71d2c9f21929b0d6bf68c8f84a5e2567
55 files changed:
cinder/api/contrib/hosts.py
cinder/api/contrib/used_limits.py
cinder/api/extensions.py
cinder/api/v1/volumes.py
cinder/api/v2/volumes.py
cinder/api/views/limits.py
cinder/backup/drivers/tsm.py
cinder/cmd/manage.py
cinder/consistencygroup/api.py
cinder/db/sqlalchemy/api.py
cinder/exception.py
cinder/scheduler/flows/create_volume.py
cinder/test.py
cinder/tests/unit/api/contrib/test_used_limits.py
cinder/tests/unit/api/contrib/test_volume_type_access.py
cinder/tests/unit/api/fakes.py
cinder/tests/unit/fake_driver.py
cinder/tests/unit/scheduler/fakes.py
cinder/tests/unit/test_cmd.py
cinder/tests/unit/test_db_api.py
cinder/tests/unit/test_ibm_flashsystem.py
cinder/tests/unit/test_ibm_flashsystem_iscsi.py
cinder/tests/unit/test_ibm_xiv_ds8k.py
cinder/tests/unit/test_ibmnas.py
cinder/tests/unit/test_netapp.py
cinder/tests/unit/test_netapp_ssc.py
cinder/tests/unit/test_storwize_svc.py
cinder/tests/unit/test_volume_glance_metadata.py
cinder/tests/unit/test_volume_types.py
cinder/tests/unit/test_volume_types_extra_specs.py
cinder/tests/unit/test_wsgi.py
cinder/tests/unit/volume/drivers/netapp/dataontap/test_block_driver_interfaces.py
cinder/tests/unit/volume/drivers/netapp/test_common.py
cinder/utils.py
cinder/volume/api.py
cinder/volume/drivers/block_device.py
cinder/volume/drivers/cloudbyte/cloudbyte.py
cinder/volume/drivers/emc/scaleio.py
cinder/volume/drivers/huawei/rest_common.py
cinder/volume/drivers/ibm/flashsystem.py
cinder/volume/drivers/ibm/storwize_svc/__init__.py
cinder/volume/drivers/ibm/storwize_svc/helpers.py
cinder/volume/drivers/netapp/utils.py
cinder/volume/drivers/remotefs.py
cinder/volume/drivers/san/hp/hp_3par_common.py
cinder/volume/drivers/san/hp/hp_3par_iscsi.py
cinder/volume/drivers/san/hp/hp_lefthand_rest_proxy.py
cinder/volume/drivers/smbfs.py
cinder/volume/drivers/solidfire.py
cinder/volume/drivers/storpool.py
cinder/volume/drivers/xio.py
cinder/volume/flows/api/create_volume.py
cinder/volume/qos_specs.py
cinder/volume/volume_types.py
cinder/wsgi.py