News for hackers. Stuff that matters.
Re:A Poetic Apology: Or Why Should You Use Poetry to Manage ... by arusahni on Wednesday February 10, 2021 @03:58PM (#26094688)
I personally still find Poetry and Pipenv to be a little heavy-handed for my preferred workflows. To that end, pip-tools [1] is what I recommend to those who feel similarly. It balances pinning and dependency management with common Python practices (e.g., requirements.txt).

1: https://github.com/jazzband/pip-tools

Re:A Poetic Apology: Or Why Should You Use Poetry to Manage ... by epage on Wednesday February 10, 2021 @09:59PM (#26097767)
My problem with pip-tools is that it only resolves requirements.in files for your existing platform (OS + Python version). Say I'm testing something in CI for a bunch of platforms, that means to lock my dependencies I need all of those platforms locally. I run into this as well when distributing internal tools at my company, especially since we force requiring hashes.
Re:A Poetic Apology: Or Why Should You Use Poetry to Manage ... by globular-toast on Thursday February 11, 2021 @03:32AM (#26099464)
Sounds like you're doing it wrong. Pip-tools is for building environments. The common example is a docker container. In that case you control the environment completely and you use pip-tools to ensure the images you build are reproducible.

But most python packages are not shipped as environments. They are packages to be installed into user's environments. So you shouldn't be locking your environment when you test it, you should be installing it into a fresh environment like a user would do. You can test against specific major versions of your dependencies, but this is something handled well by tox and doesn't need any locking. In fact, locking will only make your life more difficult as you'll be targeting specific minor versions.

Long story short, use pip-tools if you're building docker images or otherwise deploying a tested environment. Don't use it for regular Python packages.

Re:A Poetic Apology: Or Why Should You Use Poetry to Manage ... by scrollaway on Wednesday February 10, 2021 @04:19PM (#26094966)
The only reason to use pip-tools is because you already know it and you don't want to switch (yet). pip-tools is squarely worse than using Poetry.

Poetry is not perfect, mind you, but it's the absolute best we have in the Python world. Whenever I jump into a new project, switching it to Poetry is one of the first things I do so I have a sane working environment for it.

Re:A Poetic Apology: Or Why Should You Use Poetry to Manage ... by arusahni on Wednesday February 10, 2021 @04:32PM (#26095109)
I'm glad tools like Poetry exist, as they're filling pretty horrible gaps in the Python ecosystem.

> The only reason to use pip-tools is because you already know it and you don't want to switch (yet).

Actually, I settled on pip-tools _after_ trying Poetry :-)

> pip-tools is squarely worse than using Poetry.

News to me. Like I said in my original comment: "I personally still find Poetry and Pipenv to be a little heavy-handed for my preferred workflows." A tool that gets out of my way and lets me achieve my goals is a better tool for me. Since Poetry can't meet me where I am, pip-tools is better _for me_.

Re:A Poetic Apology: Or Why Should You Use Poetry to Manage ... by coffeefirst on Wednesday February 10, 2021 @06:04PM (#26096058)
I've actually backed away from Poetry after some really bad experiences.

When it works, it's damn near perfect.

When it doesn't work, and that usually involves a problem with a downstream dependency that isn't technically Poetry's fault, it's a massive hassle and sometimes impossible to manually override.

Re:A Poetic Apology: Or Why Should You Use Poetry to Manage ... by kyllo on Thursday February 11, 2021 @01:51PM (#26105561)
I went from Pipenv to Poetry and then back to Pipenv after encountering an infinite loop in Poetry's solver on multiple separate occasions.
Re:A Poetic Apology: Or Why Should You Use Poetry to Manage ... by diragon on Thursday February 11, 2021 @02:50AM (#26099250)
I've submitted pull requests to projects when that happens. Not many yet, but all of them have been accepted in less than a week's time. People should do this and then the problem would eventually vanish.
Re:A Poetic Apology: Or Why Should You Use Poetry to Manage ... by ksm1717 on Wednesday February 10, 2021 @05:06PM (#26095440)
These are bold and absolute claims in response to proposing that an alternative may be better for a given user’s preferences.

“I prefer pepsi because coke is too sugary.”

“The only reason you should drink Pepsi is if you already have some. It’s a squarely worse drink than coke.”

Re:A Poetic Apology: Or Why Should You Use Poetry to Manage ... by jrib on Wednesday February 10, 2021 @06:02PM (#26096039)
pip-tools has the advantage that it is super-simple to understand and reason about.

poetry works well enough but it seems to bring more complexity with it.

Re:A Poetic Apology: Or Why Should You Use Poetry to Manage ... by neolog on Wednesday February 10, 2021 @07:47PM (#26096858)
The complexity is the same or less with Poetry. It's just about whether you're delegating the complexity to Poetry or managing it yourself.
Re:A Poetic Apology: Or Why Should You Use Poetry to Manage ... by joshbuddy on Wednesday February 10, 2021 @04:29PM (#26095072)
How is it strictly worse?