Skip to content

Use pip install --isolated when bootstrapping pip/Poetry#434

Merged
edmorley merged 1 commit intomainfrom
pip-isolated-mode
Oct 2, 2025
Merged

Use pip install --isolated when bootstrapping pip/Poetry#434
edmorley merged 1 commit intomainfrom
pip-isolated-mode

Conversation

@edmorley
Copy link
Copy Markdown
Member

@edmorley edmorley commented Oct 2, 2025

So that any invalid global pip config (set via either PIP_* env vars or global pip.conf config files in the HOME directory) don't affect/break the bootstrapping of the package managers.

(Such config is still loaded during the later pip install used to install the app's own dependencies; this change only affects the internal buildpack bootstrapping stage.)

We don't have to update the uv installation step, since that doesn't use pip, since uv is a Rust binary installed from GitHub Releases.

This is the CNB equivalent of:
heroku/heroku-buildpack-python#1915

See:

GUS-W-19770487.

So that any invalid global pip config (set via either `PIP_*` env vars
or global pip config files in the HOME directory) don't affect/break the
bootstrapping of the package managers.

(Such config is still loaded during the later `pip install` used to
install the app's own dependencies; this change only affects the
internal buildpack bootstrapping stage.)

We don't have to update the uv installation step, since that doesn't
use pip, since uv is a Rust binary installed from GitHub Releases.

This is the CNB equivalent of:
heroku/heroku-buildpack-python#1915

See:
- https://pip.pypa.io/en/stable/cli/pip/#cmdoption-isolated
- https://pip.pypa.io/en/stable/topics/configuration/

GUS-W-19770487.
@edmorley edmorley self-assigned this Oct 2, 2025
@edmorley edmorley marked this pull request as ready for review October 2, 2025 14:39
@edmorley edmorley requested a review from a team as a code owner October 2, 2025 14:39
@edmorley edmorley enabled auto-merge (squash) October 2, 2025 14:41
@edmorley edmorley added the enhancement New feature or request label Oct 2, 2025
@edmorley edmorley merged commit a570b59 into main Oct 2, 2025
7 checks passed
@edmorley edmorley deleted the pip-isolated-mode branch October 2, 2025 15:00
heroku-linguist bot added a commit that referenced this pull request Oct 5, 2025
## heroku/python

### Changed

- Changed the `pip install` commands used to install the pip and Poetry package managers to now use `--isolated` mode. ([#434](#434))
- Added more Python project related file and directory names to the list recognised by buildpack detection. ([#435](#435))
- Updated uv from 0.8.20 to 0.8.23. ([#431](#431) and [#436](#436))
@heroku-linguist heroku-linguist bot mentioned this pull request Oct 5, 2025
heroku-linguist bot added a commit to heroku/cnb-builder-images that referenced this pull request Oct 5, 2025
## heroku/python

### Changed

- Changed the `pip install` commands used to install the pip and Poetry package managers to now use `--isolated` mode. ([#434](heroku/buildpacks-python#434))
- Added more Python project related file and directory names to the list recognised by buildpack detection. ([#435](heroku/buildpacks-python#435))
- Updated uv from 0.8.20 to 0.8.23. ([#431](heroku/buildpacks-python#431) and [#436](heroku/buildpacks-python#436))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants