You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently on uv init a project boilerplate created includes the file .python-version.
What is the purpose of this file, if there are constraints in pyproject.toml and uv.lock?
Is it just for compatibility with tools like pyenv or is there more to it?
I really like how clean project directory became after moving a lot of stuff (like requirements.*) to pyproject.toml. So wonder, if .python-version is really required in two senses:
Is it required for the projects now? I tested by deleting .python-version, and everything works as expected and this file is not recreated with commands like uv run, uv sync and uv lock
Since a lot of constraints/pinned versions of things are now in pyproject.toml and uv.lock, maybe if .python-version still plays some important role, its function can be moved to pyproject.toml or uv.lock in future?
Asking as a 5-year user of pyenv and .python-version. They are great, but I don't really miss them.
Also, couldn't find peps related to this file.
The text was updated successfully, but these errors were encountered:
A .python-version file is not strictly required, but it's useful to have it when developing a project as it allows you to specify the exact Python version you are using to do development. It's different to the requires-python field - that is the range of Python versions supported by your project.
Currently on
uv init
a project boilerplate created includes the file.python-version
.What is the purpose of this file, if there are constraints in
pyproject.toml
anduv.lock
?Is it just for compatibility with tools like pyenv or is there more to it?
I really like how clean project directory became after moving a lot of stuff (like
requirements.*
) topyproject.toml
. So wonder, if.python-version
is really required in two senses:.python-version
, and everything works as expected and this file is not recreated with commands likeuv run
,uv sync
anduv lock
pyproject.toml
anduv.lock
, maybe if.python-version
still plays some important role, its function can be moved topyproject.toml
oruv.lock
in future?Asking as a 5-year user of
pyenv
and.python-version
. They are great, but I don't really miss them.Also, couldn't find peps related to this file.
The text was updated successfully, but these errors were encountered: