Skip to content

Commit 00a912f

Browse files
committed
refactor: remove migration tag helper
1 parent fb8054c commit 00a912f

6 files changed

Lines changed: 5 additions & 23 deletions

File tree

python/BUILD.bazel

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ bzl_library(
127127
deps = [
128128
"//python/private:py_binary_macro_bzl",
129129
"//python/private:register_extension_info_bzl",
130-
"//python/private:util_bzl",
131130
],
132131
)
133132

@@ -177,7 +176,6 @@ bzl_library(
177176
deps = [
178177
"//python/private:py_library_macro_bzl",
179178
"//python/private:register_extension_info_bzl",
180-
"//python/private:util_bzl",
181179
],
182180
)
183181

@@ -214,7 +212,6 @@ bzl_library(
214212
deps = [
215213
"//python/private:py_test_macro_bzl",
216214
"//python/private:register_extension_info_bzl",
217-
"//python/private:util_bzl",
218215
],
219216
)
220217

python/private/util.bzl

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,6 @@ def copy_propagating_kwargs(from_kwargs, into_kwargs = None):
4949
# The implementation of the macros and tagging mechanism follows the example
5050
# set by rules_cc and rules_java.
5151

52-
# TODO @aignas 2025-09-27: remove this function
53-
def add_migration_tag(attrs):
54-
"""Add a special tag to `attrs` to aid migration off native rles.
55-
56-
Args:
57-
attrs: dict of keyword args. The `tags` key will be modified in-place.
58-
59-
Returns:
60-
The same `attrs` object, but modified.
61-
"""
62-
return attrs
63-
6452
def add_tag(attrs, tag):
6553
"""Adds `tag` to `attrs["tags"]`.
6654

python/py_binary.bzl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
load("//python/private:py_binary_macro.bzl", _starlark_py_binary = "py_binary")
1818
load("//python/private:register_extension_info.bzl", "register_extension_info")
19-
load("//python/private:util.bzl", "add_migration_tag")
2019

2120
# buildifier: disable=native-python
2221
_py_binary_impl = _starlark_py_binary
@@ -41,7 +40,7 @@ def py_binary(**attrs):
4140
if attrs.get("srcs_version") in ("PY2", "PY2ONLY"):
4241
fail("Python 2 is no longer supported: https://github.com/bazel-contrib/rules_python/issues/886")
4342

44-
_py_binary_impl(**add_migration_tag(attrs))
43+
_py_binary_impl(**attrs)
4544

4645
register_extension_info(
4746
extension = py_binary,

python/py_library.bzl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
load("//python/private:py_library_macro.bzl", _starlark_py_library = "py_library")
1818
load("//python/private:register_extension_info.bzl", "register_extension_info")
19-
load("//python/private:util.bzl", "add_migration_tag")
2019

2120
# buildifier: disable=native-python
2221
_py_library_impl = _starlark_py_library
@@ -38,7 +37,7 @@ def py_library(**attrs):
3837
if attrs.get("srcs_version") in ("PY2", "PY2ONLY"):
3938
fail("Python 2 is no longer supported: https://github.com/bazel-contrib/rules_python/issues/886")
4039

41-
_py_library_impl(**add_migration_tag(attrs))
40+
_py_library_impl(**attrs)
4241

4342
register_extension_info(
4443
extension = py_library,

python/py_runtime.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"""Public entry point for py_runtime."""
1616

1717
load("//python/private:py_runtime_macro.bzl", _starlark_py_runtime = "py_runtime")
18-
load("//python/private:util.bzl", "IS_BAZEL_6_OR_HIGHER", "add_migration_tag")
18+
load("//python/private:util.bzl", "IS_BAZEL_6_OR_HIGHER")
1919

2020
# buildifier: disable=native-python
2121
_py_runtime_impl = _starlark_py_runtime if IS_BAZEL_6_OR_HIGHER else native.py_runtime
@@ -39,4 +39,4 @@ def py_runtime(**attrs):
3939
if attrs.get("python_version") == "PY2":
4040
fail("Python 2 is no longer supported: see https://github.com/bazel-contrib/rules_python/issues/886")
4141

42-
_py_runtime_impl(**add_migration_tag(attrs))
42+
_py_runtime_impl(**attrs)

python/py_test.bzl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
load("//python/private:py_test_macro.bzl", _starlark_py_test = "py_test")
1818
load("//python/private:register_extension_info.bzl", "register_extension_info")
19-
load("//python/private:util.bzl", "add_migration_tag")
2019

2120
# buildifier: disable=native-python
2221
_py_test_impl = _starlark_py_test
@@ -42,7 +41,7 @@ def py_test(**attrs):
4241
fail("Python 2 is no longer supported: https://github.com/bazel-contrib/rules_python/issues/886")
4342

4443
# buildifier: disable=native-python
45-
_py_test_impl(**add_migration_tag(attrs))
44+
_py_test_impl(**attrs)
4645

4746
register_extension_info(
4847
extension = py_test,

0 commit comments

Comments
 (0)