Docs: Mention that .python-version
is obsolete if project.requires-python
is present in pyproject.toml
?
#8247
Labels
question
Asking for clarification or support
First a big thumbs up for the great work you're doing with ruff and uv! We have adopted both in our company, and we're overwhelmed!
I have just a quick request for clarification: https://docs.astral.sh/uv/guides/projects/ implies that it is always necessary (or at least best practice) to have the file
.python-version
checked in. But for standards-compliant projects that defineproject.requires-python
inpyproject.toml
, this seems obsolete. I tried it out, and in fact, uv correctly detectsproject.requires-python
and installs the intended python version, even without.python-version
.In our project, I wanted to remove
.python-version
, so that we don't have the python version defined in 2 separate places. But then I became insecure because of the documentation.Therefore, I think it would be helpful to add a remark to https://docs.astral.sh/uv/guides/projects/, mentioning that
.python-version
is obsolete in this case. WDYT?The text was updated successfully, but these errors were encountered: