Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPykernel 7 compatibility #895

Closed
Carreau opened this issue Oct 15, 2024 · 6 comments · Fixed by #898
Closed

IPykernel 7 compatibility #895

Carreau opened this issue Oct 15, 2024 · 6 comments · Fixed by #898

Comments

@Carreau
Copy link
Member

Carreau commented Oct 15, 2024

It looks like ipyparallel is not compatible with ipykernel 7,

Unfortunately I've not been following the development, and the previous maintainer stepped down a few month ago, and I'm afraid of the 6.x and 7.x branch diverging.

I would love to get some help get the downstream testing passing on all projects that depends on ipykernel.

cf ipython/ipykernel#1222

@minrk
Copy link
Member

minrk commented Oct 15, 2024

Thanks, I think I can work on this this week.

@minrk
Copy link
Member

minrk commented Oct 21, 2024

I think I've tracked it down to the incomplete assumption of async sockets in the updates to IOThread. Looking into more detail, but I think the fix belongs in ipykernel because there's a mixture of sync and async use of sockets, relying on the assumption that async zmq sends are eager and don't need to be awaited.

@Carreau
Copy link
Member Author

Carreau commented Oct 21, 2024

I do trust you, I haven't followed what has append in ipykernel, and I'm mostly trying to not have everything fall appart.

@minrk
Copy link
Member

minrk commented Oct 21, 2024

Looks like it's a little more complicated than that in that ipyparallel relied on support for shell_streams as a list of sockets on which to handle shell messages, and either the anyio or subshell work removed the ability to handle multiple sockets. That will probably need at least some work on this side, possibly both.

@minrk
Copy link
Member

minrk commented Oct 21, 2024

Thinking out loud about how to address the single socket issue

Two choices are:

  1. restore support for a list of shell sockets in ipykernel. This makes less sense for ipykernel now that control has its own special handling, and is prone to feature removal, as has been done in ipykernel main
  2. let ipykernel keep a single socket, and implement a simple proxy in ipyparallel to funnel down to the single socket. This will perhaps be the easiest to maintain because ipykernel doesn't need to support a feature it doesn't use, at the expense of adding an inproc socket hop on top of the one already added for subshells.

I'm leaning toward the latter, which I think wouldn't need any change from ipykernel

@minrk
Copy link
Member

minrk commented Oct 22, 2024

I was wrong about that, ipyparallel uses one socket connected to multiple URLs, so setting shell_socket works okay

@minrk minrk changed the title IPykernel 7 compatibility. IPykernel 7 compatibility Oct 22, 2024
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 a pull request may close this issue.

2 participants