Files
grpc/examples/python/compression/BUILD.bazel
Sergii Tkachenko 0497da859e [CI] Use python 3.9+ everywhere (#40139)
- Upgrade the base image of  https://us-docker.pkg.dev/grpc-testing/testing-images-public/bazel to newer https://gcr.io/oss-fuzz-base/base-builder@sha256:4f3ca10accd14292556601d70e457fa85ad57180c913484427869d3379a07684, which comes with python3.11

  Before:
  ```

  Python 3.8.3 (default, Mar 12 2024, 03:21:22)
  [Clang 15.0.0 (https://github.com/llvm/llvm-project.git bf7f8d6fa6f460bf0a16ffe
  ```

  After:
  ```
  Python 3.11.13 (main, Jul 16 2025, 03:42:11)
  [Clang 18.1.8 (https://github.com/llvm/llvm-project.git 3b5b5c1ec4a3095ab096dd78
  ```
- Refactor and improve  https://us-docker.pkg.dev/grpc-testing/testing-images-public/sanity. Removed building python 3.7 from source.
- Switch Windows builds to use `3.9.13` (previously `3.8.10`)
- Changed minimum python version in bazel builds from 3.8 to 3.9.
- Updated pylint to use python3.11.
- Various minor compatibility fixes.

There's a few other dependencies/settings that can be upgraded now that we're using 3.9+. I'll make them in a follow-up PR.

Closes #40139

PiperOrigin-RevId: 786775922
2025-07-24 11:31:19 -07:00

54 lines
1.5 KiB
Python

# Copyright 2019 The 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.
load("@rules_python//python:defs.bzl", "py_binary", "py_test")
py_binary(
name = "server",
srcs = ["server.py"],
imports = ["../../protos"],
python_version = "PY3",
srcs_version = "PY2AND3",
deps = [
"//examples/protos:helloworld_py_pb2",
"//examples/protos:helloworld_py_pb2_grpc",
"//src/python/grpcio/grpc:grpcio",
],
)
py_binary(
name = "client",
srcs = ["client.py"],
imports = ["../../protos"],
python_version = "PY3",
srcs_version = "PY2AND3",
deps = [
"//examples/protos:helloworld_py_pb2",
"//examples/protos:helloworld_py_pb2_grpc",
"//src/python/grpcio/grpc:grpcio",
],
)
py_test(
name = "test/compression_example_test",
size = "small",
srcs = ["test/compression_example_test.py"],
data = [
":client",
":server",
],
python_version = "PY3",
srcs_version = "PY2AND3",
)