[3.10] bpo-46197: Add isolated flag if currently isolated#30307
Closed
kcdodd wants to merge 5 commits intopython:3.10from
Closed
[3.10] bpo-46197: Add isolated flag if currently isolated#30307kcdodd wants to merge 5 commits intopython:3.10from
kcdodd wants to merge 5 commits intopython:3.10from
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
merwok
reviewed
Jan 2, 2022
Co-authored-by: Éric <merwok@netwok.org>
|
This PR is stale because it has been open for 30 days with no activity. |
merwok
reviewed
Feb 3, 2022
Co-authored-by: Éric <merwok@netwok.org>
|
The following commit authors need to sign the Contributor License Agreement: |
Member
|
@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. |
Member
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://bugs.python.org/issue46197
Potential resolution of the issue introduced around Python 3.8.7 where
ensurepipmodule would run the bootstrapped pip in a subprocess and no longer obeyed theisolatedflag set when run by thevenvmodule. 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
isolatedflag of the current process, and, if it set, also add it to the sub-process. If the current process was not run asisolatedthe 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_venvtest 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