From 6b92b4af05b2a5f4800ac7aa25dbf3b6a8547b2b Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Thu, 24 Oct 2019 13:16:31 -0700 Subject: [PATCH] Attempt to drop support for Python 3.4 --- .../python_jessie_x64/Dockerfile.template | 28 ------- .../Dockerfile | 1 - .../Dockerfile | 1 - .../Dockerfile | 1 - .../Dockerfile | 1 - .../test/python_jessie_x64/Dockerfile | 80 ------------------- .../internal_ci/macos/grpc_build_artifacts.sh | 1 - .../windows/grpc_build_artifacts.bat | 1 - .../windows/grpc_build_packages.bat | 1 - .../internal_ci/windows/grpc_distribtests.bat | 1 - .../windows/grpc_distribtests_standalone.bat | 1 - tools/run_tests/artifacts/artifact_targets.py | 11 +-- tools/run_tests/run_tests.py | 15 +--- 13 files changed, 3 insertions(+), 140 deletions(-) delete mode 100644 templates/tools/dockerfile/test/python_jessie_x64/Dockerfile.template delete mode 100644 tools/dockerfile/test/python_jessie_x64/Dockerfile diff --git a/templates/tools/dockerfile/test/python_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/python_jessie_x64/Dockerfile.template deleted file mode 100644 index dde33a9e1a4..00000000000 --- a/templates/tools/dockerfile/test/python_jessie_x64/Dockerfile.template +++ /dev/null @@ -1,28 +0,0 @@ -%YAML 1.2 ---- | - # Copyright 2015 gRPC authors. - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - - <%include file="../../debian_jessie_header.include"/> - - <%include file="../../apt_get_basic.include"/> - <%include file="../../gcp_api_libraries.include"/> - <%include file="../../python_deps.include"/> - # Install pip and virtualenv for Python 3.4 - RUN curl https://bootstrap.pypa.io/get-pip.py | python3.4 - RUN python3.4 -m pip install virtualenv - - <%include file="../../run_tests_addons.include"/> - # Define the default command. - CMD ["bash"] diff --git a/tools/dockerfile/grpc_artifact_python_manylinux1_x64/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux1_x64/Dockerfile index 1ff6aa062a2..7cbcc5f9917 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux1_x64/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_manylinux1_x64/Dockerfile @@ -24,7 +24,6 @@ RUN yum install -y curl-devel expat-devel gettext-devel linux-headers openssl-de # Install Python build requirements RUN /opt/python/cp27-cp27m/bin/pip install cython RUN /opt/python/cp27-cp27mu/bin/pip install cython -RUN /opt/python/cp34-cp34m/bin/pip install cython RUN /opt/python/cp35-cp35m/bin/pip install cython RUN /opt/python/cp36-cp36m/bin/pip install cython RUN /opt/python/cp37-cp37m/bin/pip install cython diff --git a/tools/dockerfile/grpc_artifact_python_manylinux1_x86/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux1_x86/Dockerfile index 18b4cb62927..079901cffaa 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux1_x86/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_manylinux1_x86/Dockerfile @@ -24,7 +24,6 @@ RUN yum install -y curl-devel expat-devel gettext-devel linux-headers openssl-de # Install Python build requirements RUN /opt/python/cp27-cp27m/bin/pip install cython RUN /opt/python/cp27-cp27mu/bin/pip install cython -RUN /opt/python/cp34-cp34m/bin/pip install cython RUN /opt/python/cp35-cp35m/bin/pip install cython RUN /opt/python/cp36-cp36m/bin/pip install cython RUN /opt/python/cp37-cp37m/bin/pip install cython diff --git a/tools/dockerfile/grpc_artifact_python_manylinux2010_x64/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux2010_x64/Dockerfile index 66aefcaac28..f8ea86465f2 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux2010_x64/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_manylinux2010_x64/Dockerfile @@ -24,7 +24,6 @@ RUN yum install -y curl-devel expat-devel gettext-devel linux-headers openssl-de # Install Python build requirements RUN /opt/python/cp27-cp27m/bin/pip install cython RUN /opt/python/cp27-cp27mu/bin/pip install cython -RUN /opt/python/cp34-cp34m/bin/pip install cython RUN /opt/python/cp35-cp35m/bin/pip install cython RUN /opt/python/cp36-cp36m/bin/pip install cython RUN /opt/python/cp37-cp37m/bin/pip install cython diff --git a/tools/dockerfile/grpc_artifact_python_manylinux2010_x86/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux2010_x86/Dockerfile index f55a8785182..adc392c25c3 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux2010_x86/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_manylinux2010_x86/Dockerfile @@ -24,7 +24,6 @@ RUN yum install -y curl-devel expat-devel gettext-devel linux-headers openssl-de # Install Python build requirements RUN /opt/python/cp27-cp27m/bin/pip install cython RUN /opt/python/cp27-cp27mu/bin/pip install cython -RUN /opt/python/cp34-cp34m/bin/pip install cython RUN /opt/python/cp35-cp35m/bin/pip install cython RUN /opt/python/cp36-cp36m/bin/pip install cython RUN /opt/python/cp37-cp37m/bin/pip install cython diff --git a/tools/dockerfile/test/python_jessie_x64/Dockerfile b/tools/dockerfile/test/python_jessie_x64/Dockerfile deleted file mode 100644 index 367785f42fd..00000000000 --- a/tools/dockerfile/test/python_jessie_x64/Dockerfile +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright 2015 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM debian:jessie - - -# Install Git and basic packages. -RUN apt-get update && apt-get install -y \ - autoconf \ - autotools-dev \ - build-essential \ - bzip2 \ - ccache \ - curl \ - dnsutils \ - gcc \ - gcc-multilib \ - git \ - golang \ - gyp \ - lcov \ - libc6 \ - libc6-dbg \ - libc6-dev \ - libgtest-dev \ - libtool \ - make \ - perl \ - strace \ - python-dev \ - python-setuptools \ - python-yaml \ - telnet \ - unzip \ - wget \ - zip && apt-get clean - -#================ -# Build profiling -RUN apt-get update && apt-get install -y time && apt-get clean - -# Google Cloud platform API libraries -RUN apt-get update && apt-get install -y python-pip && apt-get clean -RUN pip install --upgrade google-api-python-client oauth2client - -#==================== -# Python dependencies - -# Install dependencies - -RUN apt-get update && apt-get install -y \ - python-all-dev \ - python3-all-dev \ - python-pip - -# Install Python packages from PyPI -RUN pip install --upgrade pip==10.0.1 -RUN pip install virtualenv -RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.10.0 twisted==17.5.0 - -# Install pip and virtualenv for Python 3.4 -RUN curl https://bootstrap.pypa.io/get-pip.py | python3.4 -RUN python3.4 -m pip install virtualenv - - -RUN mkdir /var/local/jenkins - -# Define the default command. -CMD ["bash"] diff --git a/tools/internal_ci/macos/grpc_build_artifacts.sh b/tools/internal_ci/macos/grpc_build_artifacts.sh index 54b171d209f..7b9c5eb673d 100755 --- a/tools/internal_ci/macos/grpc_build_artifacts.sh +++ b/tools/internal_ci/macos/grpc_build_artifacts.sh @@ -22,7 +22,6 @@ source tools/internal_ci/helper_scripts/prepare_build_macos_rc # install cython for all python versions python2.7 -m pip install cython setuptools wheel -python3.4 -m pip install cython setuptools wheel python3.5 -m pip install cython setuptools wheel python3.6 -m pip install cython setuptools wheel python3.7 -m pip install cython setuptools wheel diff --git a/tools/internal_ci/windows/grpc_build_artifacts.bat b/tools/internal_ci/windows/grpc_build_artifacts.bat index 5f184e5e75a..190e848b267 100644 --- a/tools/internal_ci/windows/grpc_build_artifacts.bat +++ b/tools/internal_ci/windows/grpc_build_artifacts.bat @@ -15,7 +15,6 @@ @rem Move python installation from _32bit to _32bits where they are expected by python artifact builder @rem TODO(jtattermusch): get rid of this hack rename C:\Python27_32bit Python27_32bits -rename C:\Python34_32bit Python34_32bits rename C:\Python35_32bit Python35_32bits rename C:\Python36_32bit Python36_32bits rename C:\Python37_32bit Python37_32bits diff --git a/tools/internal_ci/windows/grpc_build_packages.bat b/tools/internal_ci/windows/grpc_build_packages.bat index 61a636f6073..3cf90af39e6 100644 --- a/tools/internal_ci/windows/grpc_build_packages.bat +++ b/tools/internal_ci/windows/grpc_build_packages.bat @@ -15,7 +15,6 @@ @rem Move python installation from _32bit to _32bits where they are expected by python artifact builder @rem TODO(jtattermusch): get rid of this hack rename C:\Python27_32bit Python27_32bits -rename C:\Python34_32bit Python34_32bits rename C:\Python35_32bit Python35_32bits rename C:\Python36_32bit Python36_32bits diff --git a/tools/internal_ci/windows/grpc_distribtests.bat b/tools/internal_ci/windows/grpc_distribtests.bat index 65fd01ef72a..effeee649b1 100644 --- a/tools/internal_ci/windows/grpc_distribtests.bat +++ b/tools/internal_ci/windows/grpc_distribtests.bat @@ -15,7 +15,6 @@ @rem Move python installation from _32bit to _32bits where they are expected by python artifact builder @rem TODO(jtattermusch): get rid of this hack rename C:\Python27_32bit Python27_32bits -rename C:\Python34_32bit Python34_32bits rename C:\Python35_32bit Python35_32bits rename C:\Python36_32bit Python36_32bits diff --git a/tools/internal_ci/windows/grpc_distribtests_standalone.bat b/tools/internal_ci/windows/grpc_distribtests_standalone.bat index ea4c0d7a976..b33b99c71e8 100644 --- a/tools/internal_ci/windows/grpc_distribtests_standalone.bat +++ b/tools/internal_ci/windows/grpc_distribtests_standalone.bat @@ -15,7 +15,6 @@ @rem Move python installation from _32bit to _32bits where they are expected by python artifact builder @rem TODO(jtattermusch): get rid of this hack rename C:\Python27_32bit Python27_32bits -rename C:\Python34_32bit Python34_32bits rename C:\Python35_32bit Python35_32bits rename C:\Python36_32bit Python36_32bits diff --git a/tools/run_tests/artifacts/artifact_targets.py b/tools/run_tests/artifacts/artifact_targets.py index f3b6c1b93c6..62dd3e12f8f 100644 --- a/tools/run_tests/artifacts/artifact_targets.py +++ b/tools/run_tests/artifacts/artifact_targets.py @@ -170,7 +170,7 @@ class PythonArtifact: docker_base_image='quay.io/pypa/manylinux1_i686' if self.arch == 'x86' else 'quay.io/pypa/manylinux1_x86_64') elif self.platform == 'windows': - if 'Python27' in self.py_version or 'Python34' in self.py_version: + if 'Python27' in self.py_version: environ['EXT_COMPILER'] = 'mingw32' else: environ['EXT_COMPILER'] = 'msvc' @@ -374,56 +374,47 @@ def targets(): # Add manylinux2010_x86 targets once this issue is resolved. PythonArtifact('manylinux1', 'x86', 'cp27-cp27m'), PythonArtifact('manylinux1', 'x86', 'cp27-cp27mu'), - PythonArtifact('manylinux1', 'x86', 'cp34-cp34m'), PythonArtifact('manylinux1', 'x86', 'cp35-cp35m'), PythonArtifact('manylinux1', 'x86', 'cp36-cp36m'), PythonArtifact('manylinux1', 'x86', 'cp37-cp37m'), PythonArtifact('manylinux1', 'x86', 'cp38-cp38'), PythonArtifact('manylinux2010', 'x86', 'cp27-cp27m'), PythonArtifact('manylinux2010', 'x86', 'cp27-cp27mu'), - PythonArtifact('manylinux2010', 'x86', 'cp34-cp34m'), PythonArtifact('manylinux2010', 'x86', 'cp35-cp35m'), PythonArtifact('manylinux2010', 'x86', 'cp36-cp36m'), PythonArtifact('manylinux2010', 'x86', 'cp37-cp37m'), PythonArtifact('manylinux2010', 'x86', 'cp38-cp38'), PythonArtifact('linux_extra', 'armv7', '2.7'), - PythonArtifact('linux_extra', 'armv7', '3.4'), PythonArtifact('linux_extra', 'armv7', '3.5'), PythonArtifact('linux_extra', 'armv7', '3.6'), PythonArtifact('linux_extra', 'armv6', '2.7'), - PythonArtifact('linux_extra', 'armv6', '3.4'), PythonArtifact('linux_extra', 'armv6', '3.5'), PythonArtifact('linux_extra', 'armv6', '3.6'), PythonArtifact('manylinux1', 'x64', 'cp27-cp27m'), PythonArtifact('manylinux1', 'x64', 'cp27-cp27mu'), - PythonArtifact('manylinux1', 'x64', 'cp34-cp34m'), PythonArtifact('manylinux1', 'x64', 'cp35-cp35m'), PythonArtifact('manylinux1', 'x64', 'cp36-cp36m'), PythonArtifact('manylinux1', 'x64', 'cp37-cp37m'), PythonArtifact('manylinux1', 'x64', 'cp38-cp38'), PythonArtifact('manylinux2010', 'x64', 'cp27-cp27m'), PythonArtifact('manylinux2010', 'x64', 'cp27-cp27mu'), - PythonArtifact('manylinux2010', 'x64', 'cp34-cp34m'), PythonArtifact('manylinux2010', 'x64', 'cp35-cp35m'), PythonArtifact('manylinux2010', 'x64', 'cp36-cp36m'), PythonArtifact('manylinux2010', 'x64', 'cp37-cp37m'), PythonArtifact('manylinux2010', 'x64', 'cp38-cp38'), PythonArtifact('macos', 'x64', 'python2.7'), - PythonArtifact('macos', 'x64', 'python3.4'), PythonArtifact('macos', 'x64', 'python3.5'), PythonArtifact('macos', 'x64', 'python3.6'), PythonArtifact('macos', 'x64', 'python3.7'), # TODO(https://github.com/grpc/grpc/issues/20615) Enable this artifact # PythonArtifact('macos', 'x64', 'python3.8'), PythonArtifact('windows', 'x86', 'Python27_32bits'), - PythonArtifact('windows', 'x86', 'Python34_32bits'), PythonArtifact('windows', 'x86', 'Python35_32bits'), PythonArtifact('windows', 'x86', 'Python36_32bits'), PythonArtifact('windows', 'x86', 'Python37_32bits'), # TODO(https://github.com/grpc/grpc/issues/20615) Enable this artifact # PythonArtifact('windows', 'x86', 'Python38_32bits'), PythonArtifact('windows', 'x64', 'Python27'), - PythonArtifact('windows', 'x64', 'Python34'), PythonArtifact('windows', 'x64', 'Python35'), PythonArtifact('windows', 'x64', 'Python36'), PythonArtifact('windows', 'x64', 'Python37'), diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 59edaaed4ed..7a5a6e90aac 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -773,8 +773,6 @@ class PythonLanguage(object): return 'stretch_' + self.args.compiler[len('python'):] elif self.args.compiler == 'python_alpine': return 'alpine' - elif self.args.compiler == 'python3.4': - return 'jessie' else: return 'stretch_default' @@ -828,12 +826,6 @@ class PythonLanguage(object): minor='7', bits=bits, config_vars=config_vars) - python34_config = _python_config_generator( - name='py34', - major='3', - minor='4', - bits=bits, - config_vars=config_vars) python35_config = _python_config_generator( name='py35', major='3', @@ -884,8 +876,6 @@ class PythonLanguage(object): ) elif args.compiler == 'python2.7': return (python27_config,) - elif args.compiler == 'python3.4': - return (python34_config,) elif args.compiler == 'python3.5': return (python35_config,) elif args.compiler == 'python3.6': @@ -903,11 +893,10 @@ class PythonLanguage(object): elif args.compiler == 'all_the_cpythons': return ( python27_config, - python34_config, python35_config, python36_config, python37_config, - # TODO: Add Python 3.8 once it's released. + python38_config, ) else: raise Exception('Compiler %s not supported.' % args.compiler) @@ -1479,7 +1468,7 @@ argp.add_argument( choices=[ 'default', 'gcc4.4', 'gcc4.6', 'gcc4.8', 'gcc4.9', 'gcc5.3', 'gcc7.4', 'gcc8.3', 'gcc_musl', 'clang3.4', 'clang3.5', 'clang3.6', 'clang3.7', - 'clang7.0', 'python2.7', 'python3.4', 'python3.5', 'python3.6', + 'clang7.0', 'python2.7', 'python3.5', 'python3.6', 'python3.7', 'python3.8', 'pypy', 'pypy3', 'python_alpine', 'all_the_cpythons', 'electron1.3', 'electron1.6', 'coreclr', 'cmake', 'cmake_vs2015', 'cmake_vs2017'