Live data from Hacker News

Python Modern Practices

stuartellis.name

51–56 of 56 posts

Re: Python Modern Practices

#51
post #37
post #3

Earlier quoted context omitted.

Was going to comment the same thing. Would love to hear the author expand further on why not use Poetry. I've found it to be pretty solid and continue to use Poetry + Pyenv for all my projects, but open to hearing the case for PDM or Hatch.

After struggling with the complexity of pyenv and slowness of poetry I'm really happy with rye. It manages both python versions (which it downloads instead of compiling) and package versions. It's written in rust so it's faster and can replace pipx as well for installing global tools. (Some people will recommend uv which rye is slowly merging with buy uv is still missing some rye features, probably some time in the f…

mise is also a great alternative to pyenv and works with for Node projects too.

Re: Python Modern Practices

#52
post #2

>Avoid using Poetry for new projects. Poetry predates many standards for Python tooling. This means that it uses non-standard implementations of key features, such as the dependency resolver and configuration formats in pyproject.toml files. What? This is the first I've heard of this.

pyenv and poetry always my goto

Replace pyenv with mise. It's faster and supports Node projects.

Re: Python Modern Practices

#53

For what it's worth, I still prefer to use pip, python -m venv and virtualenvwrapper. Solves 99% of the issues with 1% of the complexity

Is there something wrong with pipenv[0] that I'm not aware of? It really feels like a full solution, I've been using it for years, and I can't understand why it isn't more widely used.

[0] pipenv.pypa.io

Re: Python Modern Practices

#55
post #12

For many sections I'd ask myself "Why?" Sure, I know you can click on the links and do deeper research, but I'd love a quick "why" blurb for each section. Just a short "Why this is nice? Well, because..."

For Python package management there are no good whys.

But there are plenty of new ones.

Re: Python Modern Practices

#56
post #7

Earlier quoted context omitted.

pyenv? great! then just use pip with requirements.txt... what's wrong with pip freeze? why are there so many competing tools? it's very anti-python IMO.

> what's wrong with pip freeze? Aside from all the obvious issues of having no distinction between transitive and direct dependencies, it completely breaks cross-platform support if any of your dependencies have platform-specific sub-dependencies (which is not uncommon in python).

pip freeze was an overly simplified hyperbolic jest...

fair point, so when this packaging mess happens, can one not strike a balance, and define the dependencies that you need, then, and let the resolver handle the rest?

Post reply on HN