diff --git a/CHANGELOG.md b/CHANGELOG.md index d71b6e65b2..15118f53e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,15 @@ END_UNRELEASED_TEMPLATE {#v0-0-0-changed} ### Changed +* **DEPRECATED: implicit zipapp support** + * Implicit zipapp output of `py_binary`/`py_test` has been deprecated and + replaced by separate {obj}`py_zipapp_binary` and {obj}`py_zipapp_test` + rules. See + [#3567](https://github.com/bazel-contrib/rules_python/issues/3567) + for a detailed migration guide. +* (toolchains) stop exposing config settings in python toolchain alias repos. + Please consider depending on the flags defined in + `//python/config_setting/...` and the `@platforms` package instead. * (binaries/tests) The `PYTHONBREAKPOINT` environment variable is automatically inherited * (binaries/tests) The {obj}`stamp` attribute now transitions the Bazel builtin {obj}`--stamp` flag. diff --git a/python/private/py_executable.bzl b/python/private/py_executable.bzl index 9f1113d9f6..45a18abb05 100644 --- a/python/private/py_executable.bzl +++ b/python/private/py_executable.bzl @@ -379,6 +379,21 @@ def _create_executable( # When --build_python_zip is enabled, then the zip file becomes # one of the default outputs. if build_zip_enabled: + # buildifier: disable=print + print( + """ +====================================================================== +WARNING: Target: {} + The `--build_python_zip` flag and implicit zipapp output of `py_binary` + and `py_test` is deprecated and will be removed in a future release. + Switch to `py_zipapp_binary` or `py_zipapp_test`. For migration + instructions and guide, see: + + https://github.com/bazel-contrib/rules_python/issues/3567 +====================================================================== + """.rstrip().format(ctx.label), + ) + extra_default_outputs.append(zip_file) # The logic here is a bit convoluted. Essentially, there are 3 types of