New submission from kcdodd <carter.d...@gmail.com>:

A change in behavior was made to the `ensurepip` module in Python 3.8.7 that 
causes bootstrapping to break out of an isolated environment. This is relevant 
to the assumption made in the `venv` module, which ran ensurepip as a 
sub-process with the `-I` flag environment isolation to force installation in 
the virtual environment directory.

In Python <= 3.8.6, ensurepip ran the bootstrap within the current interpreter, 
so the environment remained isolated. But in Python >= 3.8.7 it creates a 
second subprocess without the `-I` flag, and the un-isolated environment 
appears to be restored for pip. This would then allow a search of any 
additional paths, and prevent installation of pip and setuptools from being 
installed in the venv environment directory if they are found somewhere else.

----------
messages: 409334
nosy: kcdodd
priority: normal
severity: normal
status: open
title: ensurepip bootstrap breaks out of isolated environment
type: behavior
versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46197>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to