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 a bug in the python venv export logic. (cherrypick of #15294) #15307

Merged
merged 3 commits into from May 3, 2022

Conversation

benjyw
Copy link
Sponsor Contributor

@benjyw benjyw commented May 2, 2022

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]
@benjyw
Copy link
Sponsor Contributor Author

benjyw commented May 2, 2022

Note that this wasn't a clean cherry-pick, as the tool venv export functionality isn't in 2.11.x, so those parts of the original change had to be nuked here.

@benjyw benjyw added the category:bugfix Bug fixes for released features label May 2, 2022
benjyw added 2 commits May 2, 2022 17:40
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@benjyw benjyw merged commit 9ac327d into pantsbuild:2.11.x May 3, 2022
@benjyw benjyw deleted the cherrypick_15294_to_2.11.x branch May 3, 2022 02:51
achimnol added a commit to lablup/backend.ai that referenced this pull request May 4, 2022
- pants requires Python 3.7 to 3.9 as its runtime, while the target
  project may use other Python versions such as Python 3.10.
- The reason to use Python 3.10 as the pants runtime
  was a bug now fixed by pantsbuild/pants#15307.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bugfix Bug fixes for released features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants