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

The --venv mode hash scheme can be insensitive to interpreter. #1422

Closed
jsirois opened this issue Aug 25, 2021 · 0 comments · Fixed by #1428
Closed

The --venv mode hash scheme can be insensitive to interpreter. #1422

jsirois opened this issue Aug 25, 2021 · 0 comments · Fixed by #1428
Assignees
Labels

Comments

@jsirois
Copy link
Member

jsirois commented Aug 25, 2021

Summarized here:

$ pex setuptools -osetuptools.pex --venv
$ python3.7 ./setuptools.pex -c 'import sys; print(".".join(map(str, sys.version_info[:2])))'
3.7
$ python3.8 ./setuptools.pex -c 'import sys; print(".".join(map(str, sys.version_info[:2])))'
3.7
$ rm -rf ~/.pex/venvs
$ python3.8 ./setuptools.pex -c 'import sys; print(".".join(map(str, sys.version_info[:2])))'
3.8
$ python3.7 ./setuptools.pex -c 'import sys; print(".".join(map(str, sys.version_info[:2])))'
3.8
$
@jsirois jsirois added the bug label Aug 25, 2021
@jsirois jsirois self-assigned this Aug 26, 2021
jsirois added a commit to jsirois/pex that referenced this issue Aug 28, 2021
This supports some up-coming test changes in the fix for pex-tool#1422.
jsirois added a commit that referenced this issue Aug 28, 2021
This supports some up-coming test changes in the fix for #1422.
jsirois added a commit to jsirois/pex that referenced this issue Aug 29, 2021
Previously, requesting a PEX_PYTHON with an absolute path to an
interpreter might not fail if the interpreter was invalid or if it was
valid but not on a requested PEX_PYTHON_PATH. Fix up both behaviors and
close pex-tool#431 as no longer relevant or well guided.

Clarifies behaviors pex-tool#1422 should support in interpreter selection
effects on `--venv` mode venv directory hashes.
jsirois added a commit to jsirois/pex that referenced this issue Aug 29, 2021
Previously the venv dir hash locked unconstrained PEXes into a venv using
the interpreter they were first run with. Now, when a `--venv` mode PEX
is either unconstrained or only constrained by a PEX_PYTHON_PATH that
admits the interpreter being used to execute the `--venv` mode PEX, that
interpreter is recorded in the venv dir hash to differentiate a venv
dedicated to that interpreter.

Fixes pex-tool#1422
jsirois added a commit that referenced this issue Aug 30, 2021
Previously, requesting a PEX_PYTHON with an absolute path to an
interpreter might not fail if the interpreter was invalid or if it was
valid but not on a requested PEX_PYTHON_PATH. Fix up both behaviors and
close #431 as no longer relevant or well guided.

Clarifies behaviors #1422 should support in interpreter selection
effects on `--venv` mode venv directory hashes.
@jsirois jsirois mentioned this issue Aug 31, 2021
1 task
jsirois added a commit that referenced this issue Aug 31, 2021
Previously the venv dir hash locked unconstrained PEXes into a venv using
the interpreter they were first run with. Now, when a `--venv` mode PEX
is either unconstrained or only constrained by a PEX_PYTHON_PATH that
admits the interpreter being used to execute the `--venv` mode PEX, that
interpreter is recorded in the venv dir hash to differentiate a venv
dedicated to that interpreter.

Fixes #1422
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant