uv icon indicating copy to clipboard operation
uv copied to clipboard

Can we use uv for dependency management like poetry

Open YeonwooSung opened this issue 1 year ago • 5 comments

Just curious, is it possible to use uv for managing and updating the dependencies and dependencies of dependencies just like poetry so that we could replace the poetry with uv?

YeonwooSung avatar Feb 22 '24 14:02 YeonwooSung

Not yet! This is on our roadmap.

zanieb avatar Feb 22 '24 21:02 zanieb

Ah, nice. Thanks for the reply.

I will look forward to that day that we could replace the poetry with uv

YeonwooSung avatar Feb 23 '24 02:02 YeonwooSung

FYI there is a discussion about standardizing lock files that are not Poetry-like but more pip-tools style at https://discuss.python.org/t/lock-files-again-but-this-time-w-sdists/46593/ .

brettcannon avatar Feb 23 '24 19:02 brettcannon

@zanieb Is the roadmap publicly documented somewhere?

nikhilweee avatar Mar 12 '24 15:03 nikhilweee

Not yet, just in the issue tracker.

zanieb avatar Mar 12 '24 16:03 zanieb

because I did not find it in the tracker: is there an issue for platform independent lock files? Will uv wait for the finalization of the mentioned PEP?

What is the currently recommended worklow for managing/freezing dependencies?

benjaminbauer avatar Apr 10 '24 11:04 benjaminbauer

What is the currently recommended worklow for managing/freezing dependencies?

I've been doing this:

uv pip compile --generate-hashes -o requirements.lock pyproject.toml

Basically takes the dependencies from pyproject.toml and pins them in requirements.lock.

Then install from requirements.lock directly.

helderco avatar Apr 10 '24 12:04 helderco

We are implementing platform independent lock files and will do so before waiting for a standard to be established. I can't find an issue either, @BurntSushi do you know of one / want to make one?

zanieb avatar Apr 10 '24 14:04 zanieb

I believe it's here: https://github.com/astral-sh/uv/issues/2679

charliermarsh avatar Apr 10 '24 14:04 charliermarsh

The lock file work is being tracked in https://github.com/astral-sh/uv/issues/3347 and we're actively adding experimental Poetry-style commands such as add, remove, sync, and run.

zanieb avatar Jun 19 '24 00:06 zanieb