|
3 | 3 | ## Jupyter Client 6.0 to 7.0
|
4 | 4 |
|
5 | 5 | ### API Changes
|
6 |
| -All of the API changes for `KernelManager` and `AsyncKernelManager` in the 7.0 release were confined to _internal public_ methods, which we define as methods called from the _formally public_ methods but could be overridden in subclass implementations. As a result, these changes may impact subclasses of `KernelManager` or `AsyncKernelManager` provided those implementations also implement or call these methods, but should not affect applications that call only the _formally public_ methods. |
| 6 | + |
| 7 | +All of the API changes for `KernelManager` and `AsyncKernelManager` in the 7.0 release were confined to _internal public_ methods, which we define as methods called from the _formally public_ methods but could be overridden in subclass implementations. As a result, these changes may impact subclasses of `KernelManager` or `AsyncKernelManager` provided those implementations also implement or call these methods, but should not affect applications that call only the _formally public_ methods. |
7 | 8 |
|
8 | 9 | #### `KernelManager`
|
| 10 | + |
9 | 11 | The following internal methods had signature changes:
|
| 12 | + |
10 | 13 | - `def pre_start_kernel(self, **kwargs) -> Tuple[List[str], Dict[str, Any]]:`
|
11 |
| - - `pre_start_kernel` now returns a tuple consisting of the formatted kernel startup list and an updated set of keyword arguments. |
| 14 | + - `pre_start_kernel` now returns a tuple consisting of the formatted kernel startup list and an updated set of keyword arguments. |
12 | 15 | - `def _launch_kernel(self, kernel_cmd: List[str], **kw) -> None:`
|
13 |
| - - `_launch_kernel` now returns `None` instead of the `Popen` instance |
| 16 | + - `_launch_kernel` now returns `None` instead of the `Popen` instance |
14 | 17 | - These methods now take the keyword argument `restart` indicating the shutdown was on behalf of a kernel restart (when `True`).
|
15 |
| - - `def finish_shutdown(self, restart: bool = False):` |
16 |
| - - `def _kill_kernel(self, restart: bool = False):` |
17 |
| - - `def _send_kernel_sigterm(self, restart: bool = False):` |
| 18 | + |
| 19 | + - `def finish_shutdown(self, restart: bool = False):` |
| 20 | + - `def _kill_kernel(self, restart: bool = False):` |
| 21 | + - `def _send_kernel_sigterm(self, restart: bool = False):` |
18 | 22 |
|
19 | 23 | - Attribute `kernel` has been removed and _logically_ replaced with `provisioner` - which is an instance of `KernelProvisionerBase` and can be viewed as an abstract `Popen` instance.
|
20 | 24 |
|
21 | 25 | #### `AsyncKernelManager`
|
| 26 | + |
22 | 27 | Besides the signature and attribute changes described above, the following internal methods were made `async` for `AsyncKernelManager`:
|
| 28 | + |
23 | 29 | - `async def pre_start_kernel(self, **kwargs) -> Tuple[List[str], Dict[str, Any]]:`
|
24 | 30 | - `async def post_start_kernel(self, **kwargs)`
|
25 | 31 | - `async def request_shutdown(self, restart: bool = False):`
|
26 | 32 | - `async def cleanup_resources(self, restart: bool = False):`
|
27 | 33 |
|
28 | 34 | #### `ZMQSocketChannel`
|
| 35 | + |
29 | 36 | - `async def get_msg(self, timeout: t.Optional[float] = None) -> t.Dict[str, t.Any]:`:
|
30 | 37 | We dropped the `block: bool = True` keyword argument. Calling this method with `block=False` previously translates to calling it with `timeout=0` now.
|
31 | 38 |
|
32 | 39 | ### Deprecations removed
|
| 40 | + |
33 | 41 | #### Method `KernelManager.cleanup()`
|
34 |
| -The `cleanup()` method on `KernelManager` has been removed. `cleanup_resources(restart: bool = False)` should be used. |
| 42 | + |
| 43 | +The `cleanup()` method on `KernelManager` has been removed. `cleanup_resources(restart: bool = False)` should be used. |
| 44 | + |
35 | 45 | #### Attribute `KernelManager.kernel_cmd`
|
36 |
| -This attribute had been marked for deprecation for 4 years. The command used to start the kernel is derived from the `argv` stanza of the kernel specification file (`kernel.json`). |
| 46 | + |
| 47 | +This attribute had been marked for deprecation for 4 years. The command used to start the kernel is derived from the `argv` stanza of the kernel specification file (`kernel.json`). |
0 commit comments