Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python: fix bazel py_test testSmoke for Python 3.11+ #20738

Closed
wants to merge 1 commit into from

Commits on Jan 3, 2024

  1. 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
    rickeylev committed Jan 3, 2024
    Configuration menu
    Copy the full SHA
    b1be2de View commit details
    Browse the repository at this point in the history