### Use `conda info` - [ ] Does `conda info` work on a vanilla install of Conda #6882 ### Use `conda activate` - [x] inheritEnv: https://github.com/microsoft/vscode-python/issues/7607 - [x] Activate Environments using Paths (not env names) #3834 - Using env paths always works (suggestion from Conda team) - [x] Decide if we're going to support conda versions older than [4.6](https://github.com/conda/conda/releases/tag/4.6.0) (i.e. stop calling source); **only support conda 4.6 and newer** - [ ] Only use `conda activate` to activate conda environments (i.e. no more calls to `source`) https://github.com/microsoft/vscode-python/issues/8864 - [ ] Depending on the above item, fix activation failures with Fish Shell #4959 ### Use `conda run` - [ ] changes in `PythonExecutionFactory` and `PythonExecutionService` fix the following (#7696): - formatting - linting - testing (partial) - installers (partial) - debugger (partial) - interpreter discovery (partial) - import sorting (partial) - jedi - refactoring - (datascience?) - currently do `exec()` (#7697): - [x] testing (partial) - [ ] ~~installers (partial)~~: In one case we use `sudo` and in `poetry` case we use path to binary directly. So this could not be addressed directly. - [ ] ~~debugger (partial)~~: python debug adapter uses adapter descriptor. So no changes were made - [ ] ~~interpreter discovery (partial)~~: Discussed with Don and should not be switched to python execution factory. - [x] import sorting (partial) - [x] code execution / terminal - [ ] (datascience?) - [ ] ensure that (at this point) the extension only uses `PythonExecutionFactory` for running python - [ ] Use conda run when debugging user code https://github.com/microsoft/vscode-python/issues/8422 - [ ] verify it fixes https://github.com/microsoft/vscode-python/issues/5539, https://github.com/microsoft/vscode-python/issues/5559, https://github.com/microsoft/vscode-python/issues/3869 - [ ] make sure we're not explicitly doing activation for conda or any virtual environment executions (i.e. only activate as a side effect of creating a new terminal; #4203 ) ### Verifying conda work is done Basically we are no longer doing any shenanigans behind conda's back to support it and we are using the provided tooling as expected. - [ ] Use _some_ `conda` command to get the list of environments - [ ] Only use `conda activate` to activate environments (i.e. don't use `source`) - [ ] `conda run` - [ ] For executing tools (e.g. formatters, linters, and test runners) - [ ] For executing user files (e.g. the green play button) - [ ] For running the debugger
Use
conda infoconda infowork on a vanilla install of Conda Spike - Can we useconda listandconda infoall the info we need to work with conda #6882Use
conda activateconda activateto activate conda environments (i.e. no more calls tosource) Spike - Use only conda activate, stop calling source #8864Use
conda runPythonExecutionFactoryandPythonExecutionServicefix the following (Update PythonExecutionService to support "conda run". #7696):exec()(Stop using "exec()" in the extension. #7697):installers (partial): In one case we usesudoand inpoetrycase we use path to binary directly. So this could not be addressed directly.debugger (partial): python debug adapter uses adapter descriptor. So no changes were madeinterpreter discovery (partial): Discussed with Don and should not be switched to python execution factory.PythonExecutionFactoryfor running pythonpipenv shell#4203 )Verifying conda work is done
Basically we are no longer doing any shenanigans behind conda's back to support it and we are using the provided tooling as expected.
condacommand to get the list of environmentsconda activateto activate environments (i.e. don't usesource)conda run