Hacker News new | ask | show | jobs
by r4indeer 1082 days ago
I regularly hear that the tooling of Python is bad, but we've had Poetry for a while now and it just works.

Unfortunately, I'm not experienced in Rust so I cannot really compare it to cargo. However, Poetry does everything I would expect from dependency management and packaging/publishing and I've never had problems with it.

Also, there is ruff [2] (ironically written in Rust) and mypy [3] (they recently left 0ver!) for static analysis, black for code formatting (I really miss an opinionated formatter like this in other languages), etc. They also work just fine. Python tooling doesn't seem bad to me.

[1] https://python-poetry.org/ [2] https://github.com/astral-sh/ruff [3] https://mypy-lang.org/

2 comments

I'll grant it could be much worse (Common Lisp, OCaml also have significant tooling problems). I haven't used mypy but I do use pyright and it's alright.

The only way I've found to make Python tolerable is 1) lots of dataclasses and 2) using it as a more strongly-typed bash (i.e.: not for building large and complex software objects).

Poetry works, but unfortunately it depends on Python and so it frequently breaks unless you’re very careful with your Python environment management.

Installed it with your system’s native version? Good luck getting it to spawn a venv in a newer version. Used a Homebrew version? When it updates, Poetry breaks. Using asdf? Everything breaks, somehow.

I recently tried pipx and have hope that this will persist.

True, that's why they recommend installing Poetry either via their installer or using pipx, as you did.

pipx and pip's externally-managed-environment should help mitigate a lot of the broken environment issues. I use them too.