profile
viewpoint

issue openedHuachao/vscode-restclient

Is selected custom environment name available in a variable?

When multiple custom environment are defined, is there a variable that returns the name of the selected environment? I'm finding I could use that variable to substitute in my URLs for testing different environments. I've looked through the doc and issues but haven't found that it's available.

created time in a day

issue commentmicrosoft/vscode-python

Different python.defaultInterpreterPath by workspace not being saved

Excellent summary, thanks. Internal storage is opaque which is fine, just didn't get that until now. Much appreciated.

jamie-burks

comment created time in a month

issue commentmicrosoft/vscode-python

Different python.defaultInterpreterPath by workspace not being saved

I think I'm even more confused now. In a previous response you said python.defaultInterpreterPath is not a replacement for python.pythonPath, but just prior you said python.pythonPath is no longer valid. How do I now set a workspace-specific value? I think the answer is to use Python: Select Interpreter but where is that stored? I've tried setting it, but I don't see the results.

jamie-burks

comment created time in a month

issue commentmicrosoft/vscode-python

Different python.defaultInterpreterPath by workspace not being saved

Ok, that makes sense, but then why do you get the warning 'The setting "python.pythonPath" defined in your settings.json is now deprecated. Do you want us to delete it from your settings.json only?' when DeprecatePythonPath is enabled? Maybe that's an inaccurate warning?

jamie-burks

comment created time in 2 months

startedmicrosoft/vscode-python

started time in 2 months

issue openedmicrosoft/vscode-python

Different python.defaultInterpreterPath by workspace not being saved

Environment data

  • VS Code version: 1.46.1
  • OS and version: macOS Catalina 10.15.5
  • Python version (& distribution if applicable, e.g. Anaconda): Multiple 3.x versions
  • Type of virtual environment used: virtualenv / pipenv

Expected behaviour

According to https://github.com/microsoft/vscode-python/wiki/AB-Experiments workspace specific settings for the default Python interpreter should be possible via a new python.defaultInterpreterPath user setting.

Actual behaviour

python.defaultInterpreterPath is shared between multiple workspaces.

Steps to reproduce:

  1. Start a new virtualenv and VS code for project1, e.g.

user@MacBook-pro project1 % pipenv shell Launching subshell in virtual environment… . /Users/user/.local/share/virtualenvs/project1-Vn51bfDI/bin/activate user@MacBook-Pro project1 % . /Users/user/.local/share/virtualenvs/project1-Vn51bfDI/bin/activate (project1) user@MacBook-Pro project1 % code .

  1. Start a new virtualenv and VS code for project2, e.g.

user@MacBook-pro project2 % pipenv shell Launching subshell in virtual environment… . /Users/user/.local/share/virtualenvs/project2-y-K1Kf4d/bin/activate user@MacBook-Pro project2 % . /Users/user/.local/share/virtualenvs/project2-y-K1Kf4d/bin/activate (project2) user@MacBook-Pro project2 % code .

  1. In project 1, set python.defaultInterpreterPath in project1 to /Users/user/.local/share/virtualenvs/stdapplib-Vn51bfDI/bin/python

  2. In project 2, bring up Preferences to see that python.defaultInterpreterPath is already set to the virtualenv path for project1.

Comments

Maybe I'm misunderstanding how this is supposed to work, but a being able to reference a different virtualenv interpreter for each project seems to be a requirement based on the need to not lose prior functionality.

created time in 2 months

startedswagger-api/swagger-codegen

started time in 2 months

more