3 ms·
Here's my controversial idea on one of the aspects mentioned in OP. Here's my approach to dealing with dependencies in Python: * When setting up the project,
by crabbone 2y ago
Here's my controversial idea on one of the aspects mentioned in OP. Here's my approach to dealing with dependencies in Python:
* When setting up the project, in the initial stage, install dependencies with pip or conda, whichever was used for the project.
* Examine what was installed and figure out why it was needed.
* Remove dependencies that are only touched by code paths that aren't executed by the project I'm working on.
* Write a script that downloads the thinned out list of dependencies, skipping pip or conda. Unpacks and installs it w/o the help of either. Then, possibly post-process the installation (a bunch of Python packages come with a lot of junk, like unit tests, scripts to call library functions etc.)
* Finally, use this script, and on a side install the same combination of packages with pip or conda once every so many months (maybe about half a year) to see if there are any changes. If there are worthwhile changes: incorporate them back into my script.
On the face of it, this is more work than writing some configuration file that pip or conda will understand. On the other hand, for so many times I was burned by Python's dependency problems, this approach proved to work better for me in terms of how many times CI was broken, and the time I had to spend investigating CI errors went noticeably down.
So, to restate it: I see package management software, at least in Python world, as one of, if not the most important contributors to the failure of ensuring project's longevity. This software prioritizes the ability to fetch and to adjust for the new stuff to the ability to support the old stuff. This software prioritizes information and wishes of the third-party developers over the wishes of the user installing the software. I don't think it does this out of malice. It's probably natural for most people to want new things than to try to preserve the old.