Skip to content

Commit 3acf114

Browse files
author
Steven Silvester
authored
Merge pull request #685 from davidbrochart/migration_guide
Improve migration guide
2 parents be67c65 + bd144bd commit 3acf114

File tree

1 file changed

+37
-3
lines changed

1 file changed

+37
-3
lines changed

docs/migration.md

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,48 @@ The following internal methods had signature changes:
2727
Besides the signature and attribute changes described above, the following internal methods were made `async` for `AsyncKernelManager`:
2828

2929
- `async def pre_start_kernel(self, **kwargs) -> Tuple[List[str], Dict[str, Any]]:`
30-
- `async def post_start_kernel(self, **kwargs)`
30+
- `async def post_start_kernel(self, **kwargs):`
3131
- `async def request_shutdown(self, restart: bool = False):`
3232
- `async def cleanup_resources(self, restart: bool = False):`
3333

34+
#### `AsyncKernelClient`
35+
36+
We dropped the `block: bool = True` keyword argument for the following methods:
37+
38+
- `async def get_shell_msg(self, timeout: Optional[float] = None) -> Dict[str, Any]:`
39+
- `async def get_iopub_msg(self, timeout: Optional[float] = None) -> Dict[str, Any]:`
40+
- `async def get_stdin_msg(self, timeout: Optional[float] = None) -> Dict[str, Any]:`
41+
- `async def get_control_msg(self, timeout: Optional[float] = None) -> Dict[str, Any]:`
42+
43+
Calling these methods with `block=False` previously translates to calling them with `timeout=0` now.
44+
Calling these methods with `block=True` previously translates to calling them with a non-zero `timeout` value now.
45+
46+
#### `BlockingKernelClient`
47+
48+
We dropped the `block: bool = True` keyword argument for the following methods:
49+
50+
- `def get_shell_msg(self, timeout: Optional[float] = None) -> Dict[str, Any]:`
51+
- `def get_iopub_msg(self, timeout: Optional[float] = None) -> Dict[str, Any]:`
52+
- `def get_stdin_msg(self, timeout: Optional[float] = None) -> Dict[str, Any]:`
53+
- `def get_control_msg(self, timeout: Optional[float] = None) -> Dict[str, Any]:`
54+
55+
Calling these methods with `block=False` previously translates to calling them with `timeout=0` now.
56+
Calling these methods with `block=True` previously translates to calling them with a non-zero `timeout` value now.
57+
58+
#### `BlockingKernelClient`
59+
3460
#### `ZMQSocketChannel`
3561

36-
- `async def get_msg(self, timeout: t.Optional[float] = None) -> t.Dict[str, t.Any]:`:
37-
We dropped the `block: bool = True` keyword argument. Calling this method with `block=False` previously translates to calling it with `timeout=0` now.
62+
We dropped the `block: bool = True` keyword argument for the following method:
63+
64+
- `async def get_msg(self, timeout: Optional[float] = None) -> Dict[str, Any]:`:
65+
66+
Calling this method with `block=False` previously translates to calling it with `timeout=0` now.
67+
Calling this method with `block=True` previously translates to calling it with a non-zero `timeout` value now.
68+
69+
```{admonition} Note
70+
Prefer calling e.g. `client.get_shell_msg()` over `client.shell_channel.get_msg()`.
71+
```
3872

3973
### Deprecations removed
4074

0 commit comments

Comments
 (0)