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

Python version pins need to be combined with Requires-Python #5228

Open
zanieb opened this issue Jul 19, 2024 · 1 comment
Open

Python version pins need to be combined with Requires-Python #5228

zanieb opened this issue Jul 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@zanieb
Copy link
Member

zanieb commented Jul 19, 2024

As briefly discussed at #4989 (comment)

When reading pins from .python-version files in workspaces, the Requires-Python information may need to be layered to resolve the correct Python interpreter e.g. with

  • 3.10 and 3.12 on the PATH
  • A project that requires >=3.11
  • And a pin of cpython

We will currently resolve to 3.10 since ignore the project Python requirement entirely when there is a pin.

Instead, we should combine the PythonRequest::Implementation and the Requires-Python into a PythonRequest::ImplementationVersion(..., VersionRequest::Range(...)).

@zanieb zanieb added the bug Something isn't working label Jul 19, 2024
@zanieb
Copy link
Member Author

zanieb commented Jul 19, 2024

This could get pretty complicated. We may want to think about the problem space a bit before implementing the suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant