From fbeaa977049e6ac2723b98017ab1055c8cb603fc Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Tue, 12 Apr 2022 12:09:15 +0200 Subject: [PATCH 1/3] Update further to ipykernel comm refatoring --- docs/source/comms.rst | 2 +- notebook/tests/services/serialize.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/comms.rst b/docs/source/comms.rst index 7c292d78bd..c2ff11bb52 100644 --- a/docs/source/comms.rst +++ b/docs/source/comms.rst @@ -78,7 +78,7 @@ containing Javascript to connect to it. # Send data to the frontend on creation comm.send({'foo': 5}) - get_ipython().kernel.comm_manager.register_target('my_comm_target', target_func) + get_ipython().comm.comm_manager.register_target('my_comm_target', target_func) This example uses the IPython kernel again; this example will be different in other kernels that support comms. Refer to the specific language kernel's diff --git a/notebook/tests/services/serialize.js b/notebook/tests/services/serialize.js index e44ea47043..cd538c54dc 100644 --- a/notebook/tests/services/serialize.js +++ b/notebook/tests/services/serialize.js @@ -33,7 +33,7 @@ casper.notebook_test(function () { this.then(function () { var index = this.append_cell([ "import os", - "from IPython.kernel.comm import Comm", + "from IPython.comm.comm import Comm", "comm = Comm(target_name='echo')", "msgs = []", "def on_msg(msg):", From 5ca18c2170626602507fc5eec038deb0d0d82041 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Tue, 12 Apr 2022 12:19:48 +0200 Subject: [PATCH 2/3] more fixes for ipykernel refactoring --- notebook/tests/services/kernel.js | 2 +- notebook/tests/services/serialize.js | 2 +- notebook/tests/services/session.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/notebook/tests/services/kernel.js b/notebook/tests/services/kernel.js index 4f22b802e9..a7e5382632 100644 --- a/notebook/tests/services/kernel.js +++ b/notebook/tests/services/kernel.js @@ -310,7 +310,7 @@ casper.notebook_test(function () { this.thenEvaluate(function () { var cell = IPython.notebook.get_cell(0); cell.set_text("import os\n" + - "from IPython.kernel.connect import get_connection_file\n" + + "from ipykernel.connect import get_connection_file\n" + "with open(get_connection_file(), 'w') as f:\n" + " f.write('garbage')\n" + "os._exit(1)"); diff --git a/notebook/tests/services/serialize.js b/notebook/tests/services/serialize.js index cd538c54dc..36bb165659 100644 --- a/notebook/tests/services/serialize.js +++ b/notebook/tests/services/serialize.js @@ -33,7 +33,7 @@ casper.notebook_test(function () { this.then(function () { var index = this.append_cell([ "import os", - "from IPython.comm.comm import Comm", + "from ipykernel.comm.comm import Comm", "comm = Comm(target_name='echo')", "msgs = []", "def on_msg(msg):", diff --git a/notebook/tests/services/session.js b/notebook/tests/services/session.js index 5f41278de0..ff1fa25d35 100644 --- a/notebook/tests/services/session.js +++ b/notebook/tests/services/session.js @@ -154,7 +154,7 @@ casper.notebook_test(function () { this.thenEvaluate(function () { var cell = IPython.notebook.get_cell(0); cell.set_text("import os\n" + - "from IPython.kernel.connect import get_connection_file\n" + + "from ipykernel.connect import get_connection_file\n" + "with open(get_connection_file(), 'w') as f:\n" + " f.write('garbage')\n" + "os._exit(1)"); From 45e2f2de744332cf5e5d9a86a417f8d401e89363 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Tue, 12 Apr 2022 12:25:15 +0200 Subject: [PATCH 3/3] revert bad fix for comms rst --- docs/source/comms.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/comms.rst b/docs/source/comms.rst index c2ff11bb52..7c292d78bd 100644 --- a/docs/source/comms.rst +++ b/docs/source/comms.rst @@ -78,7 +78,7 @@ containing Javascript to connect to it. # Send data to the frontend on creation comm.send({'foo': 5}) - get_ipython().comm.comm_manager.register_target('my_comm_target', target_func) + get_ipython().kernel.comm_manager.register_target('my_comm_target', target_func) This example uses the IPython kernel again; this example will be different in other kernels that support comms. Refer to the specific language kernel's