feat: Support always fetching a standalone python interpreter #1663
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.
changelog.d/
(if the patch affects the end users)Summary of changes
There exist environments where users need known "good" python interpreters to run their commands from. Notably, linux distros can package non-standard alterations to their Python interpreters, or not have certain "optional" features.
This commit adds
--fetch-python={always, missing, never}
and the associated environment variablePIPX_FETCH_PYTHON
.--fetch-missing-python
has been deprecated and aliased to--fetch-python=missing
. The corresponding change has been made toPIPX_FETCH_MISSING_PYTHON
.N.b. happy to bikeshed on the name.
Test plan
Tested by running (on a machine with and without python3.{9,10,11}, with and without the environment variable
N.b. ran those commands with #1662 cherry picked.
I am happy to add automatic tests as well, I just don't know exactly what would be preferred / which cases you'd like tested. Happy to add any tests requested.