From 2eee806263465fc9eac010ec4d74fd80e3e5b0cf Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Sat, 25 Apr 2015 16:36:39 +0200 Subject: [PATCH] Stop using dict.iter* methods Signed-off-by: Julien Cristau --- britney.py | 8 ++++---- britney_util.py | 2 +- installability/builder.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/britney.py b/britney.py index 2f752e2..241bc54 100755 --- a/britney.py +++ b/britney.py @@ -485,7 +485,7 @@ class Britney(object): possible_dep_ranges[key] = sat if dep: - for clause in possible_dep_ranges.itervalues(): + for clause in possible_dep_ranges.values(): relations.add_dependency_clause(clause) self._inst_tester = builder.build() @@ -1901,7 +1901,7 @@ class Britney(object): ptuple = check[p] binary, _, parch = ptuple rdeps = [ bin for bin in binaries_t[parch][0][binary][RDEPENDS] \ - if bin in [y[0] for y in smoothbins.itervalues()] ] + if bin in [y[0] for y in smoothbins.values()] ] if rdeps: smoothbins[p] = ptuple @@ -1937,7 +1937,7 @@ class Britney(object): version = self.binaries[suite][parch][0][binary][VERSION] adds.add((binary, version, parch)) - return (adds, rms, set(smoothbins.itervalues())) + return (adds, rms, set(smoothbins.values())) def doop_source(self, item, hint_undo=None, removals=frozenset()): @@ -2829,7 +2829,7 @@ class Britney(object): print('* %s' % (arch,)) - for (src, ver), pkgs in sorted(all.iteritems()): + for (src, ver), pkgs in sorted(all.items()): print(' %s (%s): %s' % (src, ver, ' '.join(sorted(pkgs)))) print diff --git a/britney_util.py b/britney_util.py index 2e14870..3612a36 100644 --- a/britney_util.py +++ b/britney_util.py @@ -220,7 +220,7 @@ def register_reverses(packages, provides, check_doubles=True, iterator=None, the loops. """ if iterator is None: - iterator = packages.iterkeys() + iterator = packages.keys() else: iterator = ifilter_only(packages, iterator) diff --git a/installability/builder.py b/installability/builder.py index 23ff716..becc6b3 100644 --- a/installability/builder.py +++ b/installability/builder.py @@ -388,7 +388,7 @@ class InstallabilityTesterBuilder(object): ekey = (deps, con, rdeps) find_eqv_table[ekey].append(pkg) - for pkg_list in find_eqv_table.itervalues(): + for pkg_list in find_eqv_table.values(): if len(pkg_list) < 2: continue