Skip to content

Test finalized API for python environments #19886

@karrtikr

Description

@karrtikr

Refs: #19101

Complexity: 5

Create Issue


Requirements

Pre-assigning Jupyter team, but note builds are not available yet, testing begins tomorrow.

  1. Use Pre release build of the python extension
  2. Have as many types of environments as you can.
  3. Interesting types to test: Conda, Pyenv global installs, Pyenv conda envs etc.

Test APIs exposed via ProposedExtensionAPI

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();
    }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions