You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FYI: I've added a CI job that uses bazel rolling. It won't shorten the iteration cycle, but you'll be able to more commit changes here with more confidence they work and won't regress. If they do, we'll see it in typical PRs. The CI job is non-blocking, so we can still merge, but it'll be much more visible.
flag --//python/config_settings:experimental_python_import_all_repositories
Controls whether repository directories are added to the import path.
When enabled, the top-level directories in the runfiles root directory (which are presumbed to be repository directories) are added to the Python import search path.
It’s recommended to set this to false to avoid external dependencies unexpectedly interferring with import searching.
Values;
true (default)
false
This flag replaces the Bazel builtin --experimental_python_import_all_repositories flag.
Added in version 1.7.0.
However, I tried setting it and nothing happened in .1.8.0-rc1. Only setting the bazel's own --experimental_python_import_all_repositories worked. Looking at the code, seems thatread_possibly_native_flag(...) only reads the rules_python variant if --incompatible_remove_ctx_bazel_py_fragment is set (which needs bazel > 9), but the doc does not mention this at all.
FWIW I'd expect --experimental_python_import_all_repositories syntax to work with any Bazel version. Bazel 9+ should automatically route to --//python/config_settings:experimental_python_import_all_repositories. Let us know if you see otherwise.
Acknowledged the documentation is a separate concern.
Activity
gregestren commentedon Sep 8, 2025
I'm happy to have this assigned to me!
Graveyard `--incompatible_use_python_toolchains`.
Graveyard no-op python2 related flags
build: remove no-op _native_rules_allowlist (#3275)
rickeylev commentedon Sep 17, 2025
FYI: I've added a CI job that uses bazel rolling. It won't shorten the iteration cycle, but you'll be able to more commit changes here with more confidence they work and won't regress. If they do, we'll see it in typical PRs. The CI job is non-blocking, so we can still merge, but it'll be much more visible.
Graveyard deprecated --python_top.
Remote outdated nn-toolchain resolution logic.
chore: remove non-toolchain runtime resolution logic. (#3280)
Graveyard deprecated --python_top.
refactor: read migrated native flags through a centralized accessor f…
Graveyard deprecated --python_top.
New incompatible flags disable ctx.fragments.py, ctx.fragments.bazel_py
Graveyard no-op python2-to-python3 migration flags
chore: reject py2 runtimes and remove usages of ctx.fragments.py.disa…
build: Starlarkify python flags (#3334)
Auto-set missing Python flag aliases for Bazel 9 with rules_python >=…
Inject `MODULE.bazel`-defined flag aliases as `--flag_alias=foo=//bar`.
Inject `MODULE.bazel`-defined flag aliases as `--flag_alias=foo=//bar`.
Enable `--incompatible_remove_ctx_bazel_py_fragment`, `--incompatible…
Delete BazelPythonConfiguration
Deleting PythonOptions and PythonConfiguration
shayanhoshyari commentedon Jan 8, 2026
@rickeylev @aignas Related to this, are the documentation now busted?
The docs say https://rules-python.readthedocs.io/en/stable/api/rules_python/python/config_settings/index.html#experimental_python_import_all_repositories
However, I tried setting it and nothing happened in
.1.8.0-rc1. Only setting the bazel's own--experimental_python_import_all_repositoriesworked. Looking at the code, seems thatread_possibly_native_flag(...)only reads therules_pythonvariant if--incompatible_remove_ctx_bazel_py_fragmentis set (which needs bazel > 9), but the doc does not mention this at all.gregestren commentedon Jan 8, 2026
FWIW I'd expect
--experimental_python_import_all_repositoriessyntax to work with any Bazel version. Bazel 9+ should automatically route to--//python/config_settings:experimental_python_import_all_repositories. Let us know if you see otherwise.Acknowledged the documentation is a separate concern.