On Thu, May 11, 2023, 12:14 PM Paolo Bonzini <pbonz...@redhat.com> wrote:
> > > Il gio 11 mag 2023, 17:58 John Snow <js...@redhat.com> ha scritto: > >> I'll make that simplifying change, which will also allow me to just put >>> the import in the global scope instead of trying to do it JIT to work >>> around ensurepip shenanigans. Should be a few less "I know this is bad" >>> comments for the linters, too. >> >> > I don't think you can do that because, until you are running in the new > venv, you aren't guaranteed to have either distlib or pip. Once in the venv > you'll get the latter via ensurepip, if it wasn't already present in the > system site-packages. > > Paolo > Yeah, not without a *little* trickery. It still needs a try/except but it can be moved up. Or I could leave well enough alone and worry about cleaning up imports when we move to 3.8