You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
python: respect defaultInterpreterPath when specified (#6414)
Adds in a selection process for implicitly or immediately starting a
runtime before discovery in `recommendWorkspaceRuntime()`. The hope here
is that, if there is a local env or a user-defined environment we know
about _before_ discovery, we can automatically select it.
### Release Notes
<!--
Optionally, replace `N/A` with text to be included in the next release
notes.
The `N/A` bullets are ignored. If you refer to one or more Positron
issues,
these issues are used to collect information about the feature or
bugfix, such
as the relevant language pack as determined by Github labels of type
`lang: `.
The note will automatically be tagged with the language.
These notes are typically filled by the Positron team. If you are an
external
contributor, you may ignore this section.
-->
#### New Features
- #6281
- #6204
#### Bug Fixes
- N/A
### QA Notes
<!--
Add additional information for QA on how to validate the change,
paying special attention to the level of risk, adjacent areas that
could be affected by the change, and any important contextual
information not present in the linked issues.
-->
I have a few scenarios highlighted and what is expected. Since this part
of the codebase cares a lot about past selections, I'd highly recommend
clearing state and then restoring settings by running:
```
rm -rf ~/.vscode-oss-dev/;
rm -rf ~/.positron-dev;
mkdir -p ~/.vscode-oss-dev/User;
touch ~/.vscode-oss-dev/User/settings.json;
echo '{"python.defaultInterpreterPath": "PATH TO SOME PYTHON"}' > ~/.vscode-oss-dev/User/settings.json
```
| scenario | expected |
|
-------------------------------------------------------------------------------------------------------------------------------------
| ---------------------------------------------------------- |
| in workspace:<br>has .venv<br>has user level defaultInterpreterPath
set | .venv<br>immediate startup |
| in workspace:<br>had active runtime when Positron shut down<br>has
user level defaultInterpreterPath | previous active runtime<br>immediate
startup<br> |
| in workspace:<br>brand new, no affiliated runtime<br>has user level
defaultInterpreterPath set | user level
defaultInterpreterPath<br>implicit startup |
| in workspace:<br>no affiliated runtime<br>has workspace level
defaultInterpreterPath set<br>has user level defaultInterpreterPath set
| workspace level defaultInterpreterPath<br>implicit startup |
| no workspace:<br>has user level defaultInterpreterPath set | user
level defaultInterpreterPath<br>implicit startup |
---------
Signed-off-by: Isabel Zimmerman <[email protected]>
Co-authored-by: Wasim Lorgat <[email protected]>
Co-authored-by: sharon <[email protected]>
Copy file name to clipboardexpand all lines: extensions/positron-python/package.nls.json
+1-1
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@
50
50
"python.condaPath.description": "Path to the conda executable to use for activation (version 4.4+).",
51
51
"python.environmentProviders.enable.markdownDescription": "Configures which Python environment providers are enabled in Positron. Check the box to enable or uncheck the box to disable an environment provider.\n\nRequires a restart to take effect.",
52
52
"python.debugger.deprecatedMessage": "This configuration will be deprecated soon. Please replace `python` with `debugpy` to use the new Python Debugger extension.",
53
-
"python.defaultInterpreterPath.description": "Path to default Python to use when extension loads up for the first time, no longer used once an interpreter is selected for the workspace. See [here](https://aka.ms/AAfekmf) to understand when this is used",
53
+
"python.defaultInterpreterPath.description": "Path to default Python to use when extension loads up for the first time, no longer used once an interpreter is selected for the workspace. Must be an absolute path.",
54
54
"python.interpreters.include.markdownDescription": "List of folders (absolute paths) to search for Python installations. These folders are searched in addition to the default folders for your operating system.\n\nExample: if you have Python located at `/custom/pythons/3.10.4/bin/python`, add path `/custom/pythons` or `/custom/pythons/3.10.4` to this setting.\n\nNote: If an interpreter is both included via `python.interpreters.include` and excluded via `python.interpreters.exclude`, it will not be displayed in the Positron UI.\n\nRequires a restart to take effect.",
55
55
"python.interpreters.exclude.markdownDescription": "List of interpreter paths or folders (absolute paths) to exclude from the available Python installations. These interpreters will not be displayed in the Positron UI.\n\nExample: Add `/usr/bin/python3` to exclude the specific interpreter, or `/opt/homebrew` to exclude all brew-installed Pythons on macOS.\n\nRequires a restart to take effect.",
56
56
"python.envFile.description": "Absolute path to a file containing environment variable definitions.",
0 commit comments