Skip to content

Commit 0192436

Browse files
MikaelSmithImpala Public Jenkins
authored andcommitted
IMPALA-15027: Python 2 infra cleanup
Removes the unused distro Python package. Removes six and future, which are compatibility packages for Python 2+3 that we don't need any more since impala-python is 3.11. Removes all use of builtins, which came from future, and __future__ as well. Replaces deprecated abstractproperty. Removes special-casing to handle Python 2. Testing: passed an exhaustive test run. Change-Id: I1b43878bafa488d513b4440aab3865cb17b12c78 Reviewed-on: http://gerrit.cloudera.org:8080/24334 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
1 parent 12e79a2 commit 0192436

451 files changed

Lines changed: 96 additions & 851 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.isort.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
force_alphabetical_sort_within_sections=true
2020
force_sort_within_sections=true
2121
include_trailing_comma=true
22-
known_third_party=builtins
2322
known_first_party=impala_py_lib,impala_shell,impala_thrift_gen,tests
2423
line_length=90
2524
multi_line_output=3

be/src/codegen/gen_ir_descriptions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
# specific language governing permissions and limitations
2020
# under the License.
2121

22-
from __future__ import absolute_import, division, print_function
23-
from string import Template
2422
import os
2523
import shutil
2624
import filecmp

bin/bootstrap_toolchain.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
# The script is directly executable, and it takes no parameters:
5555
# ./bootstrap_toolchain.py
5656

57-
from __future__ import absolute_import, division, print_function
5857
import logging
5958
import multiprocessing.pool
6059
import os

bin/check-rat-report.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
# time, and the RAT JAR is not included in the Impala repo; it must be downloaded
3434
# separately.
3535

36-
from __future__ import absolute_import, division, print_function
3736
import fnmatch
3837
import re
3938
import sys

bin/collect_minidumps.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
# --role_name=statestored --max_output_size=50000000 --end_time=1463033495000 \
2525
# --output_file_path=/tmp/minidump_package.tar.gz
2626

27-
from __future__ import absolute_import, division, print_function
2827
import os
2928
import re
3029
import sys

bin/compare_branches.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# Future imports must happen at the beginning of the file
16-
from __future__ import absolute_import, division, print_function
17-
1815
HELP = '''
1916
Compares two specified branches, using the Gerrit Change-Id as the
2017
primary identifier. Ignored commits can be added via a JSON

bin/diagnostics/collect_diagnostics.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
# specific language governing permissions and limitations
1818
# under the License.
1919

20-
from __future__ import absolute_import, division, print_function
2120
import argparse
2221
import datetime
2322
import errno

bin/diagnostics/experimental/tpcds_run_comparator.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
# specific language governing permissions and limitations
1818
# under the License
1919

20-
from __future__ import print_function
2120
import argparse
2221
import csv
2322
import math
@@ -53,7 +52,7 @@ class Task(Enum):
5352
['id', 'name', 'num_host', 'num_inst', 'avg_time', 'max_time', 'num_rows',
5453
'est_rows', 'peak_mem', 'est_peak_mem', 'detail'])
5554

56-
RE_PEAK_MEM = re.compile("\d+\.\d\d [GMK]?B")
55+
RE_PEAK_MEM = re.compile(r"\d+\.\d\d [GMK]?B")
5756

5857
# Defines list of sections in a profile file.
5958
# Format: (Task Enum, Section Delimeter)

bin/dump_breakpad_symbols.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
# $IMPALA_TOOLCHAIN_PACKAGES_HOME/breakpad-*/bin/minidump_stackwalk \
5454
# /tmp/impala-minidumps/impalad/03c0ee26-bfd1-cf3e-43fa49ca-1a6aae25.dmp /tmp/syms
5555

56-
from __future__ import absolute_import, division, print_function
5756
import errno
5857
import logging
5958
import magic

bin/gen-backend-test-script.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
# used by the build system (see be/CMakeLists.txt for usage) and is not intended to be
2121
# run directly.
2222

23-
from __future__ import absolute_import, division, print_function
2423
import argparse
2524
import os
2625
import stat

0 commit comments

Comments
 (0)