Skip to content

Commit 91cde29

Browse files
committed
[WIP] python3-ipython_ipykernel: patches for ipython 9.0
1 parent 96fef48 commit 91cde29

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From https://github.com/ipython/ipykernel/pull/1354
2+
3+
diff --git a/tests/test_start_kernel.py b/tests/test_start_kernel.py
4+
index f2a632be..71f4bdc0 100644
5+
--- a/tests/test_start_kernel.py
6+
+++ b/tests/test_start_kernel.py
7+
@@ -14,6 +14,14 @@
8+
9+
@flaky(max_runs=3)
10+
def test_ipython_start_kernel_userns():
11+
+ import IPython
12+
+
13+
+ if IPython.version_info > (9, 0): # noqa:SIM108
14+
+ EXPECTED = "IPythonMainModule"
15+
+ else:
16+
+ # not this since https://github.com/ipython/ipython/pull/14754
17+
+ EXPECTED = "DummyMod"
18+
+
19+
cmd = dedent(
20+
"""
21+
from ipykernel.kernelapp import launch_new_instance
22+
@@ -40,7 +48,7 @@ def test_ipython_start_kernel_userns():
23+
content = msg["content"]
24+
assert content["found"]
25+
text = content["data"]["text/plain"]
26+
- assert "DummyMod" in text
27+
+ assert EXPECTED in text
28+
29+
30+
@flaky(max_runs=3)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/ipykernel/inprocess/ipkernel.py
2+
+++ b/ipykernel/inprocess/ipkernel.py
3+
@@ -197,7 +197,7 @@
4+
"""Activate pylab support at runtime."""
5+
if not gui:
6+
gui = self.kernel.gui
7+
- return super().enable_pylab(gui, import_all, welcome_message)
8+
+ return super().enable_pylab(gui, import_all)
9+
10+
11+
InteractiveShellABC.register(InProcessInteractiveShell)

0 commit comments

Comments
 (0)