You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prior to this patch, Pip wheels were stored in the Git repository of
CPython. Git is optimized for text but these artifacts are binary. So
the unpleasant side effect of doing this is that the bare Git
repository size is being increased by the zip archive side every time
it is added, removed or modified. It's time to put a stop to this.
The patch implements an `ensurepip.bundle` module that is meant to be
called through `runpy` to download the Pip wheel and place it into the
same location as before. It removes the wheel file from the Git
repository and prevents re-adding it by defining a new `.gitignore`
configuration file.
The idea is that the builders of CPython are supposed to invoke the
following command during the build time:
```console
$ python -m ensurepip.bundle
```
This command will verify the existing wheel's SHA-256 hash and, if it
does not match, or doesn't exist, it will proceed to download the
artifact from PyPI. It will confirm its SHA-256 hash before placing it
into the `Lib/ensurepip/_bundled/` directory.
Every single line added or modified as a part of this change is also
covered with tests. Every new module has 100% coverage. The only
uncovered lines under `Lib/ensurepip/` are the ones that are
absolutely unrelated to this effort.
Resolvespython#80789.
Ref: https://bugs.python.org/issue36608.
0 commit comments