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 PythonInterpreter caching and ergonomics. #518

Merged
merged 4 commits into from
Jun 16, 2018

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented 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 #509
Fixes #510

jsirois added 3 commits June 15, 2018 17:54
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
Copy link
Contributor

@kwlzn kwlzn left a comment

Choose a reason for hiding this comment

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

lgtm! thanks John!

:param binary:
:param path_extras:
:param include_site_extras:
:return:
Copy link
Contributor

Choose a reason for hiding this comment

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

missing values for docstrings here

Copy link
Member Author

Choose a reason for hiding this comment

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

Facepalm. Fixed!

@jsirois jsirois merged commit 1600d5b into pex-tool:master Jun 16, 2018
@jsirois jsirois deleted the issues/509-510/fixup_interpreter_api branch June 16, 2018 06:51
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