From e95f95f75c9078f252f5b03eca18cba12d2e2166 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Thu, 20 Feb 2025 13:42:09 -0800 Subject: [PATCH 1/4] chore: cleanup now-unreferenced proto toolchain type Follow-up to #2604 --- python/proto/BUILD.bazel | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/proto/BUILD.bazel b/python/proto/BUILD.bazel index 9f60574f26..dae7a78e8c 100644 --- a/python/proto/BUILD.bazel +++ b/python/proto/BUILD.bazel @@ -15,4 +15,8 @@ package(default_visibility = ["//visibility:public"]) # Toolchain type provided by proto_lang_toolchain rule and used by py_proto_library -toolchain_type(name = "toolchain_type") +# Alias is here to provide backward-compatibility; see #2604 +alias( + name = "toolchain_type", + actual = "@com_google_protobuf//bazel/private:python_toolchain_type", +) From 04ade9a90749071f8bab2931cb81e29125481bb7 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Thu, 20 Feb 2025 17:51:30 -0800 Subject: [PATCH 2/4] add deprecation --- python/proto/BUILD.bazel | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/proto/BUILD.bazel b/python/proto/BUILD.bazel index dae7a78e8c..78403edca3 100644 --- a/python/proto/BUILD.bazel +++ b/python/proto/BUILD.bazel @@ -15,6 +15,8 @@ package(default_visibility = ["//visibility:public"]) # Toolchain type provided by proto_lang_toolchain rule and used by py_proto_library +# Deprecated in favour of the implementation in https://github.com/protocolbuffers/protobuf. +# It will be removed in a future release. # Alias is here to provide backward-compatibility; see #2604 alias( name = "toolchain_type", From 5d20c4af26c6e834f86ce796e3f1c323bdcb4612 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Fri, 21 Feb 2025 06:36:49 -0800 Subject: [PATCH 3/4] Update BUILD.bazel --- python/proto/BUILD.bazel | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/python/proto/BUILD.bazel b/python/proto/BUILD.bazel index 78403edca3..81addfb14b 100644 --- a/python/proto/BUILD.bazel +++ b/python/proto/BUILD.bazel @@ -14,10 +14,9 @@ package(default_visibility = ["//visibility:public"]) -# Toolchain type provided by proto_lang_toolchain rule and used by py_proto_library -# Deprecated in favour of the implementation in https://github.com/protocolbuffers/protobuf. -# It will be removed in a future release. +# Deprecated; use @com_google_protobuf//bazel/private:python_toolchain_type instead. # Alias is here to provide backward-compatibility; see #2604 +# It will be removed in a future release. alias( name = "toolchain_type", actual = "@com_google_protobuf//bazel/private:python_toolchain_type", From d1d3b3bda40acd336a328bc169702bc17bd74d2c Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Fri, 21 Feb 2025 16:13:01 -0800 Subject: [PATCH 4/4] add deprecation attr to alias --- python/proto/BUILD.bazel | 1 + 1 file changed, 1 insertion(+) diff --git a/python/proto/BUILD.bazel b/python/proto/BUILD.bazel index 81addfb14b..4d5a92a93f 100644 --- a/python/proto/BUILD.bazel +++ b/python/proto/BUILD.bazel @@ -20,4 +20,5 @@ package(default_visibility = ["//visibility:public"]) alias( name = "toolchain_type", actual = "@com_google_protobuf//bazel/private:python_toolchain_type", + deprecation = "Use @com_google_protobuf//bazel/private:python_toolchain_type instead", )