Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to uv in CI #2956

Closed
Fuyukai opened this issue Feb 15, 2024 · 8 comments
Closed

Switch to uv in CI #2956

Fuyukai opened this issue Feb 15, 2024 · 8 comments

Comments

@Fuyukai
Copy link
Member

Fuyukai commented Feb 15, 2024

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
Copy link
Contributor

A5rocks commented Feb 15, 2024

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
Copy link
Member Author

Fuyukai commented Feb 15, 2024

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

@A5rocks
Copy link
Contributor

A5rocks commented Feb 15, 2024

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
Copy link
Contributor

etianen commented Feb 15, 2024

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
Copy link
Contributor

A5rocks commented Feb 15, 2024

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

CoolCat467 added a commit to CoolCat467/trio that referenced this issue Feb 16, 2024
This was referenced Feb 16, 2024
@jakkdl
Copy link
Member

jakkdl commented Feb 16, 2024

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
Copy link
Member

mikenerone commented Feb 16, 2024

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
Copy link
Contributor

A5rocks commented Jul 8, 2024

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 A5rocks closed this as completed Jul 8, 2024
CoolCat467 added a commit that referenced this issue Aug 21, 2024
* Switch to use `uv`. Closes #2956

* Update ci.sh

-U => --upgrade, for legibility

* Revert changing wheel version to be lower

* Make sure running without a venv works
Also fix shellcheck reported issues

* Try to fix getting python executable on windows

* Make `PYTHON_PATH` work on both windows and linux

* Add comment about python path variable

* Detect if on Github CI and use system python if so

* Try invoking with `python -m uv`

* Install pinned uv version from the start

Windows CI is failing because uv is trying to change it's own executable while running

* Follow shellcheck suggestions

* Use constraints instead of grep

---------

Co-authored-by: John Litborn <11260241+jakkdl@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants