Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.12] gh-117505: Run ensurepip in isolated env in Windows installer (GH-118257) #119422

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 22, 2024

ensurepip forks a subprocess to run pip itself, but that subprocess only inherits a -I isolated mode flag (see _run_pip() in Lib/ensurepip/init.py), not the "-E -s" flags that the installer has been using. This means that parts of ensurepip don't actually run in an isolated environment and can make incorrect decisions based on packages installed in the user site-packages.
(cherry picked from commit c9073eb)

Co-authored-by: Michael Vincent 377567+Vynce@users.noreply.github.com

…ythonGH-118257)

ensurepip forks a subprocess to run pip itself, but that subprocess only inherits a -I isolated mode flag (see _run_pip() in Lib/ensurepip/__init__.py), not the "-E -s" flags that the installer has been using. This means that parts of ensurepip don't actually run in an isolated environment and can make incorrect decisions based on packages installed in the user site-packages.
(cherry picked from commit c9073eb)

Co-authored-by: Michael Vincent <377567+Vynce@users.noreply.github.com>
@zooba
Copy link
Member

zooba commented May 22, 2024

Waiting to see how this change fares in 3.13b2 before we ship it downlevel.

@hugovk
Copy link
Member

hugovk commented Sep 15, 2024

@zooba Triage: ready to merge?

@zooba
Copy link
Member

zooba commented Sep 18, 2024

Yeah, I haven't heard any issues arise.

@zooba zooba merged commit 1494d95 into python:3.12 Sep 18, 2024
30 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants