You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by gr...@apache.org on 2020/03/05 02:56:26 UTC

[kudu] 04/04: [python] Remove use of dict.iteritems()

This is an automated email from the ASF dual-hosted git repository.

granthenke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit e901424abf7d54f9e3060bf3f6c1a5cc0d42874d
Author: Grant Henke <gr...@apache.org>
AuthorDate: Mon Mar 2 12:46:11 2020 -0600

    [python] Remove use of dict.iteritems()
    
    This patch removes the use of dict.iteritems() given it is removed
    in Python 3.
    
    Change-Id: I22d0d66cee0b9c940376e6c518504912fd431702
    Reviewed-on: http://gerrit.cloudera.org:8080/15359
    Tested-by: Kudu Jenkins
    Reviewed-by: Grant Henke <gr...@apache.org>
---
 build-support/dist_test.py                                       | 4 ++--
 build-support/mini-cluster/relocate_binaries_for_mini_cluster.py | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/build-support/dist_test.py b/build-support/dist_test.py
index 588a396..c32022e 100755
--- a/build-support/dist_test.py
+++ b/build-support/dist_test.py
@@ -341,7 +341,7 @@ def create_archive_input(staging, execution, dep_extractor,
              '-e', 'KUDU_ALLOW_SLOW_TESTS=%s' % os.environ.get('KUDU_ALLOW_SLOW_TESTS', 1),
              '-e', 'KUDU_COMPRESS_TEST_OUTPUT=%s' % \
                     os.environ.get('KUDU_COMPRESS_TEST_OUTPUT', 0)]
-  for k, v in execution.env.iteritems():
+  for k, v in execution.env.items():
     if k == 'KUDU_TEST_TIMEOUT':
       # Currently we don't respect the test timeouts specified in ctest, since
       # we want to make sure that the dist-test task timeout and the
@@ -397,7 +397,7 @@ def create_task_json(staging,
   # Some versions of 'isolate batcharchive' directly list the items in
   # the dumped JSON. Others list it in an 'items' dictionary.
   items = inmap.get('items', inmap)
-  for k, v in items.iteritems():
+  for k, v in items.items():
     # The key may be 'foo-test.<shard>'. So, chop off the last component
     # to get the test name.
     test_name = ".".join(k.split(".")[:-1]) if TEST_SHARD_RE.search(k) else k
diff --git a/build-support/mini-cluster/relocate_binaries_for_mini_cluster.py b/build-support/mini-cluster/relocate_binaries_for_mini_cluster.py
index 562c1f8..a443814 100755
--- a/build-support/mini-cluster/relocate_binaries_for_mini_cluster.py
+++ b/build-support/mini-cluster/relocate_binaries_for_mini_cluster.py
@@ -366,7 +366,7 @@ def relocate_deps_macos(target_src, target_dst, config):
 
   # For each dependency, relocate the path we will search for it and ensure it
   # is shipped with the archive.
-  for (dep_search_name, dep_src) in target_deps.iteritems():
+  for (dep_search_name, dep_src) in target_deps.items():
     # Filter out libs we don't want to archive.
     if PAT_MACOS_LIB_EXCLUDE.search(dep_search_name):
       continue
@@ -401,7 +401,7 @@ def relocate_sasl2(target_src, config):
   """
 
   # Find the libsasl2 module in our dependencies.
-  deps = get_resolved_deps(target_src);
+  deps = get_resolved_deps(target_src)
   sasl_lib = None
   for dep in deps:
     if re.search('libsasl2', dep):