23 ms·
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 f
by arusahni 6y ago
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 https://github.com/jazzband/pip-tools
- scrollaway 6y agoThe 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.
- joshbuddy 6y agoHow is it strictly worse?
- arusahni 6y agoI'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_.
- ksm1717 6y agoThese 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.”
- jrib 6y agopip-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.
- neolog 6y agoThe complexity is the same or less with Poetry. It's just about whether you're delegating the complexity to Poetry or managing it yourself.
- coffeefirst 6y agoI'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.
- diragon 6y agoI'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.
- kyllo 6y agoI went from Pipenv to Poetry and then back to Pipenv after encountering an infinite loop in Poetry's solver on multiple separate occasions.
- epage 6y agoMy 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.
- globular-toast 6y agoSounds 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.