by witten · 10y ago · 0 comments
From the original prototype's comments: https://gist.github.com/dstufft/2904d2e663461f010bbf
"- If there's a corner case not thought of, file is still Python and allows people to easily extend"
... and ...
"- Using Python file might cause the same problems as setup.py"
Ugh.
Also, how is the "lock file" actually distributed? Unless you can pip install a wheel and have it include an embedded lock file, then you've still got to have some out-of-band mechanism for copying the lock file around like you would a requirements.txt or even a fully-fledged virtual environment.
Don't be so scared. Ruby developers have been doing this for over 7 years now. Trust us, this is much better. Your Python friends at Pypa are copying Ruby because dependencies are less painful there than just about anywhere. They are still painful, but this will help.
Having a more complex requirements system that what we have with requirements.txt is good, but at what cost? Is Python doing this just because other languages to it this way? I think it is actually
Also, I'm not sure how a lock file in source control will help me when someone who is not checking out source wants to pip install my project using said lock file.
There seem to be a lot of strange fears from python developers about this approach and my comment on age was an attempt to assuage those fears. Since ruby developers are quite happy with bundler (at least in comparison to other communities) and have been for some time it's a reasonable point and not the only one I made.
I'm not sure how pip plans to use the lock file for projects distributed via pip. They may very well have a solution planned for that.
However, for projects that are distributed by source (which are many) the lock file ensures deterministic builds, and requirements.txt generally doesn't without being pedantic with your versions.
There you go again.
This isn't fear. It's asking the question of: What. Is. The Damn. Point. Of. This?
I have yet to see a simple, cogent explanation of why this is better than a list of requirements specifying;
pyside==x.y.z
pillow==x.y.z
As opposed to this proposed Thing.
You know what this reminds of?
It reminds me of replacing super simple .INI text files with configuration files stored as XML - change for the sake of it, because Change!
Now, I'd love to see a very simple explanation and justification on why we should all move to this new Thing you're making.
Something like "This new Thing is better because..." , followed by practical /examples/ , because right now, all I see is More Complicated Stuff For The Sake Of It.
SomeProject==5.4; python_version < '2.7'
SomeProject; sys.platform == 'win32'
In my view, that's already out of hand, and isn't even really parsable without some bespoke library.I'm a big fan of this idea of having a requirements.lock. I can call pip to do the parsing, then I can parse the lock which is just json.
The fact that you need to parse the requirements.txt feels like a design issue with pip to me. (Of course, I'm coming from Rubyland.) As for setup.py, setup.py is broken because it conflates build scripting with package metadata and dependencies. Now that tox exists things are better (but the fact that tox is not a general-purpose programming language is IMO unfortunate coming from Rake/Ruby/Bundler/Gemfiles.)
Was that really necessary? You just moved the tone of your reply to a less pleasant manner.
The poster isn't scared. They, like me, are failing to see the necessity of this compared to the more simple, straightforward, already-working, KISS-principle-following requirements.txt, which was my immediate reaction to reading the description of this project on the github link.
Maybe my tone came across condescending. That wasn't the intent. It was meant in jest in hopes the reader would second guess the fear.
KISS is great, but this project is here because it's not already working for everyone. There is benefit to a flexible dependency system that keeps the concepts of "acceptable versions" separate from "actual versions last used" while also adopting an extendible DSL ready for edge cases that haven't been thought of.
And you don't need both. You can pip freeze a frozen_requirements.txt. You can ship around a whole virtual environment. And I can conceive of more requirements.txt 2.0 solutions that don't require over-wrought DSLs.
I think the condescending tone is quite unnecessary ("Trust us, this is much better. Your Python friends at Pypa")..
In my experience Ruby is a a far worse culprit than Python for breaking things. First of all `rvm` and `rbenv` are both bloated and rather unreasonable invasions of the shell (hi-jacking `cd` seriously?) Secondly, the fact that Ruby modules are globally shared -- can cause endless breakage from a few misbehaving packages, especially with ones that like to monkey-patch std-lib classes (refinements should improve the the later but it will take a while for the ecosystem to catch-up).
If this Pipfile.lock approach allows me to always have the correct package versions without virtualenv, it's a huge step forward.