python-trio / trio

Trio – a friendly Python library for async concurrency and I/O
https://trio.readthedocs.io
Other
6.12k stars 335 forks source link

Switch to ``uv`` in CI #2956

Closed Fuyukai closed 2 months ago

Fuyukai commented 7 months ago

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.

A5rocks commented 7 months ago

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.

Fuyukai commented 7 months ago

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

A5rocks commented 7 months ago

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.

etianen commented 7 months ago

~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

A5rocks commented 7 months ago

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 :'( )

jakkdl commented 7 months ago

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.

mikenerone commented 7 months ago

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

A5rocks commented 2 months ago

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.