forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed as not planned
Labels
area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugmetaIssue that is tracking an overall projectIssue that is tracking an overall projectneeds PRReady to be worked onReady to be worked on
Description
Use conda info
- Does
conda info
work on a vanilla install of Conda Spike - Can we useconda list
andconda info
all the info we need to work with conda #6882
Use conda activate
- inheritEnv: Add prompt to flip "inheritEnv" setting to false to fix conda activation issue #7607
- Activate Environments using Paths (not env names) Activate conda environments using the path instead of the conda env name #3834
- Using env paths always works (suggestion from Conda team)
- Decide if we're going to support conda versions older than 4.6 (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 tosource
) Spike - Use only conda activate, stop calling source #8864 - Depending on the above item, fix activation failures with Fish Shell Python: Create Terminal error command noise included when default shell is fish #4959
Use conda run
- changes in
PythonExecutionFactory
andPythonExecutionService
fix the following (Update PythonExecutionService to support "conda run". #7696):- formatting
- linting
- testing (partial)
- installers (partial)
- debugger (partial)
- interpreter discovery (partial)
- import sorting (partial)
- jedi
- refactoring
- (datascience?)
- currently do
exec()
(Stop using "exec()" in the extension. #7697):- testing (partial)
-
installers (partial): In one case we usesudo
and inpoetry
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. - import sorting (partial)
- code execution / terminal
- (datascience?)
- ensure that (at this point) the extension only uses
PythonExecutionFactory
for running python - Use conda run when debugging user code Use 'conda run' when debugging user code #8422
- verify it fixes Jupyter doesn't work with anaconda #5539, Environment gets activated after debugger starts (hence debugging with conda envs fail) #5559, debug test is hanging #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; Debugging fails when using a pipenv environment that gets activated with
pipenv 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.
- Use some
conda
command to get the list of environments - Only use
conda activate
to activate environments (i.e. don't usesource
) -
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
Metadata
Metadata
Assignees
Labels
area-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugmetaIssue that is tracking an overall projectIssue that is tracking an overall projectneeds PRReady to be worked onReady to be worked on