Joe McDonnell has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/19592 )
Change subject: IMPALA-11977: Fix Python 3 broken imports and object model differences ...................................................................... IMPALA-11977: Fix Python 3 broken imports and object model differences Python 3 changed some object model methods: - __nonzero__ was removed in favor of __bool__ - func_dict / func_name were removed in favor of __dict__ / __name__ - The next() function was deprecated in favor of __next__ (Code locations should use next(iter) rather than iter.next()) - metaclasses are specified a different way - Locations that specify __eq__ should also specify __hash__ Python 3 also moved some packages around (urllib2, Queue, httplib, etc), and this adapts the code to use the new locations (usually handled on Python 2 via future). This also fixes the code to avoid referencing exception variables outside the exception block and variables outside of a comprehension. Several of these seem like false positives, but it is better to avoid the warning. This fixes these pylint warnings: bad-python3-import eq-without-hash metaclass-assignment next-method-called nonzero-method exception-escape comprehension-escape Testing: - Ran core tests - Ran release exhaustive tests Change-Id: I988ae6c139142678b0d40f1f4170b892eabf25ee Reviewed-on: http://gerrit.cloudera.org:8080/19592 Reviewed-by: Joe McDonnell <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M bin/banned_py3k_warnings.txt M testdata/bin/generate-schema-statements.py M testdata/common/widetable.py M tests/benchmark/report_benchmark_results.py M tests/common/custom_cluster_test_suite.py M tests/common/impala_connection.py M tests/common/test_result_verifier.py M tests/comparison/cluster.py M tests/comparison/common.py M tests/comparison/data_generator_mapred_common.py M tests/comparison/db_connection.py M tests/comparison/db_types.py M tests/comparison/query.py M tests/conftest.py M tests/custom_cluster/test_admission_controller.py M tests/custom_cluster/test_executor_groups.py M tests/custom_cluster/test_local_catalog.py M tests/custom_cluster/test_saml2_sso.py M tests/custom_cluster/test_udf_concurrency.py M tests/hs2/test_hs2.py M tests/hs2/test_json_endpoints.py M tests/performance/query.py M tests/query_test/test_insert_parquet.py M tests/shell/test_shell_commandline.py M tests/shell/test_shell_interactive.py M tests/statestore/test_statestore.py M tests/stress/concurrent_select.py M tests/stress/query_retries_stress_runner.py M tests/util/concurrent_workload.py M tests/util/filesystem_base.py M tests/util/hdfs_util.py M tests/util/ssh_util.py 32 files changed, 210 insertions(+), 153 deletions(-) Approvals: Joe McDonnell: Looks good to me, approved Impala Public Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/19592 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I988ae6c139142678b0d40f1f4170b892eabf25ee Gerrit-Change-Number: 19592 Gerrit-PatchSet: 6 Gerrit-Owner: Joe McDonnell <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]>
