Skip to content

Conversation

@ianthomas23
Copy link
Collaborator

This is an implementation of subshells on the 6.x branch, as highlighted in #1387.

It is based on the implementation on the main branch except that it is built on the existing tornado io_loops rather than anyio. The architecture of classes, threads and zmq sockets is the same, with pairs of sockets used for communication between threads. The implementation is simpler as rather than using anyio tasks and task queues, we use ZMQStreams which call an on_recv callback whenever a message is received on the contained socket.

From other projects' point of the view the major change here is not subshells, which don't have to be used, but it is the addition of a new thread to receive messages on the shell channel, which are routed to the appropriate subshell (or main shell thread). This makes it more responsive, and could potentially cause different behaviour in downstream projects depending on how it is used.

Although this is based on the 6.x branch there has been some discussion about whether this might be released as 6.30.0 or as 7.0.0.

This passes CI for me locally on both linux and macOS, we'll have to see what problems arise in CI.

@ianthomas23 ianthomas23 force-pushed the 6.x-subshells branch 6 times, most recently from 08b15d3 to c89844f Compare June 3, 2025 10:01
@ianthomas23 ianthomas23 force-pushed the 6.x-subshells branch 2 times, most recently from 3106e2a to c90ab05 Compare June 4, 2025 08:31
@ianthomas23
Copy link
Collaborator Author

All tests pass!

@ianthomas23 ianthomas23 merged commit 5d90d9e into ipython:6.x Jun 5, 2025
58 of 60 checks passed
@ianthomas23 ianthomas23 deleted the 6.x-subshells branch June 5, 2025 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants