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

Fix ./pants repl to use global constrains when no targets specified #10991

Merged
merged 1 commit into from Oct 19, 2020

Conversation

Eric-Arellano
Copy link
Contributor

As pointed out in #10987, it's reasonable to expect that setting --python-setup-interpreter-constraints should influence the interpreter used when running ./pants repl with no files/targets. Without this, we use empty constraints, and could end up choosing any interpreter, which is a bug.

Result:

▶ ./pants --python-setup-interpreter-constraints='["CPython==2.7.*"]' --python-setup-resolve-all-constraints=never repl
13:55:22.01 [INFO] Completed: Building requirements.pex
Python 2.7.16 (default, Jun  5 2020, 22:59:21)

This also fixes an invalid type for --ipython-ignore-cwd.

[ci skip-rust]
[ci skip-build-wheels]

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@coveralls
Copy link

Coverage Status

Coverage remained the same at 0.0% when pulling ca10d13 on Eric-Arellano:repl into 6e45e09 on pantsbuild:master.

Copy link
Contributor

@tdyas tdyas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Eric-Arellano Eric-Arellano merged commit bf62b0a into pantsbuild:master Oct 19, 2020
@Eric-Arellano Eric-Arellano deleted the repl branch October 19, 2020 21:49
Eric-Arellano added a commit to Eric-Arellano/pants that referenced this pull request Oct 19, 2020
…pantsbuild#10991)

As pointed out in pantsbuild#10987, it's reasonable to expect that setting `--python-setup-interpreter-constraints` should influence the interpreter used when running `./pants repl` with no files/targets. Without this, we use empty constraints, and could end up choosing any interpreter, which is a bug.

Result:

```
▶ ./pants --python-setup-interpreter-constraints='["CPython==2.7.*"]' --python-setup-resolve-all-constraints=never repl
13:55:22.01 [INFO] Completed: Building requirements.pex
Python 2.7.16 (default, Jun  5 2020, 22:59:21)
```
This also fixes an invalid type for `--ipython-ignore-cwd`.

[ci skip-rust]
[ci skip-build-wheels]
Eric-Arellano added a commit that referenced this pull request Oct 19, 2020
… (Cherry-pick of #10991) (#10992)

[ci skip-rust]
[ci skip-build-wheels]
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.

None yet

4 participants