Skip to content

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

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

Merged
merged 1 commit into from
May 22, 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>
@miss-islington miss-islington requested a review from a team as a code owner May 22, 2024 18:00
@zooba zooba enabled auto-merge (squash) May 22, 2024 18:00
@zooba zooba merged commit 3e30a38 into python:3.13 May 22, 2024
38 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.

3 participants