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

Actually filter out missing interpreters #5262

Merged
merged 3 commits into from
Aug 16, 2022

Conversation

jfly
Copy link
Contributor

@jfly jfly commented Aug 16, 2022

This fixes #5261.

Before this change, I would get a "The Python interpreter can't be
found" error when running pipenv install --system with a python3 but
no python.

Demo:

$ docker run $(docker build -q -f Dockerfile.pipenv-2022.8.15 https://github.com/jfly/2022-08-16-pipenv-system-which-issue.git#main)
Installing dependencies from Pipfile.lock (63bec0)...
The Python interpreter can't be found.▉ 0/4 — 00:00:00
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/4 — 00:00:00

I'm confident this bug was introduced in
f276360,
which removed a usage of first(), but broke the "filter None values"
behavior that first() gave us.

The checklist

  • Associated issue
  • A news fragment in the news/ directory to describe this fix with the extension .bugfix, .feature, .behavior, .doc. .vendor. or .trivial (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

jfly added 3 commits August 16, 2022 01:38
This fixes pypa#5261.

Before this change, I would get a "The Python interpreter can't be
found" error when running `pipenv install --system` with a python3 but
no python.

Demo:

```
$ docker run $(docker build -q -f Dockerfile.pipenv-2022.8.15 https://github.com/jfly/2022-08-16-pipenv-system-which-issue.git#main)
Installing dependencies from Pipfile.lock (63bec0)...
The Python interpreter can't be found.▉ 0/4 — 00:00:00
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/4 — 00:00:00
```

I'm confident this bug was introduced in
pypa@f276360,
which removed a usage of `first()`, but broke the "filter None values"
behavior that `first()` gave us.
This build just failed
https://github.com/pypa/pipenv/runs/7853944342?check_suite_focus=true
with the following error:

    NEWS fragment files must be named *.(feature|behavior|bugfix|vendor|doc|trivial|removal|process).rst

    news/5261.bugfix

    pre-commit hook(s) made changes.
    If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`.

I created this file by following the PR template instructions, which
don't say anything about the `.rst` part of the filename. I'm fixing up
those instructions while I'm in here as well.
@jfly jfly force-pushed the jfly/fix-which-system-issue branch from 5b95b61 to 41881f2 Compare August 16, 2022 08:51
@jfly
Copy link
Contributor Author

jfly commented Aug 16, 2022

Hmm... the test suite failed in test_convert_deps_to_pip[deps0-requests] and test_convert_deps_to_pip[deps1-requests[socks]] (see build), but those failures don't feel related to my changes, so I'm hoping they're just flaky tests.

@matteius
Copy link
Member

@jfly I've been fighting those test failures, mostly on mac OS, for about a month now. It seems to have started around the time I converted off pip-shims in pipenv, but I cannot be certain nor can I explain why its happening. Its high on my list of things to figure out.

@matteius matteius merged commit 77bc74d into pypa:main Aug 16, 2022
yeisonvargasf pushed a commit to yeisonvargasf/pipenv that referenced this pull request Nov 19, 2022
* Actually filter out missing interpreters

This fixes pypa#5261.

Before this change, I would get a "The Python interpreter can't be
found" error when running `pipenv install --system` with a python3 but
no python.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants