Skip to content

Commit aa3aecb

Browse files
Backport PR #1334 on branch 0.4.x (Do not clean up resources after execution) (#1335)
* Backport PR #1334: Do not clean up resources after execution * Only clean kernel client * Fix CI * OpenSSL issue workaround --------- Co-authored-by: martinRenou <[email protected]>
1 parent 9e76783 commit aa3aecb

File tree

6 files changed

+18
-5
lines changed

6 files changed

+18
-5
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
- name: Create the conda environment
3434
shell: bash -l {0}
35-
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs yarn=1 flake8 ipywidgets matplotlib xeus-cling openssl=1.1.1l "traitlets>=5.0.3,<6"
35+
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs yarn=1 flake8 ipywidgets matplotlib xeus-cling "traitlets>=5.0.3,<6"
3636

3737
- name: Install dependencies
3838
shell: bash -l {0}
@@ -82,7 +82,7 @@ jobs:
8282

8383
- name: Create the conda environment
8484
shell: bash -l {0}
85-
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs yarn=1 flake8 ipywidgets matplotlib xeus-cling openssl=1.1.1l "traitlets>=5.0.3,<6"
85+
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs yarn=1 flake8 ipywidgets matplotlib xeus-cling "traitlets>=5.0.3,<6"
8686

8787
- name: Install dependencies
8888
shell: bash -l {0}

packages/jupyterlab-preview/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
},
7373
"jupyterlab": {
7474
"extension": true,
75+
"webpackConfig": "webpack.lab.config.js",
7576
"schemaDir": "schema",
7677
"outputDir": "../../voila/labextension",
7778
"discovery": {
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const crypto = require('crypto');
2+
3+
// Workaround for loaders using "md4" by default, which is not supported in FIPS-compliant OpenSSL
4+
const cryptoOrigCreateHash = crypto.createHash;
5+
crypto.createHash = algorithm =>
6+
cryptoOrigCreateHash(algorithm === 'md4' ? 'sha256' : algorithm);

packages/voila/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
},
4646
"style": "style/index.css",
4747
"scripts": {
48-
"build": "npm run build:lib && webpack",
48+
"build": "jlpm run build:lib && webpack",
4949
"build:lib": "tsc",
50-
"build:prod": "npm run build:lib && webpack --production",
50+
"build:prod": "jlpm run build:lib && webpack --production",
5151
"clean": "jlpm run clean:lib",
5252
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
5353
"test": "echo \"Error: no test specified\" && exit 1",

packages/voila/webpack.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
var path = require('path');
22

3+
const crypto = require('crypto');
4+
5+
// Workaround for loaders using "md4" by default, which is not supported in FIPS-compliant OpenSSL
6+
const cryptoOrigCreateHash = crypto.createHash;
7+
crypto.createHash = algorithm =>
8+
cryptoOrigCreateHash(algorithm === 'md4' ? 'sha256' : algorithm);
9+
310
var rules = [
411
{ test: /\.css$/, use: ['style-loader', 'css-loader'] },
512
// required to load font-awesome

voila/notebook_renderer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ async def _jinja_cell_generator(self, nb, kernel_id):
306306
await self._cleanup_resources()
307307

308308
async def _cleanup_resources(self):
309-
await ensure_async(self.executor.km.cleanup_resources())
310309
await ensure_async(self.executor.kc.stop_channels())
311310

312311
async def load_notebook(self, path):

0 commit comments

Comments
 (0)