-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Disable user site-packages during de[activation] #12438
Conversation
@jjhelmus Would you mind opening an issue please? We're trying to get away from PRs without prior record-keeping of what is being solved. |
The failing test is a result of
This occurs in all the Linux conda-forge jobs. Essentially these jobs are testing if the tests in this repo pass with the latest This test behavior should be fixed so that the development version of conda is tested with conda-forge packages but is outside the scope of this PR. |
faa594d
to
6ed0ee4
Compare
BTW curious that chardet is older in main :-/ |
@jezdez, are we still trying to get this in for the upcoming release? The tests look like they are passing (there's just a single random error). |
Yeah, I think so, even though I'm not excited that this doesn't fix the Windows activation :-/ |
Disable the user site-packages directory when retriving the shell code for activation, deactivation and reactivation from CONDA_EXE. The output from these calls are evaluated by the shell and any extraneous output introduced by the user site-packages directory, such as by usercustomize.py or .pth files, will be evaluated. An alternative would be to use Python in isolated mode (-I) to run the CONDA_EXE script. This would also ignore the PYTHON* environment variables and unsafe paths.
6ed0ee4
to
123c00f
Compare
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the test as written passes on Windows without these changes so thats a false positive that should be removed
Hi there, thank you for your contribution! This pull request has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs. If you would like this pull request to remain open please:
NOTE: If this pull request was closed prematurely, please leave a comment. Thanks! |
Description
Disable the user site-packages directory when retrieving the shell code for activation, deactivation and reactivation from CONDA_EXE. The output from these calls are evaluated by the shell and any extraneous output introduced by the user site-packages directory, such as by usercustomize.py or .pth files, will be evaluated.
An alternative would be to use Python in isolated mode (
-I
) to run the CONDA_EXE script. This would also ignore the PYTHON* environment variables and unsafe paths.Note that this only adds this to Unix style shells. Windows specific shells (cmd, powershell) may still access the user site-packages directory during activation.
Checklist - did you ...
news
directory (using the template) for the next release's release notes?closes #12444