-
-
Notifications
You must be signed in to change notification settings - Fork 360
Description
Description
According to the documentation uv is optional:
The virtual environment type by default uses virtualenv for virtual environment creation and pip to install dependencies. You can speed up environment creation and dependency resolution by using UV instead of both of those tools.
But hatch lists it as a required dependency:
Line 56 in 962260e
| "uv>=0.5.23", |
It'd be great to have an option not to install uv with hatch.
Use case/motivation
uv is a large binary, consisting of 18MB of wheels and 45MB of binary files. It accounts for 64% of the total size of downloaded wheels during hatch installation and 40% of the size of virtual environments after installation. In many cases, installing uv at all with hatch is unnecessary because:
-
uvmay already be installed:
Many developers likely haveuvinstalled, and there's no reason to install it twice. Even hatch's CI installsuvtwice (https://github.com/pypa/hatch/actions/runs/20072023789/job/57576505774). -
Environments are disposable:
In environments like CI or containers, hatch is used for a single action, after which the environment is deleted. In such cases, installinguvmay consume more resources than the performance benefits it provides.
Additionally, it creates a peculiar situation when a project management tool relies on a third-party project management tool.
Therefore, if we make uv optional, we'll gain more flexibility and be able to save some resources.
Related issues
No response
Are you willing to submit a PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow the Python Software Foundation's Code of Conduct