News for hackers. Stuff that matters.
Re:Guido van Rossum joins Microsoft by derefr on Thursday November 12, 2020 @01:01PM (#25072630)
People keep saying that about every new solution. But then another one comes along that's even better-er, and the previous one peters out.

The biggest need for a package manager and its ecosystem is continuity: the stance that new features and paradigms will be gradually shifted toward — without package-ecosystem incompatibilities, without CLI commands just disappearing (but instead, with long deprecation timelines), etc.

In other words, an officially-blessed package manager is one where, when something better-er comes along, it gets absorbed by the existing thing, instead of replacing it.

That is what the Python ecosystem is missing.

Re:Guido van Rossum joins Microsoft by throwaway894345 on Thursday November 12, 2020 @01:24PM (#25072933)
I don’t think it’s that another one comes along that’s better as much as it is the new “better” ends up missing some important corner case. Pipenv advertised itself as solving all problems, but once someone tries it in practice, they realize that it introduces a new problem: every little interaction takes literally 30 minutes for any non-toy project. I’ve heard mixed things about poetry, but I wouldn’t be surprised in the least of it failed to behave as advertised just because this has been my experience with every package manager I’ve tried to use. And it’s embarrassing when every other language has a package manager that just works.

EDIT: It was probably misleading to characterize Pipenv as advertising itself as solving all problems; it’s probably more correct to say that it’s significant weaknesses weren’t advertised and thus one has to invest considerably before discovering them for oneself.

Re:Guido van Rossum joins Microsoft by memco on Thursday November 12, 2020 @01:51PM (#25073328)
Just a heads up to anyone who hasn’t looked recently: pipenv has been very actively worked on since earlier this year and has had four updates that fix a lot of issues. Earlier this year I would have said Poetry is better hands down, but after the updates and after using poetry and seeing some of its quirks, it’s a much closer matchup.
Re:Guido van Rossum joins Microsoft by ifore on Thursday November 12, 2020 @04:55PM (#25075625)
If it wasn't so opinionated it might have been more successful.

Just one example: you want your virtualenvs to be created in ~/.virtualenvs so that pipenv is a drop-in replacement for virtualenvwrapper+pip? Tough luck for you, Kenneth Reitz doesn't think that's how it should be done.

At least 3 or 4 times some issue I've wanted resolved I found in the issue tracker with the last message "we'll have to check with kennethreitz42 whether we're allowed to change that" and then silence for a year.

It could still catch up with poetry, but from what I've seen there's a fundamental mindset difference in how change requests are approached between pipenv and poetry.

Re:Guido van Rossum joins Microsoft by dagw on Friday November 13, 2020 @05:31AM (#25080933)
Last I checked (3-4 month ago) Pipenv only cares about the situation when you are deploying code on machines (or containers) you have complete control over. If you're writing code for deploying on machines you don't have control over, via for example pip install, then pipenv isn't helpful while poetry supports this out of the box.
Re:Guido van Rossum joins Microsoft by michaelmior on Thursday November 12, 2020 @04:10PM (#25075101)
Interesting. I haven't used pipenv on any very large projects, but I'm surprised to hear about the slowness. With the (admittedly small) projects I've tried it, I found that it does more or less just work.
Re:Guido van Rossum joins Microsoft by throwaway894345 on Thursday November 12, 2020 @04:50PM (#25075565)
As I understand it, the problem is that Pipenv needs to resolve the dependency tree to do just about anything; however, the dependency tree is dynamic—to determine a package’s dependencies, you have to download the package and run it’s setup.py. To get the whole tree, you have to recursively download and run each package. So the cost is proportional to the size of the dependency tree, so it’s very plausible that it works fine for the smallest projects.
Re:Guido van Rossum joins Microsoft by lmm on Friday November 13, 2020 @01:34AM (#25079604)
> The biggest need for a package manager and its ecosystem is continuity: the stance that new features and paradigms will be gradually shifted toward — without package-ecosystem incompatibilities, without CLI commands just disappearing (but instead, with long deprecation timelines), etc.

I disagree. I used to think that that's the problem, but having seen a few more cycles of it, the problem isn't that kind of commitment - after all, the whole python ecosystem enthusiastically jumps into the new thing, and Python people are used to relatively short deprecation cycles. The problems are the actual problems; every Python package manager is just embarrassingly awfully bad as soon as you try to use it for 5 minutes, presumably because they're developed by Python people who've never used a decent package manager and so think that no-one could ever need deterministic dependency resolution, once you've pinned a transitive dependency there surely wouldn't be any reason to ever want to unpin it, having the package manager coupled to the language version is absolutely fine, no-one could ever want a standard way to run tests ...

Re:Guido van Rossum joins Microsoft by solidasparagus on Thursday November 12, 2020 @06:48PM (#25076936)
What the Python ecosystem actually needs is a single opinionated perspective on versioning that is followed by everyone, such as NPM's semantic versioning. In the absence of that I don't see how dependency resolution and thus packaging is ever going to improve in Python.
Re:Guido van Rossum joins Microsoft by JAlexoid on Friday November 13, 2020 @01:55AM (#25079720)
Guido is very opinionated...

He just doesn't care about package management.

Re:Guido van Rossum joins Microsoft by DangitBobby on Thursday November 12, 2020 @01:05PM (#25072680)
Yes, Poetry should be the blessed package manager.
Re:Guido van Rossum joins Microsoft by mumblemumble on Thursday November 12, 2020 @01:15PM (#25072811)
I only want Poetry to become the be-all-end-all of package managers if it turns out that Python really is never going to fix the core problems that have engendered so many of the hacks upon which Poetry (and its competitors) is precariously balanced. Pyenv and venv, for example.
Re:Guido van Rossum joins Microsoft by bshanks on Thursday November 12, 2020 @03:43PM (#25074712)
If you were doing a green field redesign, how would you want Python to fix the core problems?
Re:Guido van Rossum joins Microsoft by dragonwriter on Thursday November 12, 2020 @05:39PM (#25076175)
> Yes, Poetry should be the blessed package manager.

Last time I tried to use poetry (and this is why it was the last time I tried to use poetry), it ignored global pip settings and had no documented mechanism for its own settings (I believe poetry uses its own implementation of or captive install of pip) which made it completely unusable in a corporate environment with annoying SSL interception issues to work around where pip + venv worked.

Poetry is a much smoother experience when it works, though.

Re:Guido van Rossum joins Microsoft by DangitBobby on Sunday November 15, 2020 @02:46AM (#25099153)
It will install a virtual env if you don't have one active and it will use the active one if you do. What global pip settings, for example?
Re:Guido van Rossum joins Microsoft by kavalg on Friday November 13, 2020 @02:30AM (#25079921)
Although I generally like it, the two major issues I have with poetry are the abysmal dependency resolution times and the handling of binary wheels.
Re:Guido van Rossum joins Microsoft by croh on Thursday November 12, 2020 @01:50PM (#25073317)
> People keep saying that about every new solution. But then another one comes along that's even better-er, and the previous one peters out.

I think this is happening these days frequently. People try to cover all use cases and then end up in biting more than they can chew. It won't work that way. Good set of MINIMALS, is easy to maintain, sustain and extend.