Apache DataFusion SQL Query Engine
ARROW-7895: [Python] Remove more python 2.7 cruft
Neal Richardson0ee542365271
diff --git a/dev/release/download_rc_binaries.py b/dev/release/download_rc_binaries.pyindex da66e483d3..843f0c07eb 100755--- a/dev/release/download_rc_binaries.py+++ b/dev/release/download_rc_binaries.py@@ -18,21 +18,15 @@#import re-import sys--try:- import argparse- import concurrent.futures as cf- import functools- import hashlib- import json- import os- import subprocess- import urllib.request-except ImportError:- if sys.version_info.major < 3:- raise Exception("Please use Python 3 to run this script")- raise++import argparse+import concurrent.futures as cf+import functools+import hashlib+import json+import os+import subprocess+import urllib.requestBINTRAY_API_ROOT = "https://bintray.com/api/v1"diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.shindex ac5ceca7f6..653967adc8 100755--- a/dev/release/verify-release-candidate.sh+++ b/dev/release/verify-release-candidate.sh@@ -614,7 +614,7 @@ check_python_imports() {}test_linux_wheels() {- local py_arches="2.7mu 3.5m 3.6m 3.7m 3.8"+ local py_arches="3.5m 3.6m 3.7m 3.8"local manylinuxes="1 2010 2014"for py_arch in ${py_arches}; do@@ -623,11 +623,6 @@ test_linux_wheels() {conda activate ${env}for ml_spec in ${manylinuxes}; do- if [[ "$py_arch" = "2.7mu" && "$ml_spec" = "2014" ]]; then- # manylinux2014 does not support py2.7, so skip that one- continue- fi-# check the mandatory and optional importspip install python-rc/${VERSION}-rc${RC_NUMBER}/pyarrow-${VERSION}-cp${py_arch//[mu.]/}-cp${py_arch//./}-manylinux${ml_spec}_x86_64.whlcheck_python_imports py_arch@@ -644,7 +639,7 @@ test_linux_wheels() {}test_macos_wheels() {- local py_arches="2.7m 3.5m 3.6m 3.7m 3.8"+ local py_arches="3.5m 3.6m 3.7m 3.8"for py_arch in ${py_arches}; dolocal env=_verify_wheel-${py_arch}diff --git a/dev/tasks/gandiva-jars/build-cpp-linux.sh b/dev/tasks/gandiva-jars/build-cpp-linux.shindex 3fefa45c57..61c82495af 100755--- a/dev/tasks/gandiva-jars/build-cpp-linux.sh+++ b/dev/tasks/gandiva-jars/build-cpp-linux.sh@@ -22,8 +22,8 @@ source /multibuild/manylinux_utils.sh# Quit on failureset -e-PYTHON_VERSION=2.7-CPYTHON_PATH="$(cpython_path ${PYTHON_VERSION} 16)"+PYTHON_VERSION=3.6+CPYTHON_PATH="$(cpython_path ${PYTHON_VERSION})"PYTHON_INTERPRETER="${CPYTHON_PATH}/bin/python"PIP="${CPYTHON_PATH}/bin/pip"@@ -69,4 +69,3 @@ popd# copy the library to distributioncp -L /arrow-dist/lib/libgandiva_jni.so /io/dist-diff --git a/dev/tasks/python-wheels/manylinux-test.sh b/dev/tasks/python-wheels/manylinux-test.shindex 414279115f..c4b36e658a 100755--- a/dev/tasks/python-wheels/manylinux-test.sh+++ b/dev/tasks/python-wheels/manylinux-test.sh@@ -37,15 +37,12 @@ fi# Test import and optional dependenciespython -c "-import sysimport pyarrowimport pyarrow.parquetimport pyarrow.plasmaimport pyarrow.fsimport pyarrow._hdfs--if sys.version_info.major > 2:- import pyarrow.dataset- import pyarrow.flight- import pyarrow.gandiva+import pyarrow.dataset+import pyarrow.flight+import pyarrow.gandiva"diff --git a/dev/tasks/python-wheels/osx-build.sh b/dev/tasks/python-wheels/osx-build.shindex 581ac0b530..30c411bc97 100755--- a/dev/tasks/python-wheels/osx-build.sh+++ b/dev/tasks/python-wheels/osx-build.sh@@ -104,14 +104,8 @@ function build_wheel {pip install $(pip_opts) -r python/requirements-wheel.txt cython- if [ ${MB_PYTHON_VERSION} != "2.7" ]; then- # Gandiva is not supported on Python 2.7- export PYARROW_WITH_GANDIVA=1- export BUILD_ARROW_GANDIVA=ON- else- export PYARROW_WITH_GANDIVA=0- export BUILD_ARROW_GANDIVA=OFF- fi+ export PYARROW_WITH_GANDIVA=1+ export BUILD_ARROW_GANDIVA=ONgit submodule update --initexport ARROW_TEST_DATA=`pwd`/testing/data@@ -217,16 +211,13 @@ function run_unit_tests {function run_import_tests {# Test optional dependenciespython -c "-import sysimport pyarrowimport pyarrow.parquetimport pyarrow.plasmaimport pyarrow.fsimport pyarrow._hdfs--if sys.version_info.major > 2:- import pyarrow.dataset- import pyarrow.flight- import pyarrow.gandiva+import pyarrow.dataset+import pyarrow.flight+import pyarrow.gandiva"}diff --git a/dev/tasks/python-wheels/win-build.bat b/dev/tasks/python-wheels/win-build.batindex b93cd8893a..8247a5a3aa 100644--- a/dev/tasks/python-wheels/win-build.bat+++ b/dev/tasks/python-wheels/win-build.bat@@ -72,8 +72,6 @@ popdset PYARROW_BUILD_TYPE=Releaseset PYARROW_PARALLEL=8-@rem Flight, Gandiva and Dataset are not supported on Python 2.7,-@rem but we don't build 2.7 wheels for Windows.set PYARROW_WITH_DATASET=1set PYARROW_WITH_FLIGHT=1set PYARROW_WITH_GANDIVA=1diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.ymlindex 023c867fdb..6e64293f0c 100644--- a/dev/tasks/tasks.yml+++ b/dev/tasks/tasks.yml@@ -97,7 +97,6 @@ groups:- test-ubuntu-c-glib- test-debian-ruby- test-ubuntu-ruby- - test-conda-python-2.7- test-conda-python-3.6- test-conda-python-3.7- test-conda-python-3.8@@ -115,8 +114,6 @@ groups:- test-ubuntu-18.04-r-sanitizer- test-debian-10-go-1.12- test-ubuntu-18.04-docs- - test-conda-python-2.7-pandas-latest- - test-conda-python-2.7-pandas-master- test-conda-python-3.7-pandas-latest- test-conda-python-3.7-pandas-master- test-conda-python-3.8-pandas-latest@@ -141,7 +138,6 @@ groups:- test-ubuntu-c-glib- test-debian-ruby- test-ubuntu-ruby- - test-conda-python-2.7- test-conda-python-3.6- test-conda-python-3.7- test-conda-python-3.8@@ -175,7 +171,6 @@ groups:- test-ubuntu-c-glibpython:- - test-conda-python-2.7- test-conda-python-3.6- test-conda-python-3.7- test-conda-python-3.8@@ -199,8 +194,6 @@ groups:- test-ubuntu-rubyintegration:- - test-conda-python-2.7-pandas-latest- - test-conda-python-2.7-pandas-master- test-conda-python-3.7-pandas-latest- test-conda-python-3.7-pandas-master- test-conda-python-3.8-pandas-latest@@ -269,7 +262,6 @@ groups:- test-ubuntu-c-glib- test-debian-ruby- test-ubuntu-ruby- - test-conda-python-2.7- test-conda-python-3.6- test-conda-python-3.7- test-debian-10-python-3@@ -285,7 +277,6 @@ groups:- test-ubuntu-18.04-r-sanitizer- test-debian-10-go-1.12- test-ubuntu-18.04-docs- - test-conda-python-2.7-pandas-latest- test-conda-python-3.7-pandas-latest- test-conda-python-3.7-pandas-master- test-conda-python-3.8-pandas-latest@@ -1756,19 +1747,6 @@ tasks:- docker-compose build ubuntu-ruby- docker-compose run ubuntu-ruby- test-conda-python-2.7:- ci: circle- platform: linux- template: docker-tests/circle.linux.yml- params:- commands:- - export PYTHON=2.7- - docker-compose pull --ignore-pull-failures conda-cpp- - docker-compose pull --ignore-pull-failures conda-python- - docker-compose build conda-cpp- - docker-compose build conda-python- - docker-compose run conda-python-test-conda-python-3.6:ci: circleplatform: linux@@ -1965,20 +1943,6 @@ tasks:############################## Integration tests ############################- test-conda-python-2.7-pandas-latest:- ci: circle- platform: linux- template: docker-tests/circle.linux.yml- params:- commands:- - export PYTHON=2.7 PANDAS=latest- - docker-compose pull --ignore-pull-failures conda-cpp- - docker-compose pull --ignore-pull-failures conda-python- - docker-compose build conda-cpp- - docker-compose build conda-python- - docker-compose build --no-cache conda-python-pandas- - docker-compose run conda-python-pandas-test-conda-python-3.7-pandas-latest:ci: circleplatform: linuxdiff --git a/docker-compose.yml b/docker-compose.ymlindex 4f2f14a75e..10ddc342d2 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -411,7 +411,7 @@ services:# docker-compose run --rm conda-python# Parameters:# ARCH: amd64, arm32v7- # PYTHON: 2.7, 3.6, 3.7, 3.8+ # PYTHON: 3.6, 3.7, 3.8image: ${REPO}:${ARCH}-conda-python-${PYTHON}build:context: .