4 ms·
Use Poetry. Python packaging problems solved.
by hasty_pudding 3y ago
Use Poetry. Python packaging problems solved.
- apple4ever 3y agoThat's what I found. It just works. I never have to worry about anything. Python should just adopt it.
- drcongo 3y agoI don't know why the PyPA seems to be stubbornly ignoring Poetry, most Python devs I know have switched to it and are very unlikely to switch again to something else. It does what you need it to do, it's stable and reliable these days, and the ergonomics are good.
- Hackbraten 3y agoI wish Poetry were PEP-621 compliant though. [1] Currently, it uses a proprietary configuration group (or "tool section", as they seem to call it in `pyproject.toml` speech). [1]: https://github.com/python-poetry/roadmap/issues/3 https://github.com/python-poetry/roadmap/issues/3
- drcongo 3y agoI kinda wish PEP-621 had gone more down the pyproject route that poetry took, their version looks so much cleaner and more readable at a glance than the PEP-621 version.
- nerdponx 3y agoHatch seems to be the preferred tool by PyPA, probably because it's more standards-compliant and it claims standards-compliance as a design goal.
- deleted 3y ago[deleted]
- bbojan 3y agoAlso Poetry integrates well with pip/venv and vice-versa, so you can transition to it step-by-step if your project consists of multiple packages across a multirepo or a monorepo. You don't have to switch everything all at once.
- BerislavLopac 3y agoNo, use PDM. ;) The main problem with Poetry is that it still does not support PEP 621. [0] [0] https://github.com/python-poetry/poetry/issues/3332 https://github.com/python-poetry/poetry/issues/3332
- apple4ever 3y agoPEP 621 doesn't seem supported any more either > This PEP is a historical document. The up-to-date, canonical spec, pyproject.toml specification, is maintained on the PyPA specs page. I'd be fine if it supported it, but then PyPA should push to standardize on Poetry.
- BerislavLopac 3y agoYes, but PEP 631 is still relevant here.
- shankr 3y agoI tried using PDM at my new work place and gave up. I had weird issues and since I had used poetry before, I switched to it. Poetry just works out of the box these days.
- guappa 3y agoPoetry is just a wrapper on pip… might as well just use pip.
- hasty_pudding 3y agoPython is just a wrapper on assembly language. Might as well just use assembly. ;P
- guappa 3y agoI guess you are one of those people who thinks installing 300MiB of dependencies to save 3 lines of code is completely ok?
- nerdponx 3y agoFor packaging you need more than that. Poetry and Hatch both wrap or replace a bunch of small modular components: Pip, Venv, Build, Twine, Setuptools, Pip Compile (fo lockfiles), and a task runner like Tox, Nox, or Invoke. You can (and people do) use that "stack" instead of Poetry or Hatch, if you prefer a more Unix-style approach of modularity and composability among several single-purpose tools.
- PurpleRamen 3y agoAre there relevant use cases, which poetry is not supporting, because of which people prefer other solutions too?
- bvrmn 3y agoYes a great tool which breaks existing project tomls on update. Before poetry you had one issue and two with.