Python Modern Practices
11–20 of 56 posts
Re: Python Modern Practices
#12Re: Python Modern Practices
#13Sad to not see Attrs mentioned. Dataclasses are cool, I guess, but Attrs is seriously great.
For my use the key is how easily you can add simple conversion of values to attrs. IIRC this was intentionally omitted from dataclasses. For a 1-off using a factory with a dataclass is easy but repeated uses send me back to attrs
Re: Python Modern Practices
#14I'm surprised the post doesn't mention uv, which did quite well on HN a few months ago. Any experience? https://github.com/astral-sh/uv https://news.ycombinator.com/item?id=39387641
I have seen occasional hiccups, so we don't use it in prod just yet. But I use it in local all the time.
They've been responsive to issues, so give it a shot.
Re: Python Modern Practices
#15Sad to not see Attrs mentioned. Dataclasses are cool, I guess, but Attrs is seriously great.
Re: Python Modern Practices
#16Isn't this obsoleted by the previous section on using pyproject.toml?
Re: Python Modern Practices
#17>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? 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.
I prefer my requirements.txt to include only the packages I install with pip myself (and not their dependencies).
Re: Python Modern Practices
#18Re: Python Modern Practices
#19>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.