Skip to content

Handling a comms message has side effects #432

Open

Description

@impact27

When handling comms messages, the kernel calls shell.events.trigger('pre_execute') and self.shell.callbacks.fire('post_execute'). This limits the utility of comms messages as sending a comms message to the kernel has quite substantial side effects. For example, any pending matplotlib figure are plotted as soon as a comms message is received. I am using comms in spyder to communicate between the kernel and the frontend. Is there a reason why pre/post_execute need to be triggered when handling a generic comms message?
I am using monkey-patching to remove these calls in spyder, and I was wondering if this is something that should be fixed upstream.

Line for ref:

shell.events.trigger('post_execute')

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions