Introduce uv tool as environment and dependency management solution - #234
Merged
Merged
Conversation
pvj
force-pushed
the
dev/pip-uv-migration
branch
from
August 2, 2026 21:51
f314054 to
4713a17
Compare
Member
Author
|
@tuz666 Did you try it out, what do you think? |
pvj
force-pushed
the
dev/pip-uv-migration
branch
from
September 6, 2026 21:34
a59e252 to
e48fdb6
Compare
pvj
force-pushed
the
dev/pip-uv-migration
branch
from
September 6, 2026 21:36
e48fdb6 to
abe8506
Compare
pvj
force-pushed
the
dev/pip-uv-migration
branch
from
September 6, 2026 21:42
abe8506 to
a8c7ed9
Compare
tuz666
approved these changes
Sep 7, 2026
tuz666
left a comment
Member
There was a problem hiding this comment.
Thank you very much for this change!
It really makes dependency handling easier, faster and more straightforward.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was the issue?
We both wanted the requirements.txt as a stateless representation of our app's env. But also as a maintenance file to be edited and updated.
Again a very old big huge debt.
What is changing?
I added
uvfast, simple package manager. Below find a small text, I want to add this to the maintenance docs, what do you think? Please review the text too!To use
uvI had to bump the base image frombullseyetotrixieand python version3.11.13->3.12. Locally ran the app, no regressions.Small changes around containers and infra. Huge change, that now
requirements.txtis not needed anymore. I only added it here for comparison.The current
pyproject.tomlanduv.lockare an exact representation for therequirements.txtsee some background on the "migration" process below.I hope you find it easy to use and we can adopt using it.
use uv package manager
first steps
Migrating the reqs txt to UV. I used
uv add -r requirements.txtto get the current state of python environment under UV. Simple as that. Then some manual work was needed. I checked what the root deps are withuv treeand opened thepyproject.tomlconfig file, and removed everything except the root packages.dev guide
use local dev env
uvpython package manageruv add/uv removepyproject.tomlhas project deps, extras, local deps, tools--dry-runflag!maintain the environment
uv sync: updates the project env automatically inpyproject.toml.uv auditas sanity check.uv lockto produce the env's fully resolved lock-file derived frompyproject.toml..python-version, pyproject and lock filesRequirements.txt is not required anymore!
run the project
Using UV introduces some app-related changes.
Dockerfilean explicituv lockand theuv,uvxbinariesentrypoint.shchanged the system commands touv run...more features
See
uv tool,uv venv,uv check,uv treeThere is
uv versionwhich is not quite like the tags but could be investigated if worth to bump that as well.