James Lu writes: > Ideally, we'd have a functional package manager: one that can > delete binaries when disk space is running low, and recompiles from > sources when the binary is needed again.
First, that's not what package managers do. Package managers manage dependencies, not disk space. Second, my "where I get almost all my work done" Python 3.7 installation is only 571MB; I need about 20GB free to update XCode, so disk space is not high on my reasons for screwing with a Python installation. Much more practical to search for old .isos and .dmgs to delete. If I really thought a few hundred MB would help, I'd just delete the whole thing and hope nothing depended on it until I could resolve the issue requiring more space than I have. If you really want to save disk space measured in MB, I guess you'd probably want LRU semantics, and possibly a blacklist of modules that are only used interactively and at most once a day or so, so the time to import doesn't really matter. It would be easy enough to write a script to do the cleaning (the stat module can get you the access times), and Python will take care of the recompilation since it only ever executes compiled code. Although speaking practically, you might want to compile with -O and delete all the sources if space is such a problem. Teach help() to call out to doc.python.org or/and pip the sources. > It could store Python 2 as a series of diffs against Python 3. Even if you used a binary diff such as xdelta or bsdiff, I doubt this would save space. Feel free to try it and tell me I'm wrong, though. Steve _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/6SRPMEWVNAK7DQE7BDTDL7KFKN6CLWMS/ Code of Conduct: http://python.org/psf/codeofconduct/