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

Migrate from Poetry to uv package manager #2220

Open
koxudaxi opened this issue Dec 14, 2024 · 2 comments
Open

Migrate from Poetry to uv package manager #2220

koxudaxi opened this issue Dec 14, 2024 · 2 comments
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request good first issue Good for newcomers

Comments

@koxudaxi
Copy link
Owner

Description

We should consider migrating our dependency management from Poetry to uv, which is a new extremely fast Python package installer and resolver written in Rust.

Benefits of migration:

  • Significantly faster package installation (up to 10-100x faster than pip)
  • Built-in compile cache for faster repeated installations
  • Reliable dependency resolution
  • Native support for all standard Python package formats
  • Compatible with existing pyproject.toml configurations
  • Lower memory usage compared to Poetry

Required Changes:

  1. Remove Poetry-specific configurations while keeping the essential pyproject.toml metadata
  2. Update CI/CD pipelines to use uv instead of Poetry
  3. Update development setup instructions in documentation
  4. Ensure all development scripts/tools are compatible with uv
  5. Update the project's virtual environment handling

Notes for Implementation:

  • uv can read dependencies directly from pyproject.toml
  • The migration should be backward compatible until fully tested
  • We should provide clear migration instructions for contributors
  • Consider adding both Poetry and uv support during a transition period

Resources:

Testing Requirements:

  • Verify all dependencies are correctly resolved
  • Ensure development workflow remains smooth
  • Test CI/CD pipeline with new setup
  • Verify package installation in clean environments
@koxudaxi koxudaxi added enhancement New feature or request good first issue Good for newcomers dependencies Pull requests that update a dependency file labels Dec 14, 2024
@bhargavyagnik
Copy link

@koxudaxi , can i take this up?

@nbro10
Copy link
Contributor

nbro10 commented Jan 1, 2025

To be honest, I think this is not strictly necessary and definitely low-priority, in my view.

Poetry works generally quite well, although sometimes it can be slow at resolving dependencies (but this is more to do with the resolution algorithm than the fact it's written in Python I think).

I've not yet tried uv, but last time I tried ruff (another tool for Python written in Rust), it didn't have many features that e.g. pylint had. I'd carefully check all features that uv has and if they match poetry before even thinking of transitioning.

The second thing you have to keep in mind is how many people are developing uv, compared to poetry. I don't think uv will go away and maybe it's the future, but poetry has been around for a few years now and it works generally fine.

A third concern is - Are there any other prominent projects that are already using uv?

Note I love Rust and if Rust will help Python I'm more than happy, but I think we need to be careful not to lose nice features that poetry offers.

There are more important problems to solve like the ones I opened: https://github.com/koxudaxi/datamodel-code-generator/issues/created_by/nbro10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants