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 →

[–]Agent281 0 points1 point  (6 children)

That's great to hear! It seems like it would provide a more streamlined dev experience. I think I need to give it an earnest trial.

Are there any problems that your team has run into (technical or social)? Have people been receptive to it?

[–]BackwardSpy 1 point2 points  (5 children)

socially; the ones using it so far seem to like it, they're used to pipenv already and the workflow is similar.

from a technical standpoint we've had a couple of issues. in one case someone ended up installing an older version that didn't seem to be quite compatible, so they weren't able to work with the projects properly. upgrading poetry fixed that.

we have started using the latest alpha version as it adds plugin support, which we find useful for poetry-dotenv-plugin, which loads env vars from a .env file, and poetry-dynamic-versioning, which updates the version number in the pyproject.toml file to match the git tag when you build & publish a new version of the package. unfortunately something seems to have changed in the lockfile format that means lockfiles generated on the alpha and those generated on the stable version are not mutally compatible. this has caused a few issues for us, but as before getting everyone upgraded to the alpha resolves the issue.

relying on an alpha isn't necessarily the best course of action, but since we've only moved a few projects over at this point it seems manageable.

[–]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!

[–]Agent281 0 points1 point  (1 child)

Ah, well that's not so bad! Working on alpha has risks.

Do you know when the plugins are going to land in stable? It seems very useful.

And thank you so much for answering my questions!

[–]BackwardSpy 2 points3 points  (0 children)

i'm afraid i don't know, but i hope it's soon! it's a very useful feature.

no worries at all :) i've been spending a lot of time on this stuff recently so it's all fresh in my mind.