upgrade pip and setuptools versions used by venv

## Project description

Once you find that:

/your/installed/version/bin/python3 -m venv /some/venv

followed by:

/some/venv/bin/pip install some_package

gives a message that there is an update for pip, this package can update the wheel files used by ensurepip (pip, setuptools) to the latest versions available on pypi, and get rid of this message (at least to the next upgrade).

You can do this upgrade by running:

/your/installed/version/bin/python3 -m upgrade_ensurepip

In order to be able to use the above command, you either have to install the package using something like:

/your/installed/version/bin/pip install --disable-pip-version-check upgrade_ensurepip

or alternatively you can to make sure the file upgrade_ensurepip.py from that package is in your current directory.

If started With the option --pip, the pip “living” in the same directory as the Python executable is used to first search for the package to get the latest version number, then pip is used to download the wheel for that version. This is somewhat slower, but as pip should follow any instructions in your ~/.config/pip/pip.conf, including upgrading from local repositories.

After finding and downloading newer versions, using one of the above methods, the /your/installed/version/lib/pythonX.Y/ensurepip/__init__.py file is updated as it hard-codes the versions of the wheels used. Before changing, a backup of the original is made if such a backup does not yet exist.

As old wheels are preserved, only backup file __init__.py.org located under /your/installed/version/lib/pythonX.Y/ensurepip/ needs to be copied back in case you encounter any problems.

## Project details

Uploaded source
Uploaded py2 py3