Skip to content

Commit 23882ae

Browse files
authored
Explicitly disable pip version checks when bootstrapping pip (#470)
These are currently implicitly disabled due to a pip implementation detail, where it doesn't check for updates unless it finds that it is installed in the current environment. However, it's clearer if we disable them explicitly (and it also saves pip from having to query the list of currently installed packages). See: https://pip.pypa.io/en/stable/cli/pip/#cmdoption-disable-pip-version-check GUS-W-20289843.
1 parent 456b5e5 commit 23882ae

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- Deprecated support for Python 3.10. ([#467](https://github.com/heroku/buildpacks-python/pull/467))
1313
- Updated uv from 0.9.9 to 0.9.11. ([#468](https://github.com/heroku/buildpacks-python/pull/468))
14+
- Explicitly disabled pip version checks when bootstrapping pip. ([#470](https://github.com/heroku/buildpacks-python/pull/470))
1415
- Unpinned Poetry's `dulwich` version, since the upstream incompatibility with older Python has been fixed. ([#464](https://github.com/heroku/buildpacks-python/pull/464))
1516

1617
## [2.7.4] - 2025-11-14

src/layers/pip.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ pub(crate) fn install_pip(
9494
.args([
9595
&bundled_pip_module_path.to_string_lossy(),
9696
"install",
97+
// We have to use CLI args to disable pip's version check here, since `--isolated` mode
98+
// means the `PIP_DISABLE_PIP_VERSION_CHECK` env var set previously will be ignored.
99+
"--disable-pip-version-check",
97100
// Don't load any user-supplied pip configuration (pip.conf and `PIP_` env vars) given
98101
// that this is an internal step for installing pip (rather than app dependencies), and
99102
// so (a) doesn't need custom config, (b) we don't want the user to be able to break it.

src/layers/poetry.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ pub(crate) fn install_poetry(
9090
.args([
9191
&bundled_pip_module_path.to_string_lossy(),
9292
"install",
93-
// Setting this via CLI args since for Poetry we aren't setting `PIP_DISABLE_PIP_VERSION_CHECK`.
9493
"--disable-pip-version-check",
9594
// Don't load any user-supplied pip configuration (pip.conf and `PIP_` env vars) given
9695
// that this is an internal step for installing Poetry (rather than app dependencies), and

0 commit comments

Comments
 (0)