bazel-contrib / bazel-contrib/rules_uv
pip_compile should consider Python version as constraint
- Dominant language
- Starlark
- Stars
- 29
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
The Python toolchain used in the project should also be considered as constraint for compiling the lock file. If my project uses Python 3.X, then the lock file should not contain any versions that require some > 3.X.
While this can be solved by explicitly constraining all deps manually, it sounds like something that could be easily done be the tool.
I am creating this issue here, though I am not fully sure if this is belongs here or in https://github.com/astral-sh/uv.
Contributor guide
Research direction
Start by locating the pip_compile implementation and the code path that generates or updates the lock file. Check how the configured Python toolchain reaches that entry point, then determine the project’s expected behavior for dependencies requiring a newer Python version and add coverage for the relevant compilation case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100