News for hackers. Stuff that matters.
Re:I'm Switching to Python and Actually Liking It by taeric on Wednesday July 16, 2025 @01:26PM (#44584789)
I think for a lot of us, it was very frustrating when it was being pushed with no real analog for the practices we had in other languages. Poetry used to be pushed as how to do dependency management, but it was not obvious that it was not necessarily your build manager, as well. Even today, I'm not entirely clear what the standard approach is for how to manage a project. :(
Re:I'm Switching to Python and Actually Liking It by macawfish on Wednesday July 16, 2025 @01:42PM (#44584962)
If I were to try again I'd go with uv, it seems way way better
Re:I'm Switching to Python and Actually Liking It by taeric on Wednesday July 16, 2025 @02:06PM (#44585197)
I have been sticking with poetry for a while, now. What would make me want/need to move to uv?
Re:I'm Switching to Python and Actually Liking It by macawfish on Wednesday July 16, 2025 @02:25PM (#44585369)
Maybe you'll find this series of articles interesting: https://www.loopwerk.io/articles/tag/uv/
Re:I'm Switching to Python and Actually Liking It by taeric on Wednesday July 16, 2025 @04:59PM (#44586711)
Thanks! I'm not entirely sure I see a reason to change on there, oddly.

I'm very fortunate that my python projects are all relatively small, so maybe that colors things a bit. Certainly looks like something that would have swayed me to uv at the start, but as things are, I think I mainly just wish there was a more standard/accepted work flow for build and release.

Re:I'm Switching to Python and Actually Liking It by macawfish on Thursday July 17, 2025 @11:29AM (#44594429)
Makes sense. I've stopped using python for development but I run into Python utilities I want to use all the time. uv/uvx are perfect for someone like me.
Re:I'm Switching to Python and Actually Liking It by cdelsolar on Wednesday July 16, 2025 @02:17PM (#44585295)
yeah Poetry is fine
Re:I'm Switching to Python and Actually Liking It by maleldil on Wednesday July 16, 2025 @05:33PM (#44587022)
- Performance: uv is so much faster that some operations become transparent. poetry's dependency resolver is notoriously slow. uv being a native binary also means it has a faster startup time.

- Interpreter version management: uv can handle separate python versions per project automatically. No need for pyenv/asdf/mise.

- Bootstrapping: you only need the uv binary, and it can handle any python installation, so you don't need to install python to install a management program.

- Environment management: uv will transparently create and update the environment. You don't need to source the venv either, you use `uv run...` instead of python directly.

Overall, it makes common Python project management tasks simple and transparent. It also follows standards (like project definition metadata and lock files), which poetry often doesn't.

Re:I'm Switching to Python and Actually Liking It by taeric on Wednesday July 16, 2025 @06:00PM (#44587263)
I'll pay attention to poetry soon. As is, I don't recall my builds ever going slow because of poetry. I don't think I've noticed it have any impact on speed, at all.

I did just update the dependencies of some of my projects. I could see how that could be faster. I don't do that often enough for me to care about it, though. `poetry run pytest` is the slowest thing I have, and I'm confident most of that slowness is in my direct control already.

I'm intrigued on the lock file point. I thought that was literally one of the main reasons to use something like poetry, in the first place? Does uv have a better lock file mechanism?

Re:I'm Switching to Python and Actually Liking It by maleldil on Thursday July 17, 2025 @10:09AM (#44593642)
uv supports the standardised lock file format. This means that you're not tied to uv for anything, as most project settings it uses (eg metadata, dependencies, extras, etc.) are based on PEPs. poetry has its own format for many things.

https://peps.python.org/pep-0751/

Re:I'm Switching to Python and Actually Liking It by taeric on Thursday July 17, 2025 @03:15PM (#44597034)
Ah, I see that this is a newer format than the projects I've been using poetry for. Are there advantages to move to it?
Re:I'm Switching to Python and Actually Liking It by maleldil on Saturday July 19, 2025 @06:58PM (#44620242)
Interoperability being the major one. You can switch between uv and other tools (such as pdm and hatch) with minimal effort.