qtspock doesn't support jupyter_client >= 6.1.13
qtspock depends on qtconsole, which in turn depends on jupyter_client. There was a change in jupyter_client's KernelManager
which breaks the startup of qtspock.
The def _launch_kernel
in v5.x method changed to async def _async_launch_kernel
. In qtspock, we override _launch_kernel
to get special behaviour at startup, but that is no longer executed.
Change appears to have come into jupyter_client at 6.1.13.
A naive change like this appears to work with the newer versions of jupyter_client:
diff --git a/src/sardana/taurus/qt/qtgui/extra_sardana/qtspock.py b/src/sardana/taurus/qt/qtgui/extra_sardana/qtspock.py
index dad4010ff..5e255e2c0 100644
--- a/src/sardana/taurus/qt/qtgui/extra_sardana/qtspock.py
+++ b/src/sardana/taurus/qt/qtgui/extra_sardana/qtspock.py
@@ -92,7 +96,7 @@ class SpockKernelManager(QtKernelManager):
"""
kernel_about_to_launch = Qt.pyqtSignal()
- def _launch_kernel(self, kernel_cmd, **kw):
+ async def _async_launch_kernel(self, kernel_cmd, **kw):
try:
profile = kernel_cmd[kernel_cmd.index("--profile") + 1]
except ValueError:
@@ -111,7 +115,7 @@ class SpockKernelManager(QtKernelManager):
error("Checking spock profile failed.")
info('Starting kernel...')
self.kernel_about_to_launch.emit()
- return super()._launch_kernel(kernel_cmd, **kw)
+ return await super()._async_launch_kernel(kernel_cmd, **kw)
class QtSpockWidget(RichJupyterWidget, TaurusBaseWidget):
If we want to support older versions simultaneously, then we will need a version check.
The jupyter_client docstring for _async_launch_kernel
says
Note that provisioners can now be used to customize kernel environments
so that might could be a better solution. Overriding methods with non-public names isn't ideal.