Source: ipykernel
Version: 6.29.5-1
Severity: serious
User: debian-pyt...@lists.debian.org
Usertags: python3.13

Hi Maintainer

The autopkgtests of this package fail with Python 3.13 [1].  I've
copied what I hope is the relevant part of the log below.

Regards
Graham


[1] https://ci.debian.net/packages/i/ipykernel/testing/amd64/


136s =================================== FAILURES
===================================
136s ___________________________ test_embed_kernel_basic
____________________________
136s
136s @flaky(max_runs=3)
136s def test_embed_kernel_basic():
136s """IPython.embed_kernel() is basically functional"""
136s cmd = "\n".join(
136s [
136s "from IPython import embed_kernel",
136s "def go():",
136s " a=5",
136s ' b="hi there"',
136s " embed_kernel()",
136s "go()",
136s "",
136s ]
136s )
136s
136s > with setup_kernel(cmd) as client:
136s
136s tests/test_embed_kernel.py:109:
136s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _
136s /usr/lib/python3.13/contextlib.py:141: in __enter__
136s return next(self.gen)
136s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _
136s
136s cmd = 'from IPython import embed_kernel\ndef go():\n a=5\n b="hi
there"\n embed_kernel()\ngo()\n'
136s
136s @contextmanager
136s def setup_kernel(cmd):
136s """start an embedded kernel in a subprocess, and wait for it to be ready
136s
136s Returns
136s -------
136s kernel_manager: connected KernelManager instance
136s """
136s
136s def connection_file_ready(connection_file):
136s """Check if connection_file is a readable json file."""
136s if not os.path.exists(connection_file):
136s return False
136s try:
136s with open(connection_file) as f:
136s json.load(f)
136s return True
136s except ValueError:
136s return False
136s
136s kernel = Popen([sys.executable, "-c", cmd], stdout=PIPE,
stderr=PIPE, encoding="utf-8")
136s try:
136s connection_file = os.path.join(
136s paths.jupyter_runtime_dir(),
136s "kernel-%i.json" % kernel.pid,
136s )
136s # wait for connection file to exist, timeout after 5s
136s tic = time.time()
136s while (
136s not connection_file_ready(connection_file)
136s and kernel.poll() is None
136s and time.time() < tic + SETUP_TIMEOUT
136s ):
136s time.sleep(0.1)
136s
136s # Wait 100ms for the writing to finish
136s time.sleep(0.1)
136s
136s if kernel.poll() is not None:
136s o, e = kernel.communicate()
136s raise OSError("Kernel failed to start:\n%s" % e)
136s
136s if not os.path.exists(connection_file):
136s if kernel.poll() is None:
136s kernel.terminate()
136s > raise OSError("Connection file %r never arrived" % connection_file)
136s E OSError: Connection file
'/home/debci/.local/share/jupyter/runtime/kernel-4227.json' never
arrived
136s
136s tests/test_embed_kernel.py:74: OSError

Reply via email to