4 ms·
Is there really such a thing as an abstract dependency? There is such a thing as a tested system (ie two or more Independantly built packages that have been de
by lifeisstillgood 13y ago
Is there really such a thing as an abstract dependency?
There is such a thing as a tested system (ie two or more Independantly built packages that have been demonstrated to work together). This is the concrete - I have built these things and tested them - now take them both as they are and put them live. I now dislikes the idea that I will build packages (with pip literally from source) on production machines.
No I don't quite get this - dependencies are just that - we depend on the code they provide to run. A library author cares as much as a sysadmin that they avoid a version of dependency that breaks the package.
A better spec might be
Requests=1.1,1.2,1.4 #oops 1.3 broke our tests
And yes, requirements.txt and setup.py conflict. We don't have a clean packaging system in Python and we should accept it and fix it.
None of this Precludes the useful ability to specify which location to retrieve which package from, but these are build instructions, not deployment instructions.
- donaldstufft 13y agoI call them abstract for lack of a better word. Referenced by name? It's not about providing versions of code that does or doesn't pass tests. It's about where that code is fetched from. If you reference the dependency by name then you can easily switch it out for something that looks like the code the author originally developed against, but actually has some changes (patches, bugfix, whatever). Where to retrieve packages from is both a build and a deployment instruction. After all you need to fetch the built packages from soemwhere yes? In general "reference by name and version/abstract" allows you to easily swap in a built package for a source package as well. Otherwise you'd be stuck with whatever formats the author published because the dependencies would be pointing to a specific url (likely outside your control). The very fact you can build a binary package and host it yourself works because of what I call abstract dependencies (for lack of a better name). If they wern't abstract then you'd have to fork the dependent package in order to point it at your built package/repository instead.