Skip to content

Commit

Permalink
pin ipykernel to v5.5.5 (#24429)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucyzhang929 authored Sep 14, 2023
1 parent 0513282 commit e6e6085
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
14 changes: 10 additions & 4 deletions extensions/notebook/src/jupyter/jupyterServerInstallation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ export const requiredNotebookPkg: PythonPkgDetails = {
installExactVersion: true
};

export const requiredIpykernelPkg: PythonPkgDetails = {
name: 'ipykernel',
version: '5.5.5',
installExactVersion: true
};

export const requiredPowershellPkg: PythonPkgDetails = {
name: 'powershell-kernel',
version: '0.1.4'
Expand Down Expand Up @@ -149,11 +155,11 @@ export class JupyterServerInstallation implements IJupyterServerInstallation {
this._kernelSetupCache = new Map<string, boolean>();
this._requiredKernelPackages = new Map<string, PythonPkgDetails[]>();

this._requiredKernelPackages.set(constants.ipykernelDisplayName, [requiredJupyterPkg, requiredNotebookPkg]);
this._requiredKernelPackages.set(constants.python3DisplayName, [requiredJupyterPkg, requiredNotebookPkg]);
this._requiredKernelPackages.set(constants.powershellDisplayName, [requiredJupyterPkg, requiredPowershellPkg, requiredNotebookPkg]);
this._requiredKernelPackages.set(constants.ipykernelDisplayName, [requiredJupyterPkg, requiredNotebookPkg, requiredIpykernelPkg]);
this._requiredKernelPackages.set(constants.python3DisplayName, [requiredJupyterPkg, requiredNotebookPkg, requiredIpykernelPkg]);
this._requiredKernelPackages.set(constants.powershellDisplayName, [requiredJupyterPkg, requiredPowershellPkg, requiredNotebookPkg, requiredIpykernelPkg]);

let allPackages = [requiredJupyterPkg, requiredNotebookPkg, requiredPowershellPkg];
let allPackages = [requiredJupyterPkg, requiredNotebookPkg, requiredIpykernelPkg, requiredPowershellPkg];
this._requiredKernelPackages.set(constants.allKernelsName, allPackages);

this._requiredPackagesSet = new Set<string>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import * as uuid from 'uuid';
import * as fs from 'fs-extra';
import * as request from 'request';
import * as utils from '../../common/utils';
import { requiredJupyterPkg, JupyterServerInstallation, requiredPowershellPkg, PythonInstallSettings, PythonPkgDetails, requiredNotebookPkg } from '../../jupyter/jupyterServerInstallation';
import { requiredJupyterPkg, JupyterServerInstallation, requiredPowershellPkg, PythonInstallSettings, PythonPkgDetails, requiredNotebookPkg, requiredIpykernelPkg } from '../../jupyter/jupyterServerInstallation';
import { powershellDisplayName, python3DisplayName, winPlatform } from '../../common/constants';

describe('Jupyter Server Installation', function () {
Expand Down Expand Up @@ -226,12 +226,12 @@ describe('Jupyter Server Installation', function () {

it('Get required packages test - Python 3 kernel', async function () {
let packages = installation.getRequiredPackagesForKernel(python3DisplayName);
should(packages).be.deepEqual([requiredJupyterPkg, requiredNotebookPkg]);
should(packages).be.deepEqual([requiredJupyterPkg, requiredNotebookPkg, requiredIpykernelPkg]);
});

it('Get required packages test - Powershell kernel', async function () {
let packages = installation.getRequiredPackagesForKernel(powershellDisplayName);
should(packages).be.deepEqual([requiredJupyterPkg, requiredPowershellPkg, requiredNotebookPkg]);
should(packages).be.deepEqual([requiredJupyterPkg, requiredPowershellPkg, requiredNotebookPkg, requiredIpykernelPkg]);
});

it('Install python test - Run install while Python is already running', async function () {
Expand Down

0 comments on commit e6e6085

Please sign in to comment.