trio icon indicating copy to clipboard operation
trio copied to clipboard

Switch to ``uv`` in CI

Open Fuyukai opened this issue 1 year ago • 7 comments

uv is a new tool from the Ruff guys that replaces pip and pip-tools.

This is mostly interesting because it's actually being benchmarked on Trio itself. Sounds like it's already been tested for us.

Fuyukai avatar Feb 15 '24 22:02 Fuyukai

Interesting, I'm totally on board with switching if the lockfiles are cross-platform. (I'm fine even if it doesn't though ~~but then the argument vs poetry is kinda not compelling~~)

Oh, yeah unfortunately it doesn't do that yet:

Similarly, uv does not yet generate a platform-agnostic lockfile. This matches pip-tools, but differs from Poetry and PDM, making uv a better fit for projects built around the pip and pip-tools workflows.

A5rocks avatar Feb 15 '24 22:02 A5rocks

But this project already uses the terrible pip-tools workflow.

Fuyukai avatar Feb 15 '24 22:02 Fuyukai

Yeah using this over pip-tools is an easy choice. It's a bit strange to switch to uv if there's software (poetry) that we're both considering (for replacing setuptools) and would work somewhat better.

Personally I'd rather uv over poetry no matter what though.

A5rocks avatar Feb 15 '24 22:02 A5rocks

~Any reason you're not a fan of poetry? I'm using it in personal and work projects and haven't had any serious issues (and the non-serious issues are fixed now).~

Ignore me I found the discussion in #2790

etianen avatar Feb 15 '24 23:02 etianen

Oh uv's ability to lock deps for arbitrary python versions seems super useful: atm we have to make sure to run pip-compile in Python 3.8.

As for poetry it's mostly just my opinion (re: standardization and speed and poor past experience :'( )

A5rocks avatar Feb 15 '24 23:02 A5rocks

Given the extensive discussion in #2790 - is uv The One that is best for CoolCat to spend time implementing? Though given that it stalled I'm open to anything-but-the-status-quo, and this looks kinda cool. The Astral/ruff guys sure are doing impressive stuff, and they're generally quite responsive to bug reports in ruff, so it being a new tool might not be too much of a problem.

jakkdl avatar Feb 16 '24 10:02 jakkdl

As that blog entry describes, the ruff folks are also taking over Rye. At the rate Trio's reached consensus on a project package manager, it seems likely that this new option will be ready for prime time before we do. :P

mikenerone avatar Feb 16 '24 15:02 mikenerone

We use uv pip compile now, uv pip install isn't used yet but I don't think that needs to be tracked in this issue.

A5rocks avatar Jul 08 '24 01:07 A5rocks