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

Improve python shell integration test coverage #6868

Closed
brandjon opened this issue Dec 7, 2018 · 3 comments
Closed

Improve python shell integration test coverage #6868

brandjon opened this issue Dec 7, 2018 · 3 comments
Labels
P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) stale Issues or PRs that are stale (no activity for 30 days) team-Rules-Python Native rules for Python type: process

Comments

@brandjon
Copy link
Member

brandjon commented Dec 7, 2018

Namely, OSS some internal-only basic "hello world" tests demonstrating py_binary, py_library, runfiles access, and choosing the Python version.

@brandjon brandjon added P3 We're not considering working on this, but happy to review a PR. (No assignee) type: process team-Rules-Python Native rules for Python labels Dec 7, 2018
@brandjon brandjon self-assigned this Dec 7, 2018
bazel-io pushed a commit that referenced this issue Dec 14, 2018
871cd6f added some non-determinism to how the WORKSPACE file is initialized. This was partially addressed in a7773b4. The current CL cleans up an additional source of non-determinism, and factors bazel_skylib setup into a separate helper for better granularity. It also modifies the workspace reinitialization added to test suites by 871cd6f to instead just call the skylib setup.

To avoid a situation where test suite set_up/tear_down overrides testenv's set_up/tear_down, the latter's functions have been renamed to testenv_set_up and testenv_tear_down.

Factored some tests to use $WORKSPACE_NAME instead of inlining its assumed value. Resorted to some sed hackery to substitute this var in long here-docs -- I figured this was preferable to either hardcoding the name in the here-doc, or escaping a bunch of other unrelated substitutions.

Cleanup work toward #6868.

RELNOTES: None
PiperOrigin-RevId: 225618009
bazel-io pushed a commit that referenced this issue Dec 17, 2018
OSS a Python version test. This uses a `use_fake_python_runtimes` shell setup helper for creating a standard fake Python environment.

Also add tests that the system Python interpreters can be used to run py_binary targets, and that runfiles are accessible. These currently do not run on our Mac or Windows workers.

Fixed a bug in how the stub template gets the interpreter path, where relative paths with slashes weren't recognized on Windows. Also made it tolerate .cmd and .bat as valid extensions of the python "runtime" (in actuality for these tests, a wrapper).

Work toward #6868 and #6583.

RELNOTES: None
PiperOrigin-RevId: 225876746
@brandjon
Copy link
Member Author

Also note that some of the test coverage just added above is not yet enabled on our CI for Mac and Windows.

bazel-io pushed a commit that referenced this issue Dec 18, 2018
Clients that care about the Python version mode should use getters/setters that respect `--experimental_better_python_version_mixing`. This ensures that the correct field is updated and the correct transition semantics are used.

select()s that examine "force_python" will still see the raw value of that flag. For partial compatibility we still update this flag when transitioning the Python version, but targets that are not underneath py_binary/py_test targets may still observe "force_python" values that are inconsistent with the actual Python mode. The future fix will be to use a new feature flag instead of any native flag.

Work toward #6583, #6868. Design doc for new semantics here: https://github.com/bazelbuild/rules_python/blob/master/proposals/2018-10-25-selecting-between-python-2-and-3.md

RELNOTES: None
PiperOrigin-RevId: 226043392
@brandjon
Copy link
Member Author

From #3567: Make sure to include coverage for end-to-end behavior of builds using in-build (hermetic) Python runtimes.

@lberki lberki added P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) and removed P3 We're not considering working on this, but happy to review a PR. (No assignee) labels Nov 18, 2020
@sgowroji sgowroji added the stale Issues or PRs that are stale (no activity for 30 days) label Feb 16, 2023
@sgowroji
Copy link
Member

Hi there! We're doing a clean up of old issues and will be closing this one. Please reopen if you’d like to discuss anything further. We’ll respond as soon as we have the bandwidth/resources to do so.

@sgowroji sgowroji closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) stale Issues or PRs that are stale (no activity for 30 days) team-Rules-Python Native rules for Python type: process
Projects
None yet
Development

No branches or pull requests

3 participants