Skip to content

Commit 9eec15e

Browse files
committed
mark the ignore_root_user_error override deprecated
1 parent 04513e5 commit 9eec15e

File tree

2 files changed

+1
-44
lines changed

2 files changed

+1
-44
lines changed

python/private/python.bzl

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -693,18 +693,7 @@ dependencies are introduced.
693693
),
694694
"ignore_root_user_error": attr.bool(
695695
default = True,
696-
doc = """\
697-
The Python runtime installation is made read only. This improves the ability for
698-
Bazel to cache it by preventing the interpreter from creating `.pyc` files for
699-
the standard library dynamically at runtime as they are loaded (this often leads
700-
to spurious cache misses or build failures).
701-
702-
However, if the user is running Bazel as root, this read-onlyness is not
703-
respected. Bazel will print a warning message when it detects that the runtime
704-
installation is writable despite being made read only (i.e. it's running with
705-
root access). If this attribute is set to `False`, Bazel will make it a hard
706-
error to run with root access instead.
707-
""",
696+
doc = """Deprecated; do not use. This attribute has no effect.""",
708697
mandatory = False,
709698
),
710699
"minor_mapping": attr.string_dict(

tests/python/python_tests.bzl

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -238,38 +238,6 @@ def _test_default_non_rules_python_ignore_root_user_error(env):
238238

239239
_tests.append(_test_default_non_rules_python_ignore_root_user_error)
240240

241-
def _test_default_non_rules_python_ignore_root_user_error_override(env):
242-
py = parse_modules(
243-
module_ctx = _mock_mctx(
244-
_mod(
245-
name = "my_module",
246-
toolchain = [_toolchain("3.12")],
247-
override = [_override(ignore_root_user_error = False)],
248-
),
249-
_mod(name = "rules_python", toolchain = [_toolchain("3.11")]),
250-
),
251-
)
252-
253-
env.expect.that_bool(py.config.default["ignore_root_user_error"]).equals(False)
254-
env.expect.that_str(py.default_python_version).equals("3.12")
255-
256-
my_module_toolchain = struct(
257-
name = "python_3_12",
258-
python_version = "3.12",
259-
register_coverage_tool = False,
260-
)
261-
rules_python_toolchain = struct(
262-
name = "python_3_11",
263-
python_version = "3.11",
264-
register_coverage_tool = False,
265-
)
266-
env.expect.that_collection(py.toolchains).contains_exactly([
267-
rules_python_toolchain,
268-
my_module_toolchain,
269-
]).in_order()
270-
271-
_tests.append(_test_default_non_rules_python_ignore_root_user_error_override)
272-
273241
def _test_default_non_rules_python_ignore_root_user_error_non_root_module(env):
274242
py = parse_modules(
275243
module_ctx = _mock_mctx(

0 commit comments

Comments
 (0)