diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f9cdf9481..bb6ef99284 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,10 @@ BEGIN_UNRELEASED_TEMPLATE [0.0.0]: https://github.com/bazel-contrib/rules_python/releases/tag/0.0.0 +{#v0-0-0-removed} +### Removed + +* Nothing removed. {#v0-0-0-changed} ### Changed * Nothing changed. @@ -40,9 +44,6 @@ BEGIN_UNRELEASED_TEMPLATE ### Added * Nothing added. -{#v0-0-0-removed} -### Removed -* Nothing removed. END_UNRELEASED_TEMPLATE --> @@ -52,6 +53,12 @@ END_UNRELEASED_TEMPLATE [0.0.0]: https://github.com/bazel-contrib/rules_python/releases/tag/0.0.0 +{#v0-0-0-removed} +### Removed +* (core rules) Support for Bazel's long deprecated "extra actions" has been + removed + ([#3215](https://github.com/bazel-contrib/rules_python/issues/3215)). + {#v0-0-0-changed} ### Changed * Nothing changed. @@ -66,9 +73,6 @@ END_UNRELEASED_TEMPLATE ### Added * Nothing added. -{#v0-0-0-removed} -### Removed -* Nothing removed. {#v1-6-0} ## [1.6.0] - 2025-08-23 diff --git a/python/private/common.bzl b/python/private/common.bzl index 96f8ebeab4..9fc366818d 100644 --- a/python/private/common.bzl +++ b/python/private/common.bzl @@ -435,7 +435,6 @@ def create_py_info( if PyInfo in target or (BuiltinPyInfo != None and BuiltinPyInfo in target): py_info.merge(_get_py_info(target)) - deps_transitive_sources = py_info.transitive_sources.build() py_info.transitive_sources.add(required_py_files) # We only look at data to calculate uses_shared_libraries, if it's already @@ -457,7 +456,7 @@ def create_py_info( if py_info.get_uses_shared_libraries(): break - return py_info.build(), deps_transitive_sources, py_info.build_builtin_py_info() + return py_info.build(), py_info.build_builtin_py_info() def _get_py_info(target): return target[PyInfo] if PyInfo in target or BuiltinPyInfo == None else target[BuiltinPyInfo] diff --git a/python/private/py_executable.bzl b/python/private/py_executable.bzl index 30f18b5e64..5fafc8911d 100644 --- a/python/private/py_executable.bzl +++ b/python/private/py_executable.bzl @@ -1838,7 +1838,7 @@ def _create_providers( PyCcLinkParamsInfo(cc_info = cc_info), ) - py_info, deps_transitive_sources, builtin_py_info = create_py_info( + py_info, builtin_py_info = create_py_info( ctx, original_sources = original_sources, required_py_files = required_py_files, @@ -1848,14 +1848,6 @@ def _create_providers( imports = imports, ) - # TODO(b/253059598): Remove support for extra actions; https://github.com/bazelbuild/bazel/issues/16455 - listeners_enabled = _py_builtins.are_action_listeners_enabled(ctx) - if listeners_enabled: - _py_builtins.add_py_extra_pseudo_action( - ctx = ctx, - dependency_transitive_python_sources = deps_transitive_sources, - ) - providers.append(py_info) if builtin_py_info: providers.append(builtin_py_info) diff --git a/python/private/py_library.bzl b/python/private/py_library.bzl index ea2e608401..1f3e4d88d4 100644 --- a/python/private/py_library.bzl +++ b/python/private/py_library.bzl @@ -45,7 +45,6 @@ load(":normalize_name.bzl", "normalize_name") load(":precompile.bzl", "maybe_precompile") load(":py_cc_link_params_info.bzl", "PyCcLinkParamsInfo") load(":py_info.bzl", "PyInfo", "VenvSymlinkEntry", "VenvSymlinkKind") -load(":py_internal.bzl", "py_internal") load(":reexports.bzl", "BuiltinPyInfo") load(":rule_builders.bzl", "ruleb") load( @@ -55,8 +54,6 @@ load( ) load(":version.bzl", "version") -_py_builtins = py_internal - LIBRARY_ATTRS = dicts.add( COMMON_ATTRS, PY_SRCS_ATTRS, @@ -164,7 +161,7 @@ def py_library_impl(ctx, *, semantics): imports, venv_symlinks = _get_imports_and_venv_symlinks(ctx, semantics) cc_info = semantics.get_cc_info_for_library(ctx) - py_info, deps_transitive_sources, builtins_py_info = create_py_info( + py_info, builtins_py_info = create_py_info( ctx, original_sources = direct_sources, required_py_files = required_py_files, @@ -175,14 +172,6 @@ def py_library_impl(ctx, *, semantics): venv_symlinks = venv_symlinks, ) - # TODO(b/253059598): Remove support for extra actions; https://github.com/bazelbuild/bazel/issues/16455 - listeners_enabled = _py_builtins.are_action_listeners_enabled(ctx) - if listeners_enabled: - _py_builtins.add_py_extra_pseudo_action( - ctx = ctx, - dependency_transitive_python_sources = deps_transitive_sources, - ) - providers = [ DefaultInfo(files = default_outputs, runfiles = runfiles), py_info,