Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Poetry – Python dependency management and packaging made easy (eustace.io)
7 points by sdispater on March 21, 2018 | hide | past | favorite | 3 comments


Poetry is a new tool to help you manage your Python projects.

It is both a dependency management tool and a packaging tool. Most of the reasons why I started this are detailed in the README (along with why I don’t want to use Pipenv) here: https://github.com/sdispater/poetry#why, but if you want to know the advantages of Poetry compared to existing tools, here are a few:

- Exhaustive dependency resolver

- Intuitive CLI (See https://poetry.eustace.io/docs/cli/)

- Emphasis on semantic versioning and constraint specification so that wildcard dependencies (`*`) will be considered bad practice

- Support for dependencies caret, tilde, wildcard, inequality and multiple requirements.

- Only one file: the standardised pyproject.toml which aims at being readable and clear.

- Mandatory compatible python versions specification.

Also, Poetry is Python 3.6+ only but can manage Python 2 projects without any problem.

And finally, Poetry is not completely stable yet so internally things can change but the CLI and commands are pretty much stable so backwards-incompatible changes should not happen too often.


Your example of the "better" dependency resolutions seems to violate one of the constraints pipenv sees. Does pipenv somehow assume a rule that isn't there or what's going on in that example?


Pipenv sees the wrong constraint. It just aggregates the constraint for pbr that it sees.

In details:

oslo.utils==1.4.0 requires:

- pbr (>= 0.6, != 0.7, < 1.0) - oslo.i18n (>= 1.3)

So, poetry will take the latest version of oslo.i18n which requires:

- pbr (!= 2.1, >= 2.0)

Poetry will detect the conflict and backtrack oslo.i18n to version 2.1.0 which requires:

- pbr (>= 0.11, < 2.0)

This is compatible with the requirements of oslo.utils and pbr==0.11.1 will be installed




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: