-
-
Notifications
You must be signed in to change notification settings - Fork 644
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 a bug in the python venv export logic. #15294
Conversation
[ci skip-rust] [ci skip-build-wheels]
@@ -86,39 +85,28 @@ async def export_virtualenv( | |||
request.root_python_targets, python_setup | |||
) or InterpreterConstraints(python_setup.interpreter_constraints) | |||
|
|||
min_interpreter = interpreter_constraints.snap_to_minimum(python_setup.interpreter_universe) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This interpreter was not the one being used in practice! This was the legacy of the previous implementation.
@@ -217,6 +217,12 @@ def __post_init__(self): | |||
f"Given platform constraints {self.platforms} for internal only pex request: " | |||
f"{self}." | |||
) | |||
if self.internal_only and self.complete_platforms: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We check this for platforms above, but neglected to check it for complete_platforms.
Previously, and partly as a legacy of an older implementation, we acted as if the requirements pex had interpreter constraints baked into it. We relied on this when detecting the version of that interpreter. But a requirements pex is internal-only, and so has no interpreter constraints. So in practice we were picking whatever interpreter was used to run the pex, and that may not have been compatible with the relevant constraints. Now we always use a compatible interpreter. [ci skip-rust] [ci skip-build-wheels]
Will cherry-pick this to 2.12.x now, but will wait until we get 2.11.0 out before I cherrypick to 2.11.x, to target a 2.11.1 release. |
Good call. Thanks. #15298. |
Previously, and partly as a legacy of an older implementation, we acted as if the requirements pex had interpreter constraints baked into it. We relied on this when detecting the version of that interpreter. But a requirements pex is internal-only, and so has no interpreter constraints. So in practice we were picking whatever interpreter was used to run the pex, and that may not have been compatible with the relevant constraints. Now we always use a compatible interpreter. [ci skip-rust] [ci skip-build-wheels]
…15294) Previously, and partly as a legacy of an older implementation, we acted as if the requirements pex had interpreter constraints baked into it. We relied on this when detecting the version of that interpreter. But a requirements pex is internal-only, and so has no interpreter constraints. So in practice we were picking whatever interpreter was used to run the pex, and that may not have been compatible with the relevant constraints. Now we always use a compatible interpreter. [ci skip-rust] [ci skip-build-wheels]
…5307) Previously, and partly as a legacy of an older implementation, we acted as if the requirements pex had interpreter constraints baked into it. We relied on this when detecting the version of that interpreter. But a requirements pex is internal-only, and so has no interpreter constraints. So in practice we were picking whatever interpreter was used to run the pex, and that may not have been compatible with the relevant constraints. Now we always use a compatible interpreter. [ci skip-rust] [ci skip-build-wheels]
Previously, and partly as a legacy of an older implementation, we acted as if the requirements pex
had interpreter constraints baked into it. We relied on this when detecting the version of that interpreter.
But a requirements pex is internal-only, and so has no interpreter constraints. So in practice we
were picking whatever interpreter was used to run the pex, and that may not have been compatible
with the relevant constraints.
Now we always use a compatible interpreter.
[ci skip-rust]
[ci skip-build-wheels]