summaryrefslogtreecommitdiff
path: root/HACKING.rst
diff options
context:
space:
mode:
authorabhishekkekane <abhishek.kekane@nttdata.com>2016-01-15 00:30:56 -0800
committerabhishekkekane <abhishek.kekane@nttdata.com>2016-01-21 21:41:52 -0800
commite8f82596b8e46e196c3e577da7078aa1dfe0beb3 (patch)
tree3243ff6a858adaaa1aeedc876a4a62d7d90e8c38 /HACKING.rst
parentfab87a2a8683baa0a34f1780f443cb1aeaf435cc (diff)
downloadnova-e8f82596b8e46e196c3e577da7078aa1dfe0beb3.tar.gz
Python3: Replace dict.iteritems with six.iteritems
This also adds a check to nova/hacking/checks.py that should check dict.iteritems, dict.itervalues and dict.iterkeys should not be used in the future. NOTE: In _dict_from_object() method of test_db_api.py items() method is called on dict and iteritems() method is called if object is other than dict. Changed it to directly use obj.items as obj can either be dict or object of nova.db.sqlalchemy.models.<Class> and both have items() method. Partially-Implements: blueprint nova-python3-mitaka Change-Id: Ib0fe3066199b92e4f013bb15312ada7515fa3d7b
Diffstat (limited to 'HACKING.rst')
-rw-r--r--HACKING.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/HACKING.rst b/HACKING.rst
index 03e2d7ade5..3ec9a23712 100644
--- a/HACKING.rst
+++ b/HACKING.rst
@@ -54,6 +54,9 @@ Nova Specific Commandments
- [N341] contextlib.nested is deprecated
- [N342] Config options should be in the central location ``nova/conf/``
- [N343] Check for common double word typos
+- [N344] Python 3: do not use dict.iteritems.
+- [N345] Python 3: do not use dict.iterkeys.
+- [N346] Python 3: do not use dict.itervalues.
Creating Unit Tests
-------------------