Skip to content

Conversation

@fleming79
Copy link
Owner

No description provided.

@fleming79 fleming79 added the enhancement New feature or request label Sep 15, 2025
@codecov-commenter
Copy link

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
383 1 382 0
View the top 1 failed test(s) by shortest run time
tests/test_debugger.py::test_debugger[async-trio]
Stack Traces | 63s run time
delay = 20, shield = False

    @contextmanager
    def fail_after(
        delay: float | None, shield: bool = False
    ) -> Generator[CancelScope, None, None]:
        """
        Create a context manager which raises a :class:`TimeoutError` if does not finish in
        time.
    
        :param delay: maximum allowed time (in seconds) before raising the exception, or
            ``None`` to disable the timeout
        :param shield: ``True`` to shield the cancel scope from external cancellation
        :return: a context manager that yields a cancel scope
        :rtype: :class:`~typing.ContextManager`\\[:class:`~anyio.CancelScope`\\]
    
        """
        current_time = get_async_backend().current_time
        deadline = (current_time() + delay) if delay is not None else math.inf
        with get_async_backend().create_cancel_scope(
            deadline=deadline, shield=shield
        ) as cancel_scope:
>           yield cancel_scope

cancel_scope = <anyio._backends._asyncio.CancelScope object at 0x7f0e70ce8bf0>
current_time = <bound method AsyncIOBackend.current_time of <class 'anyio._backends._asyncio.AsyncIOBackend'>>
deadline   = 243.835966334
delay      = 20
shield     = False

.venv/lib/python3.12.../anyio/_core/_tasks.py:115: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/utils.py:44: in get_reply
    reply = await client.get_control_msg(timeout=timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        channel    = 'control'
        clear_pub  = True
        client     = <jupyter_client.asynchronous.client.AsyncKernelClient object at 0x7f0e70d280b0>
        msg_id     = '25798558-057c478b64222f4f9abdb11e_2213_14'
        timeout    = 20
.venv/lib/python3.12.../site-packages/jupyter_client/client.py:155: in _async_get_control_msg
    return await ensure_async(self.control_channel.get_msg(*args, **kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        args       = ()
        kwargs     = {'timeout': 20}
        self       = <jupyter_client.asynchronous.client.AsyncKernelClient object at 0x7f0e70d280b0>
.venv/lib/python3.12.../jupyter_core/utils/__init__.py:197: in ensure_async
    result = await obj
             ^^^^^^^^^
        obj        = <coroutine object AsyncZMQSocketChannel.get_msg at 0x7f0e71051f30>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <jupyter_client.channels.AsyncZMQSocketChannel object at 0x7f0e70d28cb0>
timeout = 20

    async def get_msg(  # type:ignore[override]
        self, timeout: t.Optional[float] = None
    ) -> t.Dict[str, t.Any]:
        """Gets a message if there is one that is ready."""
        assert self.socket is not None
        timeout_ms = None if timeout is None else int(timeout * 1000)  # seconds to ms
>       ready = await self.socket.poll(timeout_ms)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       asyncio.exceptions.CancelledError: Cancelled by cancel scope 7f0e70ce8bf0

self       = <jupyter_client.channels.AsyncZMQSocketChannel object at 0x7f0e70d28cb0>
timeout    = 20
timeout_ms = 20000

.venv/lib/python3.12.../site-packages/jupyter_client/channels.py:308: CancelledError

During handling of the above exception, another exception occurred:

subprocess_kernels_client = <jupyter_client.asynchronous.client.AsyncKernelClient object at 0x7f0e70d280b0>

    async def test_debugger(subprocess_kernels_client):
        client = subprocess_kernels_client
>       reply = await send_debug_request(client=client, command="initialize", arguments=initialize_args)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

client     = <jupyter_client.asynchronous.client.AsyncKernelClient object at 0x7f0e70d280b0>
subprocess_kernels_client = <jupyter_client.asynchronous.client.AsyncKernelClient object at 0x7f0e70d280b0>

tests/test_debugger.py:62: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_debugger.py:47: in send_debug_request
    reply = await utils.send_control_message(
        arguments  = {'adapterID': '', 'clientID': 'test-client', 'clientName': 'testClient', 'columnsStartAt1': True, ...}
        client     = <jupyter_client.asynchronous.client.AsyncKernelClient object at 0x7f0e70d280b0>
        command    = 'initialize'
        seq        = 42
tests/utils.py:162: in send_control_message
    return await get_reply(client, msg["header"]["msg_id"], channel="control", clear_pub=clear_pub)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        clear_pub  = True
        client     = <jupyter_client.asynchronous.client.AsyncKernelClient object at 0x7f0e70d280b0>
        content    = {'arguments': {'adapterID': '', 'clientID': 'test-client', 'clientName': 'testClient', 'columnsStartAt1': True, ...}, 'command': 'initialize', 'seq': 42, 'type': 'request'}
        msg        = {'content': {'arguments': {'adapterID': '', 'clientID': 'test-client', 'clientName': 'testClient', 'columnsStartAt1': ... '25798558-057c478b64222f4f9abdb11e', ...}, 'metadata': {}, 'msg_id': '25798558-057c478b64222f4f9abdb11e_2213_14', ...}
        msg_type   = <MsgType.debug_request: 'debug_request'>
        reply      = True
tests/utils.py:38: in get_reply
    with anyio.fail_after(timeout):
        channel    = 'control'
        clear_pub  = True
        client     = <jupyter_client.asynchronous.client.AsyncKernelClient object at 0x7f0e70d280b0>
        msg_id     = '25798558-057c478b64222f4f9abdb11e_2213_14'
        timeout    = 20
.../usr/lib/python3.12/contextlib.py:158: in __exit__
    self.gen.throw(value)
        self       = <contextlib._GeneratorContextManager object at 0x7f0e70ceb140>
        traceback  = <traceback object at 0x7f0e704e1b80>
        typ        = <class 'asyncio.exceptions.CancelledError'>
        value      = CancelledError('Cancelled by cancel scope 7f0e70ce8bf0')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

delay = 20, shield = False

    @contextmanager
    def fail_after(
        delay: float | None, shield: bool = False
    ) -> Generator[CancelScope, None, None]:
        """
        Create a context manager which raises a :class:`TimeoutError` if does not finish in
        time.
    
        :param delay: maximum allowed time (in seconds) before raising the exception, or
            ``None`` to disable the timeout
        :param shield: ``True`` to shield the cancel scope from external cancellation
        :return: a context manager that yields a cancel scope
        :rtype: :class:`~typing.ContextManager`\\[:class:`~anyio.CancelScope`\\]
    
        """
        current_time = get_async_backend().current_time
        deadline = (current_time() + delay) if delay is not None else math.inf
        with get_async_backend().create_cancel_scope(
            deadline=deadline, shield=shield
        ) as cancel_scope:
            yield cancel_scope
    
        if cancel_scope.cancelled_caught and current_time() >= cancel_scope.deadline:
>           raise TimeoutError
E           TimeoutError

cancel_scope = <anyio._backends._asyncio.CancelScope object at 0x7f0e70ce8bf0>
current_time = <bound method AsyncIOBackend.current_time of <class 'anyio._backends._asyncio.AsyncIOBackend'>>
deadline   = 243.835966334
delay      = 20
shield     = False

.venv/lib/python3.12.../anyio/_core/_tasks.py:118: TimeoutError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@fleming79 fleming79 merged commit c812974 into main Sep 15, 2025
28 of 31 checks passed
@fleming79 fleming79 deleted the caller-get-runner branch September 15, 2025 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants