forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Milestone
Description
Refs: #19101
- anyOS: @IanMatthewHuff
- anyOS: @DonJayamanne
Complexity: 5
Requirements
Pre-assigning Jupyter team, but note builds are not available yet, testing begins tomorrow.
- Use Pre release build of the python extension
- Have as many types of environments as you can.
- Interesting types to test: Conda, Pyenv global installs, Pyenv conda envs etc.
Test APIs exposed via ProposedExtensionAPI
- See
ProposedExtensionAPIfor APIs to test: https://github.dev/microsoft/vscode-python/blob/main/src/client/proposedApiTypes.ts - Use
Python: Clear cache and reloadcommand to clear any pre-existing discovery cache in the extension. - Try dry-adopting it in the Jupyter extension for discovery of Python environments and make sure it covers all scenarios.
Example usage:
Copy over contents of https://github.com/microsoft/vscode-python/blob/main/src/client/proposedApiTypes.ts#L8 as needed.
const extension = extensions.getExtension('ms-python.python');
if (extension) {
if (!extension.isActive) {
await extension.activate();
}
const api: IExtensionApi & ProposedExtensionAPI = extension.exports as IExtensionApi & ProposedExtensionAPI;
if (api.environment) {
const envPath = api.environment.getActiveEnvironmentPath();
}
}