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

PythonInterpreter.from_binary has order-dependent caching #509

Closed
jsirois opened this issue Jun 5, 2018 · 0 comments · Fixed by #518
Closed

PythonInterpreter.from_binary has order-dependent caching #509

jsirois opened this issue Jun 5, 2018 · 0 comments · Fixed by #518
Assignees
Labels

Comments

@jsirois
Copy link
Member

jsirois commented Jun 5, 2018

Noticed working pantsbuild/pants#5910. The method signature allows for optional interpreter path extras, but these are not included in the cache key. As a result, once an interpreter is found for a given binary - with say no extras - later attempts to instantiate an interpreter from that same binary with extras will silently fail to include the requested extras.

@jsirois jsirois added the bug label Jun 5, 2018
jsirois added a commit to jsirois/pants that referenced this issue Jun 5, 2018
jsirois added a commit to jsirois/pants that referenced this issue Jun 6, 2018
@jsirois jsirois self-assigned this Jun 7, 2018
jsirois added a commit to jsirois/pex that referenced this issue Jun 15, 2018
The `PythonInterpreter.from_binary` method now caches by a full stable
key over all input parameters fixing previously order-dependent caching.
In addition, an `include_site_extras` argument is added to allow the
caller to request a bare interpreter (by passing `False`) with none of
the extra distributions installed in the interpeter `site-packages`
directory.

Fixes pex-tool#509
Fixes pex-tool#510
jsirois added a commit that referenced this issue Jun 16, 2018
The `PythonInterpreter.from_binary` method now caches by a full stable
key over all input parameters fixing previously order-dependent caching.
In addition, an `include_site_extras` argument is added to allow the
caller to request a bare interpreter (by passing `False`) with none of
the extra distributions installed in the interpeter `site-packages`
directory.

Fixes #509
Fixes #510
@jsirois jsirois mentioned this issue Jul 27, 2018
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