astral-sh / uv

An extremely fast Python package and project manager, written in Rust.
https://docs.astral.sh/uv
Apache License 2.0
21.43k stars 628 forks source link

Ability to choose the lowest supported Python version #7779

Open lengau opened 19 hours ago

lengau commented 19 hours ago

When running uv sync it would be nice to be able to choose the lowest Python version supported by the project dynamically (rather than having to specify that version). e.g. uv sync --python=lowest

malikrohail commented 16 hours ago

can i fix this?

charliermarsh commented 15 hours ago

As in, the project defines a requires-python in the pyproject.toml, and you want to use the lowest-supported version rather than the highest?

zanieb commented 11 hours ago

I think we might need a --python-strategy <lowest | highest | first> or something. Similar to https://github.com/astral-sh/uv/issues/7562