diff --git a/package-lock.json b/package-lock.json index bf955097fec..cbef565d359 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "jupyter", - "version": "2024.3.0", + "version": "2024.3.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "jupyter", - "version": "2024.3.0", + "version": "2024.3.1", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index cd37b679c97..cf54479e3b4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jupyter", "displayName": "Jupyter", - "version": "2024.3.0", + "version": "2024.3.1", "description": "Jupyter notebook support, interactive programming and computing that supports Intellisense, debugging and more.", "publisher": "ms-toolsai", "author": { diff --git a/src/platform/api/types.ts b/src/platform/api/types.ts index 8e0fe50e3dd..a53fb64ac6e 100644 --- a/src/platform/api/types.ts +++ b/src/platform/api/types.ts @@ -5,7 +5,7 @@ import { Event, Uri } from 'vscode'; import { Resource } from '../common/types'; import type { SemVer } from 'semver'; import { PythonVersion } from '../pythonEnvironments/info/pythonVersion'; -import { PythonExtension } from '@vscode/python-extension'; +import { PythonExtension, type Environment } from '@vscode/python-extension'; export const IPythonApiProvider = Symbol('IPythonApi'); export interface IPythonApiProvider { @@ -64,7 +64,7 @@ export interface PythonApi { */ getActivatedEnvironmentVariables( resource: Resource, - interpreter: PythonEnvironment_PythonApi, + interpreter: Environment, allowExceptions?: boolean ): Promise; /** diff --git a/src/platform/interpreter/environmentActivationService.node.ts b/src/platform/interpreter/environmentActivationService.node.ts index cd1c2d56ad1..d84b797b5e3 100644 --- a/src/platform/interpreter/environmentActivationService.node.ts +++ b/src/platform/interpreter/environmentActivationService.node.ts @@ -18,7 +18,6 @@ import { KernelProgressReporter } from '../progress/kernelProgressReporter'; import { Telemetry } from '../common/constants'; import { ignoreLogging, logValue, traceDecoratorVerbose, traceError, traceVerbose, traceWarning } from '../logging'; import { TraceOptions } from '../logging/types'; -import { pythonEnvToJupyterEnv, serializePythonEnvironment } from '../api/pythonApi'; import { GlobalPythonExecutablePathService } from './globalPythonExePathService.node'; import { noop } from '../common/utils/misc'; import { CancellationToken, workspace } from 'vscode'; @@ -166,22 +165,16 @@ export class EnvironmentActivationService implements IEnvironmentActivationServi let failureEx: Error | undefined; let env = await this.apiProvider.getApi().then((api) => - api - .getActivatedEnvironmentVariables( - resource, - serializePythonEnvironment(pythonEnvToJupyterEnv(environment))!, - false - ) - .catch((ex) => { - traceError( - `Failed to get activated env variables from Python Extension for ${getDisplayPath( - environment.path - )}`, - ex - ); - reasonForFailure = 'failedToGetActivatedEnvVariablesFromPython'; - return undefined; - }) + api.getActivatedEnvironmentVariables(resource, environment, false).catch((ex) => { + traceError( + `Failed to get activated env variables from Python Extension for ${getDisplayPath( + environment.path + )}`, + ex + ); + reasonForFailure = 'failedToGetActivatedEnvVariablesFromPython'; + return undefined; + }) ); if (token?.isCancellationRequested) { return;