Nick Coghlan <ncogh...@gmail.com> added the comment:

(Added packaging, Linux distro, and Windows and macOS installer folks to the cc 
list)

Chris and I were discussing this behaviour, and it turns out even I had 
forgotten how we had specified this feature in PEP 453: `ensurepip --upgrade` 
ensures that an older pip is brought up to date with the bundled version, but 
it does *not* check PyPI for the latest version the way that `python3 -m pip 
install --upgrade pip` does.

We both expected the ensurepip option to behave the same way as the pip option, 
since they share a name.

If I had the time machine keys, I'd use a more verbose name for the ensurepip 
flag (e.g. `--upgrade-to-match-bundle`) to help make it clearer that it does 
something different from the corresponding pip flag.

As it is though, for Python 3.9, I think we should change the behaviour of 
`--upgrade` to imply `python -m pip install --upgrade pip`, and then add a 
separate `--network-upgrade`/`--no-network-upgrade` option that allows folks to 
opt out of the PyPI part of the version check.

The make file would presumably be updated to pass the `--no-network-upgrade` 
flag, and I guess the macOS and Windows installers would as well (I'm not sure 
what the platform policies are around installers making random additional 
requests to external network services)

----------
nosy: +barry, doko, dstufft, ncoghlan, ned.deily, paul.moore, petr.viktorin, 
steve.dower
stage:  -> needs patch
type:  -> enhancement
versions: +Python 3.9 -Python 3.7

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

Reply via email to