Python 3.x Compatibility - convert x.iteritems to six.iteritems(x)

Bug #1282888 reported by Rabi Mishra
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Low
Peter Razumovsky

Bug Description

I noticed that in many places heat x.iteritems() calls should to be changed to six.iteritems(x) for python 3.x compatibility.

Files requiring change:

/heat/heat/api/cloudwatch/watch.py
/heat/heat/api/openstack/v1/util.py
/heat/heat/common/exception.py
/heat/heat/common/wsgi.py
/heat/heat/db/sqlalchemy/filters.py
/heat/heat/db/sqlalchemy/models.py
/heat/heat/engine/dependencies.py
/heat/heat/engine/environment.py
/heat/heat/engine/hot.py
/heat/heat/engine/parameters.py
/heat/heat/engine/properties.py
/heat/heat/engine/resource.py
heat/heat/engine/resources/__init__.py
/heat/heat/engine/scheduler.py
/heat/heat/engine/service.py
/heat/heat/engine/template.py
/heat/heat/engine/update.py
/heat/heat/openstack/common/jsonutils.py

Some contrib and unit-tests should also be changed.
/heat/contrib/docker/resources/docker_container.py
/heat/contrib/rackspace/resources/cloud_loadbalancer.py

Rabi Mishra (rabi)
Changed in heat:
assignee: nobody → Rabi Mishra (ramishra)
Revision history for this message
Thomas Herve (therve) wrote :

IMHO, it's way too early to look at those kind of problems. Until all the libraries Heat uses are ported, working on Heat code itself has little benefit, as we can reintroduce iteritems very easily. Maybe you should work on the hacking library so that it reports using iteritems as error.

Revision history for this message
Rabi Mishra (rabi) wrote :

Sure, we can keep this on hold, till we have a proper direction on Python 3.x compatibility. I think other than oslo, not other project is compatible yet.

Changed in heat:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Angus Salkeld (asalkeld) wrote :

we could start with this now, if anyone is interested. I'll reset the in-progress to get some more interest.

Changed in heat:
assignee: Rabi Mishra (rabi) → nobody
Changed in heat:
assignee: nobody → Razumovsky Peter (prazumovsky)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/138782
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=b3c6fc778afdac256ae688303b974bbd75599ad9
Submitter: Jenkins
Branch: master

commit b3c6fc778afdac256ae688303b974bbd75599ad9
Author: Peter Razumovsky <email address hidden>
Date: Wed Dec 3 19:43:15 2014 +0300

    Convert x.iteritems() to six.iteritems(x)

    Convert x.iteritems() to six.iteritems(x) for
    python 3.x compatibility.

    Change-Id: I040c1b753012d45e8bf9f3c20c4a39ef143959b9
    Closes-bug: #1282888

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: kilo-1 → 2015.1.0
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.