News for hackers. Stuff that matters.
Re:If this project is dead, just tell us by sidmitra on Friday December 13, 2019 @08:59AM (#21781522)
They don't do the same thing. pipenv allows you to create, manage virtual environments(using venv) apart from managing requirements file(Pipfile) and an npm like locking mechanism, dependency graphs, dev dependencies and more.

I prefer poetry though, since the consensus seems to be coming together on pyproject.toml rather than individual files like Pipfile. A lot of tools have already started supporting the toml file for their config, or have PRs pending.

Re:If this project is dead, just tell us by YPCrumble on Friday December 13, 2019 @09:40AM (#21781924)
I understand the value of a locking mechanism in the JS ecosystem because 1/ many packages depend on an intricate web of other packages that overlap, 2/ many packages use semver ranges, and 3/ you don't want two versions of the same package running on a user's browser, due to conflicts and increased size.

I can't think of many Python packages that have the same issues, and Python code isn't sent to and running on a user's browser.

Am I wrong or is there a reason that a locking mechanism (other than git) is helpful in Python?

Re:If this project is dead, just tell us by joshstrange on Friday December 13, 2019 @09:47AM (#21782001)
I think this has less to do with "you don't want two versions of the same package running on a user's browser" and more to do with "when I clone a project and run npm/pip install I want it to be in a known state".

I don't use Python/pip much but as for npm: the problem is when your dependencies, direct or indirect (dependencies of dependencies), aren't "exact". You have something like "~1.2.3" or "^1.2.3". If every developer followed Semvar perfectly, never shipped regressions or new bugs when fixing a bug, and was always able to identify every breaking change then life would be perfect.

That is, however, not the world we live in. So a "lock" file respects your "fuzzy" versions ^/~ when you first run the npm install and then subsequent runs will install using the exact versions you downloaded the first time. This helps solve the "works me me"/"work on my machine" problems. The idea being if you can run it locally then the build server and production can also build/run your code.

Re:If this project is dead, just tell us by weberc2 on Friday December 13, 2019 @10:25AM (#21782361)
All of those apply to Python as well except the multiple packages concern has nothing to do with a browser and everything to do with the fact that a given Python process can only load one version of a library at a time (and probably for good reason).
Re:If this project is dead, just tell us by Ar-Curunir on Friday December 13, 2019 @05:03PM (#21785999)
I mean, Rust uses the same locking mechanism to great success. I've never seen a breaking change from upgrading a Rust dependency that preserves semver (which is 99% of them)
Re:If this project is dead, just tell us by josteink on Friday December 13, 2019 @09:14AM (#21781671)
> pipenv allows you to create, manage virtual environments(using venv) apart from managing requirements file(Pipfile) and an npm like locking mechanism, dependency graphs, dev dependencies and more.

Why on earth would anyone need all this to manage packages for their projects?

Are there any other programming languages whose package-management comes close to this level of intricacy and complexity?

“This project needs package X”

I mean how hard can that be to get right in a self-contained environment?

This whole story is just madness coupled deep denial and Stockholm-syndrome.

Re:If this project is dead, just tell us by myalphabet on Friday December 13, 2019 @10:13AM (#21782234)
> Are there any other programming languages whose package-management comes close to this level of intricacy and complexity?

I think many do. Ruby, Node, Erlang/Elixir, Java, Go, Rust, dotnet, C... I’m having trouble thinking of a modern language that doesn’t have such package management mechanisms.

For many people doing anything more than writing one-off scripts, and especially for anyone who collaborates with others or shares their code, package management is so much more than just “this project needs package X”.

Re:If this project is dead, just tell us by josteink on Friday December 13, 2019 @10:48AM (#21782551)
But all your examples are simple and reliable tools with a minimum of intricacy.

My criticism isn’t about having a package-management story.

It’s about having a terrible and complex one.

Re:If this project is dead, just tell us by myalphabet on Friday December 13, 2019 @10:50AM (#21782579)
Your original comment was responding to “create, manage virtual environments(using venv) apart from managing requirements file(Pipfile) and an npm like locking mechanism, dependency graphs, dev dependencies and more.” and saying that this is overly complicated. Yet every single one of the listed languages has package management tools that do all of these things.

If you think any of the listed examples have “simple” package management tools, I question how deeply you have used any of them. NPM has ~60 commands and hundreds of subcommands each with multiple option flags, and probably hundreds more config options. Gem/Bundle is similar, etc.

If anything, Python is trying to catch up in how complex it’s package managers can be.

Re:If this project is dead, just tell us by josteink on Saturday December 14, 2019 @05:47AM (#21788826)
Python only has venvs because it needs venvs.

For most other language-provided package-managers the software project you’re working on is the env, so you don’t need to construct or manage a venv at all.

So my point still stands.

Re:If this project is dead, just tell us by vageli on Friday December 13, 2019 @09:54AM (#21782075)
> > pipenv allows you to create, manage virtual environments(using venv) apart from managing requirements file(Pipfile) and an npm like locking mechanism, dependency graphs, dev dependencies and more.

> Why on earth would anyone need all this to manage packages for their projects?

> Are there any other programming languages whose package-management comes close to this level of intricacy and complexity?

> “This project needs package X”

> I mean how hard can that be to get right in a self-contained environment?

Packages often have subdependencies and their requirements at times may conflict. If you are very specific in the versions you want, it is more likely to cause issues in dependency resolution.

I would hardly call a dev's machine a "self-contained environment". Most developers I know work in a number of repos with varying requirements, and polluting their system libraries and packages with each project's requirements quickly pollutes the system and can lead to issues.

Re:If this project is dead, just tell us by josteink on Friday December 13, 2019 @12:19PM (#21783440)
> I would hardly call a dev's machine a "self-contained environment"

But a software project is.

Only that software project needs those packages.

Re:If this project is dead, just tell us by ryukafalz on Friday December 13, 2019 @09:53AM (#21782059)
>“This project needs package X”

>I mean how hard can that be to get right in a self-contained environment?

Okay, I’ll bite.

What version of package X does it need?

Is there a specific version that’s been tested with this project and is known working?

Are there specific versions of its dependencies that have been tested and are known working?

Is it needed at runtime or only at build-time?

What repository can it be found in? PyPI is not the only Python repository; private repos are common.

And as a bonus cherry on top: how easy is it to make sure you have all the project’s dependencies installed in the venv for that project, and that you don’t have packages you’re not keeping track of? This is a UX thing, but developers are human and it matters.