-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
//src/test/py/bazel:py_test
is broken with Python 3.11
#20660
Comments
//src/test/py/bazel:py_test
//src/test/py/bazel:py_test
is broken with Python 3.11
I debugged a bit with the with python 3.9 as default python on PATH
with python 3.11 as default python on PATH
|
I'm disabling this test case on macOS to make presubmit green |
Due to #20660 RELNOTES: None PiperOrigin-RevId: 593115090 Change-Id: Ifc2a282dbd6dd8a3abfec987398388e5844af91c
This is probably due to Should be a fairly simple fix. Either the import line needs to change ("from something import x") or an |
Due to bazelbuild#20660 RELNOTES: None PiperOrigin-RevId: 593115090 Change-Id: Ifc2a282dbd6dd8a3abfec987398388e5844af91c
Due to bazelbuild#20660 RELNOTES: None PiperOrigin-RevId: 593115090 Change-Id: Ifc2a282dbd6dd8a3abfec987398388e5844af91c
Due to bazelbuild#20660 RELNOTES: None PiperOrigin-RevId: 593115090 Change-Id: Ifc2a282dbd6dd8a3abfec987398388e5844af91c
Due to #20660 RELNOTES: None PiperOrigin-RevId: 593115090 Change-Id: Ifc2a282dbd6dd8a3abfec987398388e5844af91c
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
Looks like a simple fix. I have #20738 going through CI. |
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 Closes bazelbuild#20738. PiperOrigin-RevId: 595498775 Change-Id: I0c9521b210fe9e2c40692727fc87d41995e0968a
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 Closes bazelbuild#20738. PiperOrigin-RevId: 595498775 Change-Id: I0c9521b210fe9e2c40692727fc87d41995e0968a
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 #20660 Closes #20738. PiperOrigin-RevId: 595498775 Change-Id: I0c9521b210fe9e2c40692727fc87d41995e0968a Commit 9b027c8 No public description PiperOrigin-RevId: 694487395 Change-Id: I3f3e154ebfa932721d917661d61a878477a8e574 Commit be2186f --------- Co-authored-by: Richard Levasseur <rlevasseur@google.com> Co-authored-by: Googler <pcloudy@google.com>
A fix for this issue has been included in Bazel 7.5.0 RC2. Please test out the release candidate and report any issues as soon as possible. |
https://buildkite.com/bazel/bazel-bazel/builds/26029#018c915e-33cc-4272-9169-2722a7a94f6d
We recently update our mac machines on CI and python was upgraded to 3.11. This test started to fail with
To reproduce on macOS
The text was updated successfully, but these errors were encountered: