From 05488831f19bc3e5c14cbe0e8deb18a32eac269e Mon Sep 17 00:00:00 2001 From: Michal Baumgartner Date: Fri, 31 Oct 2025 11:04:57 +0100 Subject: [PATCH] chore: Upgrade Toolkit to v1 --- .../deepnote/deepnoteSharedToolkitInstaller.node.ts | 4 ++-- src/kernels/deepnote/deepnoteToolkitInstaller.node.ts | 10 +++++----- src/kernels/deepnote/types.ts | 3 +-- src/platform/errors/deepnoteKernelErrors.ts | 4 ++-- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/kernels/deepnote/deepnoteSharedToolkitInstaller.node.ts b/src/kernels/deepnote/deepnoteSharedToolkitInstaller.node.ts index 5ae50c931c..0cfd9d23b3 100644 --- a/src/kernels/deepnote/deepnoteSharedToolkitInstaller.node.ts +++ b/src/kernels/deepnote/deepnoteSharedToolkitInstaller.node.ts @@ -10,7 +10,7 @@ import { IOutputChannel, IExtensionContext } from '../../platform/common/types'; import { STANDARD_OUTPUT_CHANNEL } from '../../platform/common/constants'; import { IFileSystem } from '../../platform/common/platform/types'; import { Cancellation } from '../../platform/common/cancellation'; -import { DEEPNOTE_TOOLKIT_WHEEL_URL, DEEPNOTE_TOOLKIT_VERSION } from './types'; +import { DEEPNOTE_TOOLKIT_VERSION } from './types'; /** * Manages a shared installation of deepnote-toolkit in a versioned extension directory. @@ -220,7 +220,7 @@ export class DeepnoteSharedToolkitInstaller { '--target', this.sharedInstallationPath.fsPath, '--upgrade', - `deepnote-toolkit[server] @ ${DEEPNOTE_TOOLKIT_WHEEL_URL}` + `deepnote-toolkit[server]==${DEEPNOTE_TOOLKIT_VERSION}` ], { throwOnStdErr: false } ); diff --git a/src/kernels/deepnote/deepnoteToolkitInstaller.node.ts b/src/kernels/deepnote/deepnoteToolkitInstaller.node.ts index 403235623b..97cb07a9ea 100644 --- a/src/kernels/deepnote/deepnoteToolkitInstaller.node.ts +++ b/src/kernels/deepnote/deepnoteToolkitInstaller.node.ts @@ -4,7 +4,7 @@ import { inject, injectable, named } from 'inversify'; import { CancellationToken, Uri, workspace } from 'vscode'; import { PythonEnvironment } from '../../platform/pythonEnvironments/info'; -import { IDeepnoteToolkitInstaller, DEEPNOTE_TOOLKIT_WHEEL_URL, DEEPNOTE_TOOLKIT_VERSION } from './types'; +import { IDeepnoteToolkitInstaller, DEEPNOTE_TOOLKIT_VERSION } from './types'; import { IProcessServiceFactory } from '../../platform/common/process/types.node'; import { logger } from '../../platform/logging'; import { IOutputChannel, IExtensionContext } from '../../platform/common/types'; @@ -189,7 +189,7 @@ export class DeepnoteToolkitInstaller implements IDeepnoteToolkitInstaller { Cancellation.throwIfCanceled(token); // Install deepnote-toolkit and ipykernel in venv - logger.info(`Installing deepnote-toolkit and ipykernel in venv from ${DEEPNOTE_TOOLKIT_WHEEL_URL}`); + logger.info(`Installing deepnote-toolkit (${DEEPNOTE_TOOLKIT_VERSION}) and ipykernel in venv from PyPI`); this.outputChannel.appendLine('Installing deepnote-toolkit and ipykernel...'); const installResult = await venvProcessService.exec( @@ -199,7 +199,7 @@ export class DeepnoteToolkitInstaller implements IDeepnoteToolkitInstaller { 'pip', 'install', '--upgrade', - `deepnote-toolkit[server] @ ${DEEPNOTE_TOOLKIT_WHEEL_URL}`, + `deepnote-toolkit[server]==${DEEPNOTE_TOOLKIT_VERSION}`, 'ipykernel' ], { throwOnStdErr: false } @@ -260,7 +260,7 @@ export class DeepnoteToolkitInstaller implements IDeepnoteToolkitInstaller { throw new DeepnoteToolkitInstallError( venvInterpreter.uri.fsPath, venvPath.fsPath, - DEEPNOTE_TOOLKIT_WHEEL_URL, + DEEPNOTE_TOOLKIT_VERSION, installResult.stdout || '', installResult.stderr || 'Package installation completed but verification failed' ); @@ -278,7 +278,7 @@ export class DeepnoteToolkitInstaller implements IDeepnoteToolkitInstaller { throw new DeepnoteToolkitInstallError( baseInterpreter.uri.fsPath, venvPath.fsPath, - DEEPNOTE_TOOLKIT_WHEEL_URL, + DEEPNOTE_TOOLKIT_VERSION, '', ex instanceof Error ? ex.message : String(ex), ex instanceof Error ? ex : undefined diff --git a/src/kernels/deepnote/types.ts b/src/kernels/deepnote/types.ts index de16f84a68..21c366ea08 100644 --- a/src/kernels/deepnote/types.ts +++ b/src/kernels/deepnote/types.ts @@ -156,7 +156,6 @@ export interface IDeepnoteKernelAutoSelector { ensureKernelSelected(notebook: vscode.NotebookDocument, token?: vscode.CancellationToken): Promise; } -export const DEEPNOTE_TOOLKIT_VERSION = '0.2.30.post30'; -export const DEEPNOTE_TOOLKIT_WHEEL_URL = `https://deepnote-staging-runtime-artifactory.s3.amazonaws.com/deepnote-toolkit-packages/${DEEPNOTE_TOOLKIT_VERSION}/deepnote_toolkit-${DEEPNOTE_TOOLKIT_VERSION}-py3-none-any.whl`; +export const DEEPNOTE_TOOLKIT_VERSION = '1.0.0rc2'; export const DEEPNOTE_DEFAULT_PORT = 8888; export const DEEPNOTE_NOTEBOOK_TYPE = 'deepnote'; diff --git a/src/platform/errors/deepnoteKernelErrors.ts b/src/platform/errors/deepnoteKernelErrors.ts index 9a21be4e44..fa349209fd 100644 --- a/src/platform/errors/deepnoteKernelErrors.ts +++ b/src/platform/errors/deepnoteKernelErrors.ts @@ -99,7 +99,7 @@ export class DeepnoteToolkitInstallError extends DeepnoteKernelError { constructor( public readonly pythonPath: string, public readonly venvPath: string, - public readonly packageUrl: string, + public readonly packageVersion: string, public readonly stdout: string, public readonly stderr: string, cause?: Error @@ -112,7 +112,7 @@ export class DeepnoteToolkitInstallError extends DeepnoteKernelError { this.technicalDetails = [ `Python interpreter: ${pythonPath}`, `Virtual environment: ${venvPath}`, - `Package URL: ${packageUrl}`, + `Package version: ${packageVersion}`, stdout ? `Installation output:\n${stdout}` : '', stderr ? `Error output:\n${stderr}` : 'No error output available', cause ? `Underlying error: ${cause.message}` : ''