←back to thread

741 points chirau | 1 comments | | HN request time: 0.227s | source
Show context
incognito124 ◴[] No.44358514[source]
uv is almost perfect. my only pet peeve is updating dependencies. sometimes I just want to go "uv, bump all my dependencies to the as latest version as possible while respecting their constraints". I still haven't found an elegant way to do this, but I have written a script that parses pyproject.toml, removes the deps, and invokes `uv add --upgrade` with them.

other than that, it's invaluable to me, with the best features being uvx and PEP 723

replies(4): >>44358537 #>>44358636 #>>44358716 #>>44374060 #
jmtulloss ◴[] No.44358537[source]
Does `uv lock —upgrade` not do what you want?
replies(1): >>44358602 #
incognito124 ◴[] No.44358602[source]
Unfortunately, no. Only `uv.lock` gets updated, but the dependencies in `pyproject.toml` are frozen at their original constraints.

What I want is, if my project depends on `package1==0.4.0` and there are new versions of package1, for uv to try install the newer version. and to do that for a) all the deps, simultaneously, b) without me explicitly stating the dependencies in the command line since they're already written in the pyproject.toml. an `uv refresh` of sorts

replies(5): >>44358700 #>>44358709 #>>44358807 #>>44358867 #>>44358896 #
1. wtallis ◴[] No.44358700[source]
> What I want is, if my project depends on `package1==0.4.0` and there are new version of package1, for uv to try install the newer version.

I think you're just specifying your dependency constraints wrong. What you're asking for is not what the `==` operator is for; you probably want `~=`.