Skip to content

migration from poetry to uv #8249

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

king-11
Copy link
Contributor

@king-11 king-11 commented Apr 27, 2025

make use of standard keys for project and dependeny specification

  • provide sources to run uv build so that it can refer local packages
  • using hatchling for build as is stock build option
  • use optional-dependencies.dev for dev-dependencies
  • add hatch targets for packages and includes where unclear

#7665

Important

25.05 FREEZE MAY 12TH: Non-bugfix PRs not ready by this date will wait for 25.08.

RC1 is scheduled on May 23rd, RC2 on May 26th, ...

The final release is on MAY 29TH.

Checklist

Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:

  • The changelog has been updated in the relevant commit(s) according to the guidelines.
  • Tests have been added or modified to reflect the changes.
  • Documentation has been reviewed and updated as needed.
  • Related issues have been listed and linked, including any that this PR closes.

@king-11 king-11 requested a review from cdecker as a code owner April 27, 2025 05:49
@king-11 king-11 marked this pull request as draft April 27, 2025 05:49
@king-11 king-11 changed the title refactor: pyproject.toml poetry to uv + hatch migration from poetry to uv Apr 27, 2025
make use of standard keys for project and dependeny specification

- provide sources to run uv build so that it can refer local packages
- using hatchling for build as is stock build option
- use optional-dependencies.dev for dev-dependencies
- add hatch targets for packages and includes where unclear

Changelog-Update: use uv and hatchling instead of poetry
@king-11 king-11 force-pushed the king-11/migrate-uv branch from a75084e to d041488 Compare April 27, 2025 05:51
@king-11
Copy link
Contributor Author

king-11 commented Apr 27, 2025

pending changes:

  • ci.yaml
  • macos.yaml
  • setup.sh
  • reckless

@vincenzopalazzo
Copy link
Collaborator

What are the benefit of uv over poetry?

@cdecker
Copy link
Member

cdecker commented Apr 27, 2025

It's much faster (5-10 seconds compared to minutes using poetry). While that doesn't sound too different, it means that we don't create long lived venvs that may drift from the metadata, causing fewer "it worked on my machine" kind of errors. It can also be used as a shebang, automatically wrapping for example a plugin, downloading dependencies on first invocation, creating the venv and only then passing control to python. This means we can make plugins self-contained and single file if we wanted to.

The speed, which unlocks all of these use cases, is done via caching, and interesting speedup ideas, that are quite fun to read up on. And finally, you don't need a system-wide python installation, since uv can also download and manage python versions (prevents you from accidentally polluting the system python and potentially break your OS).

@cdecker
Copy link
Member

cdecker commented Apr 27, 2025

Great initiative @king-11 , I had a branch with some initial steps, but you are much further along, so I'd rather help you than double-tracking

@king-11
Copy link
Contributor Author

king-11 commented Apr 27, 2025

Thanks @cdecker i will get the last few things in, just raised a draft PR given I saw some interest around it and wanted to have a pre-ready change look available.

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

Successfully merging this pull request may close these issues.

3 participants