Skip to content

Conversation

@ianthomas23
Copy link

Fixes #349.

It is possible to send an execute_request message too early to an ipykernel kernel, before it is ready to process that message. The recommendation is to send a kernel_info_request message first and wait for the reply, which is the change added here. There is some complicated logic in some jupyter libraries to deal with this which boils down to wait for the kernel_info_reply message and you will be OK.

Without the kernel_info_request it is possible to get timing-related errors. This has always been the case but is more likely now with ipykernel >= 7 as more resources (threads, ZMQ sockets) are created.

This fixes the problem for me locally on Linux, let's see if CI is happy with it.

I suspect there are other libraries downstream of ipykernel that also suffer from this, so I am hoping to make some changes to ipykernel to improve the situation. There are separate proposals to improve jupyter_server's handling of it, and to allow the kernel to push a "I am ready" notification rather than using kernel_info_request. But keeping the kernel_info_request here will never be wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nbsite currently does not work with ipykernel >= 7.0

1 participant