Skip to content

Commit 21b9580

Browse files
author
Steven Silvester
authored
Update migration.md
1 parent 650e423 commit 21b9580

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

docs/migration.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,45 @@
33
## Jupyter Client 6.0 to 7.0
44

55
### 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.
78

89
#### `KernelManager`
10+
911
The following internal methods had signature changes:
12+
1013
- `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.
1215
- `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
1417
- 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):`
1822

1923
- 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.
2024

2125
#### `AsyncKernelManager`
26+
2227
Besides the signature and attribute changes described above, the following internal methods were made `async` for `AsyncKernelManager`:
28+
2329
- `async def pre_start_kernel(self, **kwargs) -> Tuple[List[str], Dict[str, Any]]:`
2430
- `async def post_start_kernel(self, **kwargs)`
2531
- `async def request_shutdown(self, restart: bool = False):`
2632
- `async def cleanup_resources(self, restart: bool = False):`
2733

2834
#### `ZMQSocketChannel`
35+
2936
- `async def get_msg(self, timeout: t.Optional[float] = None) -> t.Dict[str, t.Any]:`:
3037
We dropped the `block: bool = True` keyword argument. Calling this method with `block=False` previously translates to calling it with `timeout=0` now.
3138

3239
### Deprecations removed
40+
3341
#### 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+
3545
#### 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

Comments
 (0)