Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/jupyter_client/managerabc.py: 69%
26 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-07-01 06:54 +0000
« prev ^ index » next coverage.py v7.2.7, created at 2023-07-01 06:54 +0000
1"""Abstract base class for kernel managers."""
2# Copyright (c) Jupyter Development Team.
3# Distributed under the terms of the Modified BSD License.
4import abc
7class KernelManagerABC(metaclass=abc.ABCMeta):
8 """KernelManager ABC.
10 The docstrings for this class can be found in the base implementation:
12 `jupyter_client.kernelmanager.KernelManager`
13 """
15 @abc.abstractproperty
16 def kernel(self):
17 pass
19 # --------------------------------------------------------------------------
20 # Kernel management
21 # --------------------------------------------------------------------------
23 @abc.abstractmethod
24 def start_kernel(self, **kw):
25 """Start the kernel."""
26 pass
28 @abc.abstractmethod
29 def shutdown_kernel(self, now=False, restart=False):
30 """Shut down the kernel."""
31 pass
33 @abc.abstractmethod
34 def restart_kernel(self, now=False, **kw):
35 """Restart the kernel."""
36 pass
38 @abc.abstractproperty
39 def has_kernel(self):
40 pass
42 @abc.abstractmethod
43 def interrupt_kernel(self):
44 """Interrupt the kernel."""
45 pass
47 @abc.abstractmethod
48 def signal_kernel(self, signum):
49 """Send a signal to the kernel."""
50 pass
52 @abc.abstractmethod
53 def is_alive(self):
54 """Test whether the kernel is alive."""
55 pass