On Wed, Oct 21, 2020 at 5:24 AM Matthias Bussonnier <bussonniermatth...@gmail.com> wrote: > > Hello Python Ideas, > > Would there be any interest in upstreaming a patch allowing virtualenv to be > inherited in core python ? > I'm working with a company that uses such an internal patch and would be ok > with me spending some time trying to upstream it. > > When creating a venv, this let you point to "parents" venvs that will be used > to search for existing packages; thus potentially making the creation of > large venvs with a common base faster, and decreasing disk space usage. > > I am aware that there are solution around like, > https://virtualenvwrapper.readthedocs.io/en/latest/command_ref.html#add2virtualenv, > or modifying PYTHONPATH , but my question is more about whether such a > change has a chance of being accepted in Core Python; and whether there is a > need for a pep,, or simply a request for enhancement on bpo and a > pull-request. >
The main thing a proposal like this needs is a thread on python-ideas, so you're on the right track already :) If I'm understanding you correctly, this means I could do something like: $ python3 -m venv env --see-also ../master-env and then any packages installed in master-env would be visible inside this environment too? Seems pretty useful to me. What's the mechanism by which a venv announces its parent, and does this work correctly if the binary is invoked directly? Currently, if you invoke /.../.../.../env/bin/python3, it will use the lib directory from that venv; with this plan, it would need to add the parent also. ChrisA _______________________________________________ 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/VZYIGHTR5OCY6UJFZI2MOJ4LNCUCIEBU/ Code of Conduct: http://python.org/psf/codeofconduct/