Skip to content

Commit 587f45c

Browse files
committed
Unpin IPython, and remove some dependencies on it.
This makes it annoying to test whether IPython breaks IPykernel. I'm almost always on IPython master branch and I'd like to know when/if I break things. Prompted by ipython/ipython#13252, which is not breaking ipykernel, but it's better to decouple where we can.
1 parent 360685c commit 587f45c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

ipykernel/inprocess/tests/test_kernel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
from ipykernel.inprocess.manager import InProcessKernelManager
1414
from ipykernel.inprocess.ipkernel import InProcessKernel
1515
from ipykernel.tests.utils import assemble_output
16-
from IPython.testing.decorators import skipif_not_matplotlib
1716
from IPython.utils.io import capture_output
1817

1918

19+
2020
def _init_asyncio_patch():
2121
"""set default asyncio policy to be compatible with tornado
2222
@@ -60,9 +60,9 @@ def setUp(self):
6060
self.kc.start_channels()
6161
self.kc.wait_for_ready()
6262

63-
@skipif_not_matplotlib
6463
def test_pylab(self):
6564
"""Does %pylab work in the in-process kernel?"""
65+
matplotlib = pytest.importorskip('matplotlib', reason='This test requires matplotlib')
6666
kc = self.kc
6767
kc.execute('%pylab')
6868
out, err = assemble_output(kc.get_iopub_msg)

ipykernel/tests/test_kernel.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import pytest
1515
from packaging import version
1616

17-
from IPython.testing import decorators as dec, tools as tt
17+
from IPython.testing import tools as tt
1818
import IPython
1919
from IPython.paths import locate_profile
2020

@@ -225,8 +225,8 @@ def test_save_history():
225225
assert 'b="abcþ"' in content
226226

227227

228-
@dec.skip_without('faulthandler')
229228
def test_smoke_faulthandler():
229+
faulthadler = pytest.importorskip('faulthandler', reason='this test needs faulthandler')
230230
with kernel() as kc:
231231
# Note: faulthandler.register is not available on windows.
232232
code = '\n'.join([
@@ -296,8 +296,8 @@ def test_complete():
296296
assert completed.startswith(cell)
297297

298298

299-
@dec.skip_without('matplotlib')
300299
def test_matplotlib_inline_on_import():
300+
pytest.importorskip('matplotlib', reason='this test requires matplotlib')
301301
with kernel() as kc:
302302
cell = '\n'.join([
303303
'import matplotlib, matplotlib.pyplot as plt',

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def run(self):
6464
'importlib-metadata<5;python_version<"3.8.0"',
6565
'argcomplete>=1.12.3;python_version<"3.8.0"',
6666
'debugpy>=1.0.0,<2.0',
67-
'ipython>=7.23.1,<8.0',
67+
'ipython>=7.23.1',
6868
'traitlets>=5.1.0,<6.0',
6969
'jupyter_client<8.0',
7070
'tornado>=4.2,<7.0',

0 commit comments

Comments
 (0)