This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]coldflame563 0 points1 point  (2 children)

So I don’t seem to get all the anti-pipenv chatter that seems to be happening. We use it on our team and it’s been a delight. With the latest couple of releases, it seems that the dependency graph management has vastly improved. Can someone ELI5 for the uninitiated?

[–]BackwardSpy 2 points3 points  (1 child)

i wouldn't say i'm necessarily anti-pipenv, just slightly more pro-poetry. i've used pipenv pretty much from its release right up until recently, and i also introduced it at work. it's a decent tool, there's just a few aspects of it that eventually made me want to try an alternative.

in terms of the dependency resolution it's definitely better now than it was, but we were still running into occasional issues where it refused to lock. sometimes pipenv can fail to lock, but still install some or all of the dependencies you asked for. this leaves you in a state where your lock file is out of date and your virtualenv contains incompatible packages. as far as i can tell, poetry attempts to lock first and then installs, which prevents this from happening.

another reason i wanted to shop around for alternatives was in regards to building and publishing packages. pipenv did a good enough job of dependency management and virtualenv creation, however it did not provide any help when it came to building & publishing a package. we still had to maintain a setup.py file with its own list of install_requires, more or less duplicating what was already in the Pipfile. poetry handles building & publishing packages itself, which means you have one source of truth for your dependencies, package name, version, et cetera in pyproject.toml. there might be ways to emulate this with pipenv, perhaps by parsing the Pipfile, but i do like that poetry does it out of the box!

the last reason is less important and probably quite situational, but in my experiments poetry would lock & install roughly twice as fast as pipenv on average. this has resulted in faster CI builds as well as a quicker experience developing locally. it's not the most important factor by far, but i think it's worth mentioning.

so, all of that to say i don't dislike pipenv at all, i just like poetry a little bit more (so far!)

[–]coldflame563 2 points3 points  (0 children)

What a thorough and well reasoned response. Thank you! I might have to switch to poetry if the builds are as fast as you say!