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

Discussion about dependency management #6

Open
nifadyev opened this issue Aug 26, 2024 · 7 comments
Open

Discussion about dependency management #6

nifadyev opened this issue Aug 26, 2024 · 7 comments

Comments

@nifadyev
Copy link
Contributor

Let's discuss improvements and changes related to dependency management.
If you have any tool, package, config, or script to share, feel free to suggest it into this discussion.

@nifadyev
Copy link
Contributor Author

Poetry is a good tool compared to pip but it has some major disadvantages:

  • Not PEP compatible pyproject.toml
  • Difficulties with Docker installation. There are multiple installation options but none of them is canonical
  • 600+ issues in Github. Package is widely used, sure, but issues number is big enough
  • Devs previously pushed breaking changes as patch version. It changed the format of critical files and broke CI pipelines. Also, they randomly raised exception in CI to force an upgrade from v1 to v2. Such situation could happen again and lead to downtime

Maybe some alternatives (pipenv, pdm, uv) should be considered as a replacement.

@evrone evrone deleted a comment Aug 26, 2024
@batazor
Copy link
Member

batazor commented Aug 26, 2024

I prefer to use uv because it replicates the pip syntax: pip <command> -> uv pip <command> while being noticeably faster and actively developing, e.g. support for workspaces, running a package without installation, python version control

my proof:

@nifadyev
Copy link
Contributor Author

@batazor , uv looks promising but don't you think it is not production ready? Have you used it on production? ruff became stable after some years of "beta" but linter/formatter is not so critical as dependency manager and command executor. We should be extra cautious with such crucial project component

@batazor
Copy link
Member

batazor commented Aug 29, 2024

@nifadyev You can read about compatibility with pip here

In the first versions, some flags were missing, but currently, all major flags and parameters are supported

@nifadyev
Copy link
Contributor Author

Thanks, @batazor , uv is evolving very fast. I've read the article about compatibility, LGTM
I would suggest trying uv on some low/middle priority internal projects and then expand its usage to more complex internal projects. And only after successful migration to uv on our project, we may start using it on client projects.

@grigoryvp
Copy link

uv seems to be the most promising dependency management tool of them all right now

@nifadyev
Copy link
Contributor Author

Above is PR with ability to choose package manager on project initialization. Probably it is a suitable option. Please review and share your opinions.

soltanoff pushed a commit that referenced this issue Sep 26, 2024
* Allow to choose Poetry or uv as package manager

* Fix invalid rebase on merge conflict

* Remove lock file only if it exists

* Change lines order to preserve pyproject-uv.toml pre deletion

* Add package_manager choice, exclude .github and venv from Jinja2 rendering

* Fix Jinja2 conditional statements

* Add missing Ruff and pylint config to pyproject-uv.toml
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

3 participants