News for hackers. Stuff that matters.
Re:If this project is dead, just tell us by akvadrako on Friday December 13, 2019 @09:32AM (#21781866)
It’s easy to also get the versions of all sub dependencies and put them in requirements.txt
Re:If this project is dead, just tell us by ajanuary on Friday December 13, 2019 @09:55AM (#21782085)
That makes updating your direct dependencies harder. If you upgrade to using newer version of something, and that things dependencies have changed, you have to manually figure out which dependencies in requirements.txt were for it, and update or remove those etc.
Re:If this project is dead, just tell us by vageli on Friday December 13, 2019 @09:58AM (#21782107)
> It’s easy to also get the versions of all sub dependencies and put them in requirements.txt

Is it easy to automatically do this when you want a new package version, without having to remember to do it? Is it easier to put together this process and train other developers in it and be diligent in its use? Is all of that easier than installing an application that has a similar interface to other tools, that does all that for you, and has a community of people to help with issues?

Re:If this project is dead, just tell us by Scarblac on Friday December 13, 2019 @09:51AM (#21782049)
But then you're suddenly responsible for keeping track of your subdependencies and updating the versions of each that you want. That should be up to the dependencies.

Also if you manage to drop a dependency, you don't have an easy way to remove the things from requirements.txt that are only there because they're a subdependency.

Putting it all in one requirements.txt is just too simplistic.

Re:If this project is dead, just tell us by guggle on Friday December 13, 2019 @10:03AM (#21782158)
If I had such need, I guess I could have two versions of the requirements.txt:

- One with direct dependencies (versions pinned) - One with direct dependencies + subdependencies (pip freeze output)

Am I being too naive ? (obviously yes if such tool as pipenv exists, but I'm trying to figure why people need *.lock files).

Re:If this project is dead, just tell us by Scarblac on Friday December 13, 2019 @10:54AM (#21782638)
This is close to what pipenv does.

It also adds dependency management. If one subdependency is library_a > 1.0, and another is library_b < 2.0 while also e.g. 2.1 exists, then it will try to find a version between 1.0 and 2.0. Pip doesn't do that.

So in my mind, that's what pipenv is -- pip, virtualenv, those two files, plus dependency management.

Re:If this project is dead, just tell us by icebraining on Friday December 13, 2019 @10:57AM (#21782659)
> One with direct dependencies + subdependencies (pip freeze output)

That's a lock file...

Re:If this project is dead, just tell us by guggle on Friday December 13, 2019 @01:28PM (#21784038)
Ok ! That's what I'd do then.
Re:If this project is dead, just tell us by oblio on Friday December 13, 2019 @10:51AM (#21782602)
Are you only working on small projects? For reference, if your project is under 100k lines of code, it's small.
Re:If this project is dead, just tell us by guggle on Friday December 13, 2019 @01:30PM (#21784058)
By your arbitrary metric, I work on both small and big projects. Not sure how the loc metric relates to the matter though.