-
-
Notifications
You must be signed in to change notification settings - Fork 32k
[3.10] bpo-46197: Add isolated flag if currently isolated #30307
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
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: Éric <[email protected]>
This PR is stale because it has been open for 30 days with no activity. |
Co-authored-by: Éric <[email protected]>
The following commit authors need to sign the Contributor License Agreement: |
@kcdodd As stated in the issue, this should be rebased onto main and once accepted and merged there it can be backported. Probably a new PR is easiest. |
I recommend just clicking the CLA button. This is a side effect from the bpo->github migration. You'll only have to do it this once. |
https://bugs.python.org/issue46197
Potential resolution of the issue introduced around Python 3.8.7 where
ensurepip
module would run the bootstrapped pip in a subprocess and no longer obeyed theisolated
flag set when run by thevenv
module. This could cause pip to not install itself in the virtual environment if it found an installation in another path.Approach taken is simple, to access the
isolated
flag of the current process, and, if it set, also add it to the sub-process. If the current process was not run asisolated
the sub-process will not, restoring this particular case seen in Python <= 3.8.6.This behavior was manually verified to work in the case that PYTHONPATH contains another installation of pip.
The test was attempted, but the
test_venv
test appears to fail for another un-related issue persisting from the last commit of the forked branch3.10
(without the requested change). For clarity that the test does not indicate a problem with this request inspected traces of the failure is included below:https://bugs.python.org/issue46197