[7.5.0] Backport 9b027c8 and be2186f to fix windows CI failures #24691
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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, thePYTHONSAFEPATH
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 tosys.path
.Fixes #20660
Closes #20738.
PiperOrigin-RevId: 595498775
Change-Id: I0c9521b210fe9e2c40692727fc87d41995e0968a
Commit 9b027c8
No public description
PiperOrigin-RevId: 694487395
Change-Id: I3f3e154ebfa932721d917661d61a878477a8e574
Commit be2186f