Message 206867 - Python tracker
Oh, I forgot about os.devnull. ensurepip.bootstrap mutates the environment of the current process (hence the recommendation to use the CLI instead), so yes, doing "os.environ['PIP_CONFIG_FILE'] = os.devnull" before importing pip should do the trick. And then generate a "no-install=true" config with HOME in test_venv to make sure it is properly ignored.