refactor: cleanup now-unreferenced proto toolchain type (#2620)
Follow-up to #2604, fixes a breaking change in v1.2.0-rc0
Note that this toolchain_type became unused in that PR. We leave behind
an alias to make this a non-breaking change.
Verified in a downstream repo that requires the toolchain_type to
register pre-built `protoc`:
https://github.com/aspect-build/toolchains_protoc/pull/50/files
---------
Co-authored-by: Richard Levasseur <rlevasseur@google.com>
(cherry picked from commit f9779ee9c0a7b6dbfc1cdeb4a6d6a3f06d6206df)
diff --git a/python/proto/BUILD.bazel b/python/proto/BUILD.bazel
index 9f60574..4d5a92a 100644
--- a/python/proto/BUILD.bazel
+++ b/python/proto/BUILD.bazel
@@ -14,5 +14,11 @@
package(default_visibility = ["//visibility:public"])
-# Toolchain type provided by proto_lang_toolchain rule and used by py_proto_library
-toolchain_type(name = "toolchain_type")
+# 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",
+ deprecation = "Use @com_google_protobuf//bazel/private:python_toolchain_type instead",
+)