[issue30628] why venv install old pip?

2017-06-14 Thread Nick Coghlan
Nick Coghlan added the comment: Curtis: by design, ``ensurepip`` isn't permitted to assume internet access (since we want both it and venv to work without warnings or errors on systems with no internet access). This was covered in the original PEP:

[issue30628] why venv install old pip?

2017-06-14 Thread Curtis Doty
Curtis Doty added the comment: diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py index 716129d139..757e8de4e7 100644 --- a/Lib/venv/__init__.py +++ b/Lib/venv/__init__.py @@ -243,6 +243,9 @@ class EnvBuilder: cmd = [context.env_exe, '-Im', 'ensurepip', '--upgrade',

[issue30628] why venv install old pip?

2017-06-14 Thread Emily Morehouse
Emily Morehouse added the comment: A quick note on how to include system packages in the "How Do I..?" section could be helpful, though does not necessarily solve the current issue. I would be hesitant to instruct people to use the system-site-packages flag simply to have an updated version

[issue30628] why venv install old pip?

2017-06-13 Thread Nick Coghlan
Nick Coghlan added the comment: Emily's answer sort of covered the "It's not as simple as it might seem" aspect, whereby the bit that's genuinely tricky is to provide access to the system pip(/setuptools/wheel) without providing accessing to the system site packages in general. If the latter

[issue30628] why venv install old pip?

2017-06-13 Thread R. David Murray
R. David Murray added the comment: OK, so the key here is venv's dependency on a pip wheel. That makes sense, but is certainly counterintuitive. One would naively think that having a copy of PIP installed would make it easy to link that into the venv, but obviously it is a lot more complex

[issue30628] why venv install old pip?

2017-06-13 Thread Nick Coghlan
Nick Coghlan added the comment: The upstream supported install path for bootstrapping the venv is from a wheel file. The CPython source tree contains the necessary wheels, and, by default, upgrading the system pip doesn't touch them. The only distro I can speak authoritatively for when it

[issue30628] why venv install old pip?

2017-06-13 Thread R. David Murray
R. David Murray added the comment: It's not obvious from your discussion, Nick, *why* venv won't use an upgraded system pip if it has been manually upgraded. There's no need for internet access in that case (which is the argument for using the bundled pip when running ensurepip for the first

[issue30628] why venv install old pip?

2017-06-13 Thread Nick Coghlan
Nick Coghlan added the comment: Indeed, Emily is correct: this is expected behaviour for system Python versions that don't patch their ensurepip modules, as the default pip (et al) used in virtual environments created with the venv module generally only gets upgraded when upgrading to a new

[issue30628] why venv install old pip?

2017-06-12 Thread Emily Morehouse
Emily Morehouse added the comment: You're certainly right. venv uses ensurepip to install pip when creating a virtual environment and does not access the internet/upgrade any packages. ensurepip was specifically designed to use the bundled version of setuptools. The bundled version of

[issue30628] why venv install old pip?

2017-06-12 Thread Emily Morehouse
Changes by Emily Morehouse : -- nosy: +emilyemorehouse ___ Python tracker ___ ___

[issue30628] why venv install old pip?

2017-06-10 Thread Curtis Doty
Curtis Doty added the comment: $ pip3.6 list pip (9.0.1) setuptools (32.2.0) wheel (0.29.0) $ pip3.6 install --upgrade pip setuptools wheel $ pip3.6 list pip (9.0.1) setuptools (36.0.1) wheel (0.29.0) $ python3 -m venv foo $ source foo/bin/activate (foo) $ pip list pip (9.0.1) setuptools

[issue30628] why venv install old pip?

2017-06-10 Thread Curtis Doty
New submission from Curtis Doty: I've already updated system setuptools 36.0.1 with `pip3 install --upgrade pip setuptools wheel` but when I create a new enviro with `python3 -m venv foo` it will have an old/outdated setuptools 28.8.0 from embedded ensurepip. Why? I think it should install