From 7f332ef69d6adae604f08122fc62c25c0f82c0ec Mon Sep 17 00:00:00 2001 From: Yijie Ma Date: Tue, 1 Aug 2023 15:34:42 -0700 Subject: [PATCH] [Deps] Update pyyaml to 6.0.1 for bazel build system (#33932) The previous version (`3.12`) is 7 years old and does not support the newest Python 3 versions. This causes issues to move certain test targets (which depends on `pyyaml`) to Python 3 when some CI environment (e.g. `arm64v8/debian:11`) does not have Python 2 installed. And in general, we should move away from Python 2. Thus, updated `pyyaml` to the latest version. This hopefully should also fix the `prod:grpc/core/master/linux/arm64/grpc_bazel_test_c_cpp` job breakage. --- bazel/grpc_deps.bzl | 8 ++++---- test/cpp/naming/utils/BUILD | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index ce0f40493d1..395756ab4ad 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -533,11 +533,11 @@ def grpc_test_only_deps(): if "com_github_yaml_pyyaml" not in native.existing_rules(): http_archive( name = "com_github_yaml_pyyaml", - sha256 = "6b4314b1b2051ddb9d4fcd1634e1fa9c1bb4012954273c9ff3ef689f6ec6c93e", - strip_prefix = "pyyaml-3.12", + sha256 = "e34d97db6d846f5e2ad51417fd646e7ce6a3a70726ccea2a857e0580a7155f39", + strip_prefix = "pyyaml-6.0.1", urls = [ - "https://storage.googleapis.com/grpc-bazel-mirror/github.com/yaml/pyyaml/archive/3.12.zip", - "https://github.com/yaml/pyyaml/archive/3.12.zip", + "https://storage.googleapis.com/grpc-bazel-mirror/github.com/yaml/pyyaml/archive/6.0.1.zip", + "https://github.com/yaml/pyyaml/archive/6.0.1.zip", ], build_file = "@com_github_grpc_grpc//third_party:yaml.BUILD", ) diff --git a/test/cpp/naming/utils/BUILD b/test/cpp/naming/utils/BUILD index 6927a29bd1b..37f497ffe2a 100644 --- a/test/cpp/naming/utils/BUILD +++ b/test/cpp/naming/utils/BUILD @@ -32,6 +32,7 @@ grpc_py_binary( "twisted", "yaml", ], + python_version = "PY3", ) grpc_py_binary( @@ -41,16 +42,19 @@ grpc_py_binary( external_deps = [ "twisted", ], + python_version = "PY3", ) grpc_py_binary( name = "tcp_connect", testonly = True, srcs = ["tcp_connect.py"], + python_version = "PY3", ) grpc_py_binary( name = "health_check", testonly = True, srcs = ["health_check.py"], + python_version = "PY3", )