From 55cf79cc4b62ad398845f72807817ef7f9a11965 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Fri, 14 Feb 2025 14:44:47 -0800 Subject: [PATCH] [CI] Drop Python 3.8 (#38747) Removed Python 3.8 builds and tests, to be aligned with [the Foundational Python Support](https://github.com/google/oss-policies-info/blob/e1ee4cc2cf0e906910430d1bea1c2e24c2c55425/foundational-python-support-matrix.md?plain=1#L6). Closes #38747 PiperOrigin-RevId: 727070251 --- bazel/update_mirror.sh | 2 ++ build_handwritten.yaml | 1 - src/python/grpcio/python_version.py | 4 +-- src/python/grpcio_admin/python_version.py | 4 +-- src/python/grpcio_channelz/python_version.py | 4 +-- src/python/grpcio_csds/python_version.py | 4 +-- .../python_version.py | 4 +-- .../grpcio_health_checking/python_version.py | 4 +-- .../grpcio_observability/python_version.py | 4 +-- .../grpcio_reflection/python_version.py | 4 +-- src/python/grpcio_status/python_version.py | 4 +-- .../dockerfile/compile_python_38.include | 20 -------------- .../Dockerfile.template | 1 - .../dockerimage_current_versions.bzl | 4 +-- tools/distrib/docgen/_generate_python_doc.sh | 2 +- .../grpcio_tools/grpc_tools/python_version.py | 4 +-- .../python/grpcio_tools/python_version.py | 4 +-- .../python/xds_protos/python_version.py | 4 +-- ...on_python38_buster_aarch64.current_version | 1 - ...on_python39_buster_aarch64.current_version | 1 + .../Dockerfile | 2 +- ...ython_debian11_default_x64.current_version | 2 +- .../python_debian11_default_x64/Dockerfile | 21 --------------- .../helper_scripts/prepare_build_macos_rc | 10 ------- .../aws/grpc_run_basictests_python_aarch64.sh | 4 +-- .../macos/grpc_distribtests_python.sh | 1 - tools/run_tests/artifacts/artifact_targets.py | 26 ++++++------------- .../artifacts/distribtest_targets.py | 2 +- tools/run_tests/run_tests.py | 17 +++--------- 29 files changed, 46 insertions(+), 119 deletions(-) delete mode 100644 templates/tools/dockerfile/compile_python_38.include delete mode 100644 tools/dockerfile/distribtest/python_python38_buster_aarch64.current_version create mode 100644 tools/dockerfile/distribtest/python_python39_buster_aarch64.current_version rename tools/dockerfile/distribtest/{python_python38_buster_aarch64 => python_python39_buster_aarch64}/Dockerfile (95%) diff --git a/bazel/update_mirror.sh b/bazel/update_mirror.sh index 5664b063aa27e..fa129584e14c0 100755 --- a/bazel/update_mirror.sh +++ b/bazel/update_mirror.sh @@ -57,9 +57,11 @@ function upload { # upload "github.com/google/boringssl/archive/1c2769383f027befac5b75b6cedd25daf3bf4dcf.tar.gz" # bazel binaries used by the tools/bazel wrapper script +upload github.com/bazelbuild/bazel/releases/download/7.4.1/bazel-7.4.1-linux-arm64 upload github.com/bazelbuild/bazel/releases/download/7.4.1/bazel-7.4.1-linux-x86_64 upload github.com/bazelbuild/bazel/releases/download/7.4.1/bazel-7.4.1-darwin-x86_64 upload github.com/bazelbuild/bazel/releases/download/7.4.1/bazel-7.4.1-windows-x86_64.exe +upload github.com/bazelbuild/bazel/releases/download/8.0.1/bazel-8.0.1-linux-arm64 upload github.com/bazelbuild/bazel/releases/download/8.0.1/bazel-8.0.1-linux-x86_64 upload github.com/bazelbuild/bazel/releases/download/8.0.1/bazel-8.0.1-darwin-x86_64 upload github.com/bazelbuild/bazel/releases/download/8.0.1/bazel-8.0.1-windows-x86_64.exe diff --git a/build_handwritten.yaml b/build_handwritten.yaml index 8b9f5cc29c8c4..39b6a933a3169 100644 --- a/build_handwritten.yaml +++ b/build_handwritten.yaml @@ -17,7 +17,6 @@ settings: g_stands_for: gears protobuf_version: 3.29.0 supported_python_versions: - - '3.8' - '3.9' - '3.10' - '3.11' diff --git a/src/python/grpcio/python_version.py b/src/python/grpcio/python_version.py index 4faab63465c01..8dec0edb651ca 100644 --- a/src/python/grpcio/python_version.py +++ b/src/python/grpcio/python_version.py @@ -14,7 +14,7 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/python_version.py.template`!!! -SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] +SUPPORTED_PYTHON_VERSIONS = ['3.9', '3.10', '3.11', '3.12', '3.13'] -MIN_PYTHON_VERSION = 3.8 +MIN_PYTHON_VERSION = 3.9 MAX_PYTHON_VERSION = 3.13 diff --git a/src/python/grpcio_admin/python_version.py b/src/python/grpcio_admin/python_version.py index d47284cb06f3a..23789a6813eca 100644 --- a/src/python/grpcio_admin/python_version.py +++ b/src/python/grpcio_admin/python_version.py @@ -14,7 +14,7 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_admin/python_version.py.template`!!! -SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] +SUPPORTED_PYTHON_VERSIONS = ['3.9', '3.10', '3.11', '3.12', '3.13'] -MIN_PYTHON_VERSION = 3.8 +MIN_PYTHON_VERSION = 3.9 MAX_PYTHON_VERSION = 3.13 diff --git a/src/python/grpcio_channelz/python_version.py b/src/python/grpcio_channelz/python_version.py index 74755fdb1a983..df7079ff9f0ed 100644 --- a/src/python/grpcio_channelz/python_version.py +++ b/src/python/grpcio_channelz/python_version.py @@ -14,7 +14,7 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_channelz/python_version.py.template`!!! -SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] +SUPPORTED_PYTHON_VERSIONS = ['3.9', '3.10', '3.11', '3.12', '3.13'] -MIN_PYTHON_VERSION = 3.8 +MIN_PYTHON_VERSION = 3.9 MAX_PYTHON_VERSION = 3.13 diff --git a/src/python/grpcio_csds/python_version.py b/src/python/grpcio_csds/python_version.py index 5d9e6b076eab1..986e5fc82d5ff 100644 --- a/src/python/grpcio_csds/python_version.py +++ b/src/python/grpcio_csds/python_version.py @@ -14,7 +14,7 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_csds/python_version.py.template`!!! -SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] +SUPPORTED_PYTHON_VERSIONS = ['3.9', '3.10', '3.11', '3.12', '3.13'] -MIN_PYTHON_VERSION = 3.8 +MIN_PYTHON_VERSION = 3.9 MAX_PYTHON_VERSION = 3.13 diff --git a/src/python/grpcio_csm_observability/python_version.py b/src/python/grpcio_csm_observability/python_version.py index 4309c6a3ce0fa..0b5bf6c96320d 100644 --- a/src/python/grpcio_csm_observability/python_version.py +++ b/src/python/grpcio_csm_observability/python_version.py @@ -14,7 +14,7 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_csm_observability/python_version.py.template`!!! -SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] +SUPPORTED_PYTHON_VERSIONS = ['3.9', '3.10', '3.11', '3.12', '3.13'] -MIN_PYTHON_VERSION = 3.8 +MIN_PYTHON_VERSION = 3.9 MAX_PYTHON_VERSION = 3.13 diff --git a/src/python/grpcio_health_checking/python_version.py b/src/python/grpcio_health_checking/python_version.py index 96e4e2f0e06c2..732738ee10505 100644 --- a/src/python/grpcio_health_checking/python_version.py +++ b/src/python/grpcio_health_checking/python_version.py @@ -14,7 +14,7 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_health_checking/python_version.py.template`!!! -SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] +SUPPORTED_PYTHON_VERSIONS = ['3.9', '3.10', '3.11', '3.12', '3.13'] -MIN_PYTHON_VERSION = 3.8 +MIN_PYTHON_VERSION = 3.9 MAX_PYTHON_VERSION = 3.13 diff --git a/src/python/grpcio_observability/python_version.py b/src/python/grpcio_observability/python_version.py index aca7367b65c09..6763d4e292ff3 100644 --- a/src/python/grpcio_observability/python_version.py +++ b/src/python/grpcio_observability/python_version.py @@ -14,7 +14,7 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_observability/python_version.py.template`!!! -SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] +SUPPORTED_PYTHON_VERSIONS = ['3.9', '3.10', '3.11', '3.12', '3.13'] -MIN_PYTHON_VERSION = 3.8 +MIN_PYTHON_VERSION = 3.9 MAX_PYTHON_VERSION = 3.13 diff --git a/src/python/grpcio_reflection/python_version.py b/src/python/grpcio_reflection/python_version.py index e94e725d14d78..205a6cdabd703 100644 --- a/src/python/grpcio_reflection/python_version.py +++ b/src/python/grpcio_reflection/python_version.py @@ -14,7 +14,7 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_reflection/python_version.py.template`!!! -SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] +SUPPORTED_PYTHON_VERSIONS = ['3.9', '3.10', '3.11', '3.12', '3.13'] -MIN_PYTHON_VERSION = 3.8 +MIN_PYTHON_VERSION = 3.9 MAX_PYTHON_VERSION = 3.13 diff --git a/src/python/grpcio_status/python_version.py b/src/python/grpcio_status/python_version.py index 02de6673e4b95..db17654aa2a2b 100644 --- a/src/python/grpcio_status/python_version.py +++ b/src/python/grpcio_status/python_version.py @@ -14,7 +14,7 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_status/python_version.py.template`!!! -SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] +SUPPORTED_PYTHON_VERSIONS = ['3.9', '3.10', '3.11', '3.12', '3.13'] -MIN_PYTHON_VERSION = 3.8 +MIN_PYTHON_VERSION = 3.9 MAX_PYTHON_VERSION = 3.13 diff --git a/templates/tools/dockerfile/compile_python_38.include b/templates/tools/dockerfile/compile_python_38.include deleted file mode 100644 index ddce2b4f6eb7b..0000000000000 --- a/templates/tools/dockerfile/compile_python_38.include +++ /dev/null @@ -1,20 +0,0 @@ -#================= -# Compile CPython 3.8.13 from source - -RUN apt-get update && apt-get install -y zlib1g-dev libssl-dev libsqlite3-dev && apt-get clean -RUN apt-get update && apt-get install -y jq build-essential libffi-dev && apt-get clean - -RUN cd /tmp && ${'\\'} - wget -q https://www.python.org/ftp/python/3.8.13/Python-3.8.13.tgz && ${'\\'} - tar xzvf Python-3.8.13.tgz && ${'\\'} - cd Python-3.8.13 && ${'\\'} - ./configure && ${'\\'} - make -j4 && ${'\\'} - make install - -RUN cd /tmp && ${'\\'} - echo "3c49180c6b43df3519849b7e390af0b9 Python-3.8.13.tgz" > checksum.md5 && ${'\\'} - md5sum -c checksum.md5 - -RUN python3.8 -m ensurepip && ${'\\'} - python3.8 -m pip install coverage diff --git a/templates/tools/dockerfile/test/python_debian11_default_x64/Dockerfile.template b/templates/tools/dockerfile/test/python_debian11_default_x64/Dockerfile.template index bba2fdebf9c6a..9e2118d7da02d 100644 --- a/templates/tools/dockerfile/test/python_debian11_default_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/python_debian11_default_x64/Dockerfile.template @@ -19,7 +19,6 @@ <%include file="../../apt_get_basic.include"/> <%include file="../../run_tests_addons.include"/> - <%include file="../../compile_python_38.include"/> <%include file="../../compile_python_310.include"/> <%include file="../../compile_python_311.include"/> <%include file="../../compile_python_312.include"/> diff --git a/tools/bazelify_tests/dockerimage_current_versions.bzl b/tools/bazelify_tests/dockerimage_current_versions.bzl index 855bf4c500aed..bb3c292a80acc 100644 --- a/tools/bazelify_tests/dockerimage_current_versions.bzl +++ b/tools/bazelify_tests/dockerimage_current_versions.bzl @@ -52,7 +52,7 @@ DOCKERIMAGE_CURRENT_VERSIONS = { "tools/dockerfile/distribtest/python_dev_ubuntu2204_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_dev_ubuntu2204_x64@sha256:4fc253b24afa128d6295c4e1ac71ea4f8602c7153f4e2e0f38433c14236ec643", "tools/dockerfile/distribtest/python_fedora39_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_fedora39_x64@sha256:f2ad099b0d3553f37077705aaf6d221906fba88f0502e7131024a936ec40f58e", "tools/dockerfile/distribtest/python_opensuse_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_opensuse_x64@sha256:962e835125423300b800e0448b698de0ff8397819b90c2a8c15fef281619f1b6", - "tools/dockerfile/distribtest/python_python38_buster_aarch64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_python38_buster_aarch64@sha256:0a93bf2a0303aebe1280bafad69df228b9444af9144c767d8169ecc70fb383f6", + "tools/dockerfile/distribtest/python_python39_buster_aarch64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_python39_buster_aarch64@sha256:8f8c51df62e55151db1fec8fc131297f730e2733be02c0bd3933afc993c3d887", "tools/dockerfile/distribtest/python_ubuntu2004_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_ubuntu2004_x64@sha256:288cf72bc98fc384b9352d1f6d258b3513925ffe5746dda7e2e343723dd5f733", "tools/dockerfile/distribtest/python_ubuntu2204_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_ubuntu2204_x64@sha256:6054d639247a93af2b496f3c1ce48f63b2e07f5ba54e025f69bb232a747c644e", "tools/dockerfile/distribtest/ruby_debian11_x64_ruby_3_0.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64_ruby_3_0@sha256:05c579d93764f12db1a60fa78a26e0f4d6179e54187a3a531c8ff955001731ec", @@ -111,7 +111,7 @@ DOCKERIMAGE_CURRENT_VERSIONS = { "tools/dockerfile/test/php8_zts_debian12_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/php8_zts_debian12_x64@sha256:911241a4e38046b603245d56a1ca9491e81990ca9dedb0671e41b15387e3d2ee", "tools/dockerfile/test/python_alpine_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_alpine_x64@sha256:01e99e5dcee30255a4683ebd308b6484b5aa4624dd514fc7d83df5fd1a0144be", "tools/dockerfile/test/python_debian11_default_arm64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_arm64@sha256:fccca33a655c7aa89dd7ebd9492cbcc1f636bd2a004cd939d1982cfce3d68326", - "tools/dockerfile/test/python_debian11_default_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_x64@sha256:5dd3020951638968c17e88dc4a7266413751645fb9de78185da7f73aaa6e9481", + "tools/dockerfile/test/python_debian11_default_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_x64@sha256:29fcc464fcbcbd9f6a956c090e962f9360d1231eebab140cf2b8aacea71c50d5", "tools/dockerfile/test/rbe_ubuntu2004.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/rbe_ubuntu2004@sha256:b3eb1a17b7b091e3c5648a803076b2c40601242ff91c04d55997af6641305f68", "tools/dockerfile/test/ruby_debian11_arm64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_arm64@sha256:d2e79919b2e2d4cc36a29682ecb5170641df4fb506cfb453978ffdeb8a841bd9", "tools/dockerfile/test/ruby_debian11_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian11_x64@sha256:6e8b4696ba0661f11a31ed0992a94d2efcd889a018f57160f0e2fb62963f3593", diff --git a/tools/distrib/docgen/_generate_python_doc.sh b/tools/distrib/docgen/_generate_python_doc.sh index b1d485af0d72f..f8427d6b51ab1 100755 --- a/tools/distrib/docgen/_generate_python_doc.sh +++ b/tools/distrib/docgen/_generate_python_doc.sh @@ -24,7 +24,7 @@ HOME="$(mktemp -d)" export HOME pip install -r tools/distrib/docgen/requirements.docs.lock -tools/run_tests/run_tests.py -c opt -l python --compiler python3.8 --newline_on_success -j 8 --build_only +tools/run_tests/run_tests.py -c opt -l python --compiler python3.9 --newline_on_success -j 8 --build_only # shellcheck disable=SC1091 source py38/bin/activate pip install --upgrade Sphinx diff --git a/tools/distrib/python/grpcio_tools/grpc_tools/python_version.py b/tools/distrib/python/grpcio_tools/grpc_tools/python_version.py index 0dcc71c1fdab7..665b4543482b4 100644 --- a/tools/distrib/python/grpcio_tools/grpc_tools/python_version.py +++ b/tools/distrib/python/grpcio_tools/grpc_tools/python_version.py @@ -14,7 +14,7 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_tools/python_version.py.template`!!! -SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] +SUPPORTED_PYTHON_VERSIONS = ['3.9', '3.10', '3.11', '3.12', '3.13'] -MIN_PYTHON_VERSION = 3.8 +MIN_PYTHON_VERSION = 3.9 MAX_PYTHON_VERSION = 3.13 diff --git a/tools/distrib/python/grpcio_tools/python_version.py b/tools/distrib/python/grpcio_tools/python_version.py index fc59f030fbbd8..86bb06721d6f4 100644 --- a/tools/distrib/python/grpcio_tools/python_version.py +++ b/tools/distrib/python/grpcio_tools/python_version.py @@ -14,7 +14,7 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/python_version.py.template`!!! -SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] +SUPPORTED_PYTHON_VERSIONS = ['3.9', '3.10', '3.11', '3.12', '3.13'] -MIN_PYTHON_VERSION = 3.8 +MIN_PYTHON_VERSION = 3.9 MAX_PYTHON_VERSION = 3.13 diff --git a/tools/distrib/python/xds_protos/python_version.py b/tools/distrib/python/xds_protos/python_version.py index 80cce2eb4c544..b6bdf4420ee26 100644 --- a/tools/distrib/python/xds_protos/python_version.py +++ b/tools/distrib/python/xds_protos/python_version.py @@ -14,7 +14,7 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/xds_protos/python_version.py.template`!!! -SUPPORTED_PYTHON_VERSIONS = ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] +SUPPORTED_PYTHON_VERSIONS = ['3.9', '3.10', '3.11', '3.12', '3.13'] -MIN_PYTHON_VERSION = 3.8 +MIN_PYTHON_VERSION = 3.9 MAX_PYTHON_VERSION = 3.13 diff --git a/tools/dockerfile/distribtest/python_python38_buster_aarch64.current_version b/tools/dockerfile/distribtest/python_python38_buster_aarch64.current_version deleted file mode 100644 index 1898a638e68ce..0000000000000 --- a/tools/dockerfile/distribtest/python_python38_buster_aarch64.current_version +++ /dev/null @@ -1 +0,0 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/python_python38_buster_aarch64:edf5161ef67ec611c2a94177ac002f18e39402fd@sha256:0a93bf2a0303aebe1280bafad69df228b9444af9144c767d8169ecc70fb383f6 \ No newline at end of file diff --git a/tools/dockerfile/distribtest/python_python39_buster_aarch64.current_version b/tools/dockerfile/distribtest/python_python39_buster_aarch64.current_version new file mode 100644 index 0000000000000..03f3f2501102b --- /dev/null +++ b/tools/dockerfile/distribtest/python_python39_buster_aarch64.current_version @@ -0,0 +1 @@ +us-docker.pkg.dev/grpc-testing/testing-images-public/python_python39_buster_aarch64:c82053c0e45567ae212bee1f74379de306efb549@sha256:8f8c51df62e55151db1fec8fc131297f730e2733be02c0bd3933afc993c3d887 \ No newline at end of file diff --git a/tools/dockerfile/distribtest/python_python38_buster_aarch64/Dockerfile b/tools/dockerfile/distribtest/python_python39_buster_aarch64/Dockerfile similarity index 95% rename from tools/dockerfile/distribtest/python_python38_buster_aarch64/Dockerfile rename to tools/dockerfile/distribtest/python_python39_buster_aarch64/Dockerfile index 7802138394d2b..dde6fb81c013c 100644 --- a/tools/dockerfile/distribtest/python_python38_buster_aarch64/Dockerfile +++ b/tools/dockerfile/distribtest/python_python39_buster_aarch64/Dockerfile @@ -13,6 +13,6 @@ # limitations under the License. # this an aarch64 image, qemu emulator will be used to run the tests -FROM arm64v8/python:3.8-buster +FROM arm64v8/python:3.9-buster RUN python3 -m pip install virtualenv diff --git a/tools/dockerfile/test/python_debian11_default_x64.current_version b/tools/dockerfile/test/python_debian11_default_x64.current_version index c158d74feb6cd..bbf1135798042 100644 --- a/tools/dockerfile/test/python_debian11_default_x64.current_version +++ b/tools/dockerfile/test/python_debian11_default_x64.current_version @@ -1 +1 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_x64:166180a7ba2d2b169c52068b7a53a3b87ea73ec2@sha256:5dd3020951638968c17e88dc4a7266413751645fb9de78185da7f73aaa6e9481 \ No newline at end of file +us-docker.pkg.dev/grpc-testing/testing-images-public/python_debian11_default_x64:073d45cee5a5a8988c3e4a9eea8a751c33488927@sha256:29fcc464fcbcbd9f6a956c090e962f9360d1231eebab140cf2b8aacea71c50d5 \ No newline at end of file diff --git a/tools/dockerfile/test/python_debian11_default_x64/Dockerfile b/tools/dockerfile/test/python_debian11_default_x64/Dockerfile index 5fca2380d98da..00523f4616224 100644 --- a/tools/dockerfile/test/python_debian11_default_x64/Dockerfile +++ b/tools/dockerfile/test/python_debian11_default_x64/Dockerfile @@ -66,27 +66,6 @@ RUN git config --global protocol.file.allow always RUN mkdir /var/local/jenkins -#================= -# Compile CPython 3.8.13 from source - -RUN apt-get update && apt-get install -y zlib1g-dev libssl-dev libsqlite3-dev && apt-get clean -RUN apt-get update && apt-get install -y jq build-essential libffi-dev && apt-get clean - -RUN cd /tmp && \ - wget -q https://www.python.org/ftp/python/3.8.13/Python-3.8.13.tgz && \ - tar xzvf Python-3.8.13.tgz && \ - cd Python-3.8.13 && \ - ./configure && \ - make -j4 && \ - make install - -RUN cd /tmp && \ - echo "3c49180c6b43df3519849b7e390af0b9 Python-3.8.13.tgz" > checksum.md5 && \ - md5sum -c checksum.md5 - -RUN python3.8 -m ensurepip && \ - python3.8 -m pip install coverage - #================= # Compile CPython 3.10.3 from source diff --git a/tools/internal_ci/helper_scripts/prepare_build_macos_rc b/tools/internal_ci/helper_scripts/prepare_build_macos_rc index dc3e5d20662e5..020ef7f93fb7f 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_macos_rc +++ b/tools/internal_ci/helper_scripts/prepare_build_macos_rc @@ -125,16 +125,6 @@ then time pip install --user -r $DIR/requirements.macos.txt time pip install --user --upgrade virtualenv Mako tox setuptools==44.1.1 twisted - # Force reinstall of python3.8 to upgrade its patch version. - # Kokoro mac workers come with python 3.8.2 and that version - # suffers from https://bugs.python.org/issue22490. - # See https://github.com/grpc/grpc/pull/28963. - time curl -O https://www.python.org/ftp/python/3.8.10/python-3.8.10-macosx10.9.pkg - echo "4c65bc7534d5f07edacbe0fbd609b5734dbf3ac02f5444f9bd97963d589d8afd python-3.8.10-macosx10.9.pkg" > /tmp/python_installer_checksum.sha256 - shasum -c /tmp/python_installer_checksum.sha256 - time sudo installer -pkg ./python-3.8.10-macosx10.9.pkg -target / - python3.8 --version - # Install Python 3.9 if it doesn't exist if [ ! -f "/usr/local/bin/python3.9" ]; then time curl -O https://www.python.org/ftp/python/3.9.10/python-3.9.10-macosx10.9.pkg diff --git a/tools/internal_ci/linux/aws/grpc_run_basictests_python_aarch64.sh b/tools/internal_ci/linux/aws/grpc_run_basictests_python_aarch64.sh index 4726c3c25fb8c..98b028452ffa2 100755 --- a/tools/internal_ci/linux/aws/grpc_run_basictests_python_aarch64.sh +++ b/tools/internal_ci/linux/aws/grpc_run_basictests_python_aarch64.sh @@ -28,8 +28,8 @@ cd grpc git submodule update --init -# build and test python (currently we only test with python3.8, but that's ok since our aarch64 testing resources are limited) -tools/run_tests/run_tests.py -l python --compiler python3.8 -c opt -t -x run_tests/python_linux_opt_native/sponge_log.xml --report_suite_name python_linux_opt_native --report_multi_target || FAILED=true +# build and test python (currently we only test with python3.9, but that's ok since our aarch64 testing resources are limited) +tools/run_tests/run_tests.py -l python --compiler python3.9 -c opt -t -x run_tests/python_linux_opt_native/sponge_log.xml --report_suite_name python_linux_opt_native --report_multi_target || FAILED=true if [ "$FAILED" != "" ] then diff --git a/tools/internal_ci/macos/grpc_distribtests_python.sh b/tools/internal_ci/macos/grpc_distribtests_python.sh index fa651af4e8a72..22611e2601b0a 100644 --- a/tools/internal_ci/macos/grpc_distribtests_python.sh +++ b/tools/internal_ci/macos/grpc_distribtests_python.sh @@ -26,7 +26,6 @@ source tools/internal_ci/helper_scripts/prepare_build_macos_rc # TODO(jtattermusch): cleanup this prepare build step (needed for python artifact build) # install cython for all python versions -python3.8 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user python3.9 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user python3.10 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user python3.11 -m pip install -U 'cython<4.0.0rc1' setuptools==65.4.1 wheel --user diff --git a/tools/run_tests/artifacts/artifact_targets.py b/tools/run_tests/artifacts/artifact_targets.py index 4d54621a96593..244c0e7480a8b 100644 --- a/tools/run_tests/artifacts/artifact_targets.py +++ b/tools/run_tests/artifacts/artifact_targets.py @@ -410,7 +410,6 @@ def targets(): ProtocArtifact("macos", "x64", presubmit=True), ProtocArtifact("windows", "x64", presubmit=True), ProtocArtifact("windows", "x86", presubmit=True), - PythonArtifact("manylinux2014", "x64", "cp38-cp38", presubmit=True), PythonArtifact("manylinux2014", "x64", "cp39-cp39", presubmit=True), PythonArtifact("manylinux2014", "x64", "cp310-cp310"), PythonArtifact("manylinux2014", "x64", "cp311-cp311"), @@ -418,7 +417,6 @@ def targets(): PythonArtifact( "manylinux2014", "x64", "cp313-cp313", presubmit=True ), - PythonArtifact("manylinux2014", "x86", "cp38-cp38", presubmit=True), PythonArtifact("manylinux2014", "x86", "cp39-cp39", presubmit=True), PythonArtifact("manylinux2014", "x86", "cp310-cp310"), PythonArtifact("manylinux2014", "x86", "cp311-cp311"), @@ -427,33 +425,29 @@ def targets(): "manylinux2014", "x86", "cp313-cp313", presubmit=True ), PythonArtifact( - "manylinux2014", "aarch64", "cp38-cp38", presubmit=True + "manylinux2014", "aarch64", "cp39-cp39", presubmit=True ), - PythonArtifact("manylinux2014", "aarch64", "cp39-cp39"), PythonArtifact("manylinux2014", "aarch64", "cp310-cp310"), PythonArtifact("manylinux2014", "aarch64", "cp311-cp311"), PythonArtifact("manylinux2014", "aarch64", "cp312-cp312"), PythonArtifact( "manylinux2014", "aarch64", "cp313-cp313", presubmit=True ), - PythonArtifact("linux_extra", "armv7", "cp38-cp38", presubmit=True), - PythonArtifact("linux_extra", "armv7", "cp39-cp39"), + PythonArtifact("linux_extra", "armv7", "cp39-cp39", presubmit=True), PythonArtifact("linux_extra", "armv7", "cp310-cp310"), PythonArtifact("linux_extra", "armv7", "cp311-cp311"), PythonArtifact("linux_extra", "armv7", "cp312-cp312"), PythonArtifact( "linux_extra", "armv7", "cp313-cp313", presubmit=True ), - PythonArtifact("musllinux_1_1", "x64", "cp38-cp38", presubmit=True), - PythonArtifact("musllinux_1_1", "x64", "cp39-cp39"), + PythonArtifact("musllinux_1_1", "x64", "cp39-cp39", presubmit=True), PythonArtifact("musllinux_1_1", "x64", "cp310-cp310"), PythonArtifact("musllinux_1_1", "x64", "cp311-cp311"), PythonArtifact("musllinux_1_1", "x64", "cp312-cp312"), PythonArtifact( "musllinux_1_1", "x64", "cp313-cp313", presubmit=True ), - PythonArtifact("musllinux_1_1", "x86", "cp38-cp38", presubmit=True), - PythonArtifact("musllinux_1_1", "x86", "cp39-cp39"), + PythonArtifact("musllinux_1_1", "x86", "cp39-cp39", presubmit=True), PythonArtifact("musllinux_1_1", "x86", "cp310-cp310"), PythonArtifact("musllinux_1_1", "x86", "cp311-cp311"), PythonArtifact("musllinux_1_1", "x86", "cp312-cp312"), @@ -461,29 +455,25 @@ def targets(): "musllinux_1_1", "x86", "cp313-cp313", presubmit=True ), PythonArtifact( - "musllinux_1_1", "aarch64", "cp38-cp38", presubmit=True + "musllinux_1_1", "aarch64", "cp39-cp39", presubmit=True ), - PythonArtifact("musllinux_1_1", "aarch64", "cp39-cp39"), PythonArtifact("musllinux_1_1", "aarch64", "cp310-cp310"), PythonArtifact("musllinux_1_1", "aarch64", "cp311-cp311"), PythonArtifact("musllinux_1_1", "aarch64", "cp312-cp312"), PythonArtifact( "musllinux_1_1", "aarch64", "cp313-cp313", presubmit=True ), - PythonArtifact("macos", "x64", "python3.8", presubmit=True), - PythonArtifact("macos", "x64", "python3.9"), + PythonArtifact("macos", "x64", "python3.9", presubmit=True), PythonArtifact("macos", "x64", "python3.10"), PythonArtifact("macos", "x64", "python3.11"), PythonArtifact("macos", "x64", "python3.12"), PythonArtifact("macos", "x64", "python3.13", presubmit=True), - PythonArtifact("windows", "x86", "Python38_32bit", presubmit=True), - PythonArtifact("windows", "x86", "Python39_32bit"), + PythonArtifact("windows", "x86", "Python39_32bit", presubmit=True), PythonArtifact("windows", "x86", "Python310_32bit"), PythonArtifact("windows", "x86", "Python311_32bit"), PythonArtifact("windows", "x86", "Python312_32bit"), PythonArtifact("windows", "x86", "Python313_32bit", presubmit=True), - PythonArtifact("windows", "x64", "Python38", presubmit=True), - PythonArtifact("windows", "x64", "Python39"), + PythonArtifact("windows", "x64", "Python39", presubmit=True), PythonArtifact("windows", "x64", "Python310"), PythonArtifact("windows", "x64", "Python311"), PythonArtifact("windows", "x64", "Python312"), diff --git a/tools/run_tests/artifacts/distribtest_targets.py b/tools/run_tests/artifacts/distribtest_targets.py index 9741c186d71c4..8f5f2642733ed 100644 --- a/tools/run_tests/artifacts/distribtest_targets.py +++ b/tools/run_tests/artifacts/distribtest_targets.py @@ -459,7 +459,7 @@ def targets(): PythonDistribTest("linux", "x64", "alpine"), PythonDistribTest("linux", "x64", "ubuntu2204"), PythonDistribTest( - "linux", "aarch64", "python38_buster", presubmit=True + "linux", "aarch64", "python39_buster", presubmit=True ), PythonDistribTest("linux", "aarch64", "alpine"), PythonDistribTest( diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index ae5d237c5c222..190ef7a2d691f 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -810,13 +810,6 @@ def _get_pythons(self, args): # TODO: Supported version range should be defined by a single # source of truth. - python38_config = _python_config_generator( - name="py38", - major="3", - minor="8", - bits=bits, - config_vars=config_vars, - ) python39_config = _python_config_generator( name="py39", major="3", @@ -861,12 +854,12 @@ def _get_pythons(self, args): if args.compiler == "default": if os.name == "nt": - return (python38_config,) + return (python39_config,) elif os.uname()[0] == "Darwin": # NOTE(rbellevi): Testing takes significantly longer on # MacOS, so we restrict the number of interpreter versions # tested. - return (python38_config,) + return (python39_config,) elif platform.machine() == "aarch64": # Currently the python_debian11_default_arm64 docker image # only has python3.9 installed (and that seems sufficient @@ -875,11 +868,9 @@ def _get_pythons(self, args): else: # Default set tested on master. Test oldest and newest. return ( - python38_config, + python39_config, python313_config, ) - elif args.compiler == "python3.8": - return (python38_config,) elif args.compiler == "python3.9": return (python39_config,) elif args.compiler == "python3.10": @@ -898,7 +889,6 @@ def _get_pythons(self, args): return (python311_config,) elif args.compiler == "all_the_cpythons": return ( - python38_config, python39_config, python310_config, python311_config, @@ -1720,7 +1710,6 @@ def _build_and_run( "clang7", "clang19", # TODO: Automatically populate from supported version - "python3.8", "python3.9", "python3.10", "python3.11",