From 95b0a868f255f2766ae03733882f30c8c7f3b7ca Mon Sep 17 00:00:00 2001 From: Jeremy Heiner Date: Sat, 12 Oct 2013 12:44:33 -0400 Subject: Use dict iteration methods common to both Python 2 and 3. The .items, .keys, and .values methods in Python 2 make copies, so the test framework uses the .iter* flavors of those methods. But in Python 3 those .iter* (and even the 2.7 .view*) flavors are removed and the original methods return views. Measurements were taken under Python2 to see what impact the copying had, and there was none. Thus it is not worth the effort to avoid. Reported as a compatibility issue by 2to3. Signed-off-by: Jeremy Heiner Signed-off-by: Allan McRae --- test/pacman/pmpkg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/pacman/pmpkg.py') diff --git a/test/pacman/pmpkg.py b/test/pacman/pmpkg.py index 24ef1e2b..6f7ae6e1 100644 --- a/test/pacman/pmpkg.py +++ b/test/pacman/pmpkg.py @@ -223,7 +223,7 @@ def local_backup_entries(self): def installfile(self): data = [] - for key, value in self.install.iteritems(): + for key, value in self.install.items(): if value: data.append("%s() {\n%s\n}\n" % (key, value)) -- cgit v1.2.3-54-g00ecf