Skip to content

Commit 4250824

Browse files
comiusrickeylev
andauthored
fix: don't set distribs in version transitioning rule (bazel-contrib#1412)
This makes the version-aware transition rule compatible with an upcoming Bazel change that disallows setting unknown attributes to None (the `distribs` attribute, in this case). The `distribs` attribute was common to all rules, but it has been long deprecated and it won't be part of every rule in upcoming Bazel versions. The previous implementation resulted in setting `distribs = None` on the target. Bazel won't support setting undefined attributes to None. Addresses: bazelbuild/bazel#19403 --------- Co-authored-by: Richard Levasseur <[email protected]>
1 parent 5ea804f commit 4250824

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ A brief description of the categories of changes:
1919

2020
## Unreleased
2121

22+
### Changed
23+
* (multi-version) The `distribs` attribute is no longer propagated. This
24+
attribute has been long deprecated by Bazel and shouldn't be used.
25+
2226
### Added
2327

2428
* (bzlmod, entry_point) Added

python/config_settings/transition.bzl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ def _py_rule(rule_impl, transition_rule, name, python_version, **kwargs):
152152
# https://bazel.build/reference/be/common-definitions#common-attributes
153153
compatible_with = kwargs.pop("compatible_with", None)
154154
deprecation = kwargs.pop("deprecation", None)
155-
distribs = kwargs.pop("distribs", None)
156155
exec_compatible_with = kwargs.pop("exec_compatible_with", None)
157156
exec_properties = kwargs.pop("exec_properties", None)
158157
features = kwargs.pop("features", None)
@@ -166,7 +165,6 @@ def _py_rule(rule_impl, transition_rule, name, python_version, **kwargs):
166165
common_attrs = {
167166
"compatible_with": compatible_with,
168167
"deprecation": deprecation,
169-
"distribs": distribs,
170168
"exec_compatible_with": exec_compatible_with,
171169
"exec_properties": exec_properties,
172170
"features": features,

0 commit comments

Comments
 (0)