Commit 733e085
committed
fix: migrate Jupyter integration from deprecated ipykernel.comm to comm module
- Replace ipykernel.comm.Comm with comm.create_comm
- Refactor kernel access to use get_ipython().kernel directly instead of comm.kernel
- Resolves DeprecationWarning in Python 3.12+
- Maintains full backward compatibility and functionality
- Passes all linting checks (pylint 10/10, flake8 clean, black formatted)
The new comm module's DummyComm doesn't provide kernel access like the old
ipykernel.comm.Comm. This fix properly migrates to get kernel from IPython
directly, which is more robust and follows the intended usage pattern.
Fixes #34161 parent 89a08e7 commit 733e085
2 files changed
+22
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
| |||
109 | 113 | | |
110 | 114 | | |
111 | 115 | | |
112 | | - | |
| 116 | + | |
| 117 | + | |
113 | 118 | | |
114 | 119 | | |
115 | 120 | | |
| |||
215 | 220 | | |
216 | 221 | | |
217 | 222 | | |
218 | | - | |
219 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
220 | 232 | | |
221 | 233 | | |
222 | 234 | | |
| |||
0 commit comments