Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python: fix bazel py_test testSmoke for Python 3.11+
The test was failing because the `b.py` file couldn't be imported because, starting with Python 3.11, the `PYTHONSAFEPATH` environment variable (set by the bootstrap startup) is respected. This setting inhibits the default Python behavior of adding the main script's directory to sys.path. To fix, use `py_library.imports` to explicitly add the necessary directory to `sys.path`. Fixes bazelbuild#20660
- Loading branch information