GNOME Bugzilla – Bug 678497
dict.iteritems() is no longer supported in Python 3
Last modified: 2015-02-27 16:40:57 UTC
From http://docs.python.org/release/3.1.5/whatsnew/3.0.html#views-and-iterators-instead-of-lists: "Also, the dict.iterkeys(), dict.iteritems() and dict.itervalues() methods are no longer supported."
Created attachment 216866 [details] [review] proposed fix
Comment on attachment 216866 [details] [review] proposed fix Looks fine. Thanks. >From b11d16bdc1ed52de4aea042fb7446249393cbcd7 Mon Sep 17 00:00:00 2001 >From: = <=> >Date: Wed, 20 Jun 2012 15:26:40 -0400 >Subject: [PATCH] Fix for bug #678497 - dict.iteritems() is no longer > supported in Python 3 > >--- > pyatspi/document.py | 2 +- > pyatspi/text.py | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/pyatspi/document.py b/pyatspi/document.py >index 8cb92e4..1ae2ddf 100644 >--- a/pyatspi/document.py >+++ b/pyatspi/document.py >@@ -58,7 +58,7 @@ class Document: > as name-value pairs. > """ > ret = Atspi.Document.get_attributes(self.obj) >- return [key + ':' + value for key, value in ret.iteritems()] >+ return [key + ':' + value for key, value in ret.items()] > > def getLocale(self): > """ >diff --git a/pyatspi/text.py b/pyatspi/text.py >index a7806f8..a065d77 100644 >--- a/pyatspi/text.py >+++ b/pyatspi/text.py >@@ -288,7 +288,7 @@ class Text: > but which were not explicitly specified by the content creator. > """ > ret = Atspi.Text.get_default_attributes(self.obj) >- return ';'.join([key + ':' + value for key, value in ret.iteritems()]) >+ return ';'.join([key + ':' + value for key, value in ret.items()]) > > def getNSelections(self): > """ >-- >1.7.10.2 >
Comment on attachment 216866 [details] [review] proposed fix Done. Thanks. http://git.gnome.org/browse/pyatspi2/commit/?id=66efd36c30398e8ef283ec8a1495b93f974e854a
[Moving at-spi/pyatspi2 bugs to separate product. See bug 740075]