Where’s the initial email you’re replying to here? I don’t have it in my inbox, 
and it isn’t on the Mailman archive either, and since you snipped it down to a 
single line I have no idea what that snippet was referring to.

Meanwhile:

> On Jan 2, 2020, at 18:14, James Lu <jam...@gmail.com> wrote:
> 
> 
> 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. It could store Python 2 as a series of diffs against Python 
> 3.

I’m not sure why you want to store Python 2 as diffs against Python 3, but that 
is exactly what a version control system does, not what a package manager does; 
it’s easy if you use the right tool. For example:

* Create an empty git repo in ~/python 
* Create a branch called 2.7
* Build Python 2.7 and install it to that directory, and also install any 
site-packages you want
* Commit
* Create a new branch off master called 3.8
* Build Python 3.8 and install it to that directory, and also install any 
site-packages you want
* Commit

Git (and its various plugins for diffing files) takes care of what’s a diff 
against what and so on; you just have to know there are at least two useful 
leaves on the graph of diffs and they can be accessed with the names 2.7 and 
3.8.

Now you have to checkout the appropriate branch every time you want to run 
python or python2, or activate a non-isolated virtual environments built from 
either, etc. Which seems like a huge pain, but it seems like you’re asking for 
that pain.

Would this actually save any space? I don’t know. I think 2.7 and 3.8 have so 
little binary code in common (bad enough for just the executable—things like 
stdlib .pyc files end up with different names in different locations that git 
probably isn’t smart enough to link up in the first place) that you might well 
waste more on repo overhead than you’d gain in deduplicating. (If you wanted 
3.8.0 and 3.8.1 and 3.8.2, on the other hand, that would probably save a lot 
more, but how often do you want an earlier bug fix build of the same minor 
version?)

But it’s simple enough to do that rather than guessing you can just try it.

_______________________________________________
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/PQVDFDVH7NEQZK7YRAXTGBZ6NWDRCNSZ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to