diff --git a/kokoro/linux/dockerfile/test/java_stretch/Dockerfile b/kokoro/linux/dockerfile/test/java_stretch/Dockerfile index b9f562a2b4..7e1feeafad 100644 --- a/kokoro/linux/dockerfile/test/java_stretch/Dockerfile +++ b/kokoro/linux/dockerfile/test/java_stretch/Dockerfile @@ -1,4 +1,7 @@ -FROM debian:stretch +# Despite the name of this image, we are no longer on stretch. +# We should consider renaming this image, and/or evaluating what +# software versions we actually need. +FROM debian:bullseye # Install dependencies. We start with the basic ones required to build protoc # and the C++ build @@ -22,9 +25,11 @@ RUN apt-get update && apt-get install -y \ wget \ # Java dependencies maven \ - openjdk-8-jdk \ + openjdk-11-jdk \ + # Required for the gtest build. + python2 \ # Python dependencies python3-setuptools \ python3-pip \ - virtualenv \ + python3-venv \ && apt-get clean diff --git a/kokoro/linux/python36/build.sh b/kokoro/linux/python36/build.sh deleted file mode 100755 index a483efc302..0000000000 --- a/kokoro/linux/python36/build.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# -# This is the top-level script we give to Kokoro as the entry point for -# running the "pull request" project: -# -# This script selects a specific Dockerfile (for building a Docker image) and -# a script to run inside that image. Then we delegate to the general -# build_and_run_docker.sh script. - -# Change to repo root -cd $(dirname $0)/../../.. - -export DOCKERHUB_ORGANIZATION=protobuftesting -export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python36 -export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh -export OUTPUT_DIR=testoutput -export TEST_SET="python36" -./kokoro/linux/build_and_run_docker.sh diff --git a/kokoro/linux/python36/continuous.cfg b/kokoro/linux/python36/continuous.cfg deleted file mode 100644 index ee7f4888f8..0000000000 --- a/kokoro/linux/python36/continuous.cfg +++ /dev/null @@ -1,11 +0,0 @@ -# Config file for running tests in Kokoro - -# Location of the build script in repository -build_file: "protobuf/kokoro/linux/python36/build.sh" -timeout_mins: 120 - -action { - define_artifacts { - regex: "**/sponge_log.xml" - } -} diff --git a/kokoro/linux/python36/presubmit.cfg b/kokoro/linux/python36/presubmit.cfg deleted file mode 100644 index ee7f4888f8..0000000000 --- a/kokoro/linux/python36/presubmit.cfg +++ /dev/null @@ -1,11 +0,0 @@ -# Config file for running tests in Kokoro - -# Location of the build script in repository -build_file: "protobuf/kokoro/linux/python36/build.sh" -timeout_mins: 120 - -action { - define_artifacts { - regex: "**/sponge_log.xml" - } -} diff --git a/kokoro/linux/python36_cpp/build.sh b/kokoro/linux/python36_cpp/build.sh deleted file mode 100755 index eb71bda92c..0000000000 --- a/kokoro/linux/python36_cpp/build.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# -# This is the top-level script we give to Kokoro as the entry point for -# running the "pull request" project: -# -# This script selects a specific Dockerfile (for building a Docker image) and -# a script to run inside that image. Then we delegate to the general -# build_and_run_docker.sh script. - -# Change to repo root -cd $(dirname $0)/../../.. - -export DOCKERHUB_ORGANIZATION=protobuftesting -export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/python36 -export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh -export OUTPUT_DIR=testoutput -export TEST_SET="python36_cpp" -./kokoro/linux/build_and_run_docker.sh diff --git a/kokoro/linux/python36_cpp/continuous.cfg b/kokoro/linux/python36_cpp/continuous.cfg deleted file mode 100644 index df9e714494..0000000000 --- a/kokoro/linux/python36_cpp/continuous.cfg +++ /dev/null @@ -1,11 +0,0 @@ -# Config file for running tests in Kokoro - -# Location of the build script in repository -build_file: "protobuf/kokoro/linux/python36_cpp/build.sh" -timeout_mins: 120 - -action { - define_artifacts { - regex: "**/sponge_log.xml" - } -} diff --git a/kokoro/linux/python36_cpp/presubmit.cfg b/kokoro/linux/python36_cpp/presubmit.cfg deleted file mode 100644 index df9e714494..0000000000 --- a/kokoro/linux/python36_cpp/presubmit.cfg +++ /dev/null @@ -1,11 +0,0 @@ -# Config file for running tests in Kokoro - -# Location of the build script in repository -build_file: "protobuf/kokoro/linux/python36_cpp/build.sh" -timeout_mins: 120 - -action { - define_artifacts { - regex: "**/sponge_log.xml" - } -} diff --git a/kokoro/release/python/windows/build_artifacts.bat b/kokoro/release/python/windows/build_artifacts.bat index a8f8f78314..121283a438 100644 --- a/kokoro/release/python/windows/build_artifacts.bat +++ b/kokoro/release/python/windows/build_artifacts.bat @@ -40,16 +40,6 @@ mkdir %ARTIFACT_DIR% REM Build wheel -SET PYTHON=C:\python36_32bit -SET PYTHON_VERSION=3.6 -SET PYTHON_ARCH=32 -CALL build_single_artifact.bat || goto :error - -SET PYTHON=C:\python36 -SET PYTHON_VERSION=3.6 -SET PYTHON_ARCH=64 -CALL build_single_artifact.bat || goto :error - SET PYTHON=C:\python37_32bit SET PYTHON_VERSION=3.7 SET PYTHON_ARCH=32 diff --git a/kokoro/release/python/windows/build_single_artifact.bat b/kokoro/release/python/windows/build_single_artifact.bat index 8d3cd0c9d8..af2d265263 100644 --- a/kokoro/release/python/windows/build_single_artifact.bat +++ b/kokoro/release/python/windows/build_single_artifact.bat @@ -1,11 +1,5 @@ setlocal -if %PYTHON%==C:\python36_32bit set generator=Visual Studio 14 -if %PYTHON%==C:\python36_32bit set vcplatform=Win32 - -if %PYTHON%==C:\python36 set generator=Visual Studio 14 Win64 -if %PYTHON%==C:\python36 set vcplatform=x64 - if %PYTHON%==C:\python37_32bit set generator=Visual Studio 14 if %PYTHON%==C:\python37_32bit set vcplatform=Win32 diff --git a/python/README.md b/python/README.md index f0c9ce4f44..27f22c82c0 100644 --- a/python/README.md +++ b/python/README.md @@ -26,7 +26,7 @@ use python c++ implementation. Installation ============ -1) Make sure you have Python 3.5 or newer. If in doubt, run: +1) Make sure you have Python 3.7 or newer. If in doubt, run: $ python -V diff --git a/python/setup.py b/python/setup.py index 4a2c71c763..290beb4168 100755 --- a/python/setup.py +++ b/python/setup.py @@ -301,8 +301,6 @@ if __name__ == '__main__': classifiers=[ "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", @@ -323,5 +321,5 @@ if __name__ == '__main__': }, install_requires=install_requires, ext_modules=ext_module_list, - python_requires=">=3.5", + python_requires=">=3.7", ) diff --git a/python/tox.ini b/python/tox.ini index 7142b86f0f..b923a4a58e 100644 --- a/python/tox.ini +++ b/python/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{35,36,37,38,39,310}-{cpp,python} + py{37,38,39,310}-{cpp,python} [testenv] usedevelop=true @@ -14,7 +14,7 @@ setenv = commands = python setup.py -q build_py python: python setup.py -q build - py{35,36,37,38,39,310}-cpp: python setup.py -q build --cpp_implementation --warnings_as_errors --compile_static_extension + py{37,38,39,310}-cpp: python setup.py -q build --cpp_implementation --warnings_as_errors --compile_static_extension python: python setup.py -q test -q cpp: python setup.py -q test -q --cpp_implementation python: python setup.py -q test_conformance diff --git a/tests.sh b/tests.sh index 13bf034da6..8ea5ae6f6b 100755 --- a/tests.sh +++ b/tests.sh @@ -116,12 +116,12 @@ build_dist_install() { # Try to install Java pushd java - use_java jdk8 + use_java jdk11 $MVN install popd # Try to install Python - virtualenv --no-site-packages venv + python3 -m venv venv source venv/bin/activate pushd python python3 setup.py clean build sdist @@ -189,6 +189,10 @@ build_golang() { use_java() { version=$1 case "$version" in + jdk11) + export PATH=/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH + export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 + ;; jdk8) export PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin:$PATH export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 @@ -268,7 +272,7 @@ build_java_linkage_monitor() { # Linkage Monitor checks compatibility with other Google libraries # https://github.com/GoogleCloudPlatform/cloud-opensource-java/tree/master/linkage-monitor - use_java jdk8 + use_java jdk11 internal_build_cpp # Linkage Monitor uses $HOME/.m2 local repository @@ -330,12 +334,7 @@ build_objectivec_cocoapods_integration() { build_python() { internal_build_cpp cd python - if [ $(uname -s) == "Linux" ]; then - envlist=py\{35,36\}-python - else - envlist=py\{36\}-python - fi - python -m tox -e $envlist + tox --skip-missing-interpreters cd .. } @@ -343,26 +342,10 @@ build_python_version() { internal_build_cpp cd python envlist=$1 - python -m tox -e $envlist + tox -e $envlist cd .. } -build_python33() { - build_python_version py33-python -} - -build_python34() { - build_python_version py34-python -} - -build_python35() { - build_python_version py35-python -} - -build_python36() { - build_python_version py36-python -} - build_python37() { build_python_version py37-python } @@ -384,12 +367,7 @@ build_python_cpp() { export LD_LIBRARY_PATH=../src/.libs # for Linux export DYLD_LIBRARY_PATH=../src/.libs # for OS X cd python - if [ $(uname -s) == "Linux" ]; then - envlist=py\{35,36\}-cpp - else - envlist=py\{36\}-cpp - fi - tox -e $envlist + tox --skip-missing-interpreters cd .. } @@ -403,22 +381,6 @@ build_python_cpp_version() { cd .. } -build_python33_cpp() { - build_python_cpp_version py33-cpp -} - -build_python34_cpp() { - build_python_cpp_version py34-cpp -} - -build_python35_cpp() { - build_python_cpp_version py35-cpp -} - -build_python36_cpp() { - build_python_cpp_version py36-cpp -} - build_python37_cpp() { build_python_cpp_version py37-cpp }