Skip to content

Guard python_interpreter_target workspace name on None type check. #755

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

Merged
merged 2 commits into from
Jul 14, 2022

Conversation

hrfuller
Copy link
Contributor

@hrfuller hrfuller commented Jul 13, 2022

Fixes #752 which was a bug introduced in a fix for #746

Don't check for the python_interpreter_target workspace name unless it has actually been passed.

PR Checklist

Please check if your PR fulfills the following requirements:

  • [] Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Testing with a host python interpreter is currently not possible because one of the rules_python runtime dependencies expect importlib.resources to be available. importlib.resources was introduced in python3.7 and our buildkite images only have python3.6.

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature (please, look at the "Scope of the project" section in the README.md file)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

pip_install without a python_interpreter_target fails as repo exec time.

Issue Number: 752

What is the new behavior?

pip_install without python interpreter configuration works.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@hrfuller hrfuller merged commit 636f55c into main Jul 14, 2022
@alexeagle alexeagle deleted the hfuller/fix-752 branch July 14, 2022 14:52
alexgartner-bc pushed a commit to braincorp/rules_python that referenced this pull request Jul 29, 2022
Fixes bazel-contrib#709.

Test case for pip imports using "from foo import bar".

Test cases for imports of the form "from foo import bar".

Remove unnecessary flag (replaced with continue's).

Make sure from imports work with std modules.

- Add test case with `from __future__ import print_function`.

Guard python_interpreter_target workspace name on None type check. (bazel-contrib#755)

Fix for requirements_lock with PEP440 direct references (bazel-contrib#756)

Fix indentation error.

- Make sure that `from foo import bar, baz` works.
- Add test case for this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error calling pip_install in latest release
2 participants