From 5b28f36a109f972996c61ade3417e33303ce22ad Mon Sep 17 00:00:00 2001 From: Matthew Turk Date: Wed, 8 Feb 2023 10:55:28 -0600 Subject: [PATCH 1/2] Return Comm rather than BaseComm from create_comm --- ipykernel/ipkernel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipykernel/ipkernel.py b/ipykernel/ipkernel.py index bacb0ba7..c5f7b705 100644 --- a/ipykernel/ipkernel.py +++ b/ipykernel/ipkernel.py @@ -17,7 +17,7 @@ from traitlets import Any, Bool, HasTraits, Instance, List, Type, observe, observe_compat from zmq.eventloop.zmqstream import ZMQStream -from .comm.comm import BaseComm +from .comm.comm import Comm from .comm.manager import CommManager from .compiler import XCachingCompiler from .debugger import Debugger, _is_debugpy_available @@ -45,7 +45,7 @@ def _create_comm(*args, **kwargs): """Create a new Comm.""" - return BaseComm(*args, **kwargs) + return Comm(*args, **kwargs) # there can only be one comm manager in a ipykernel process From 2587d8ae68dde48d6606f2e795b1c0961504744a Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 8 Feb 2023 11:26:51 -0600 Subject: [PATCH 2/2] lint --- ipykernel/ipkernel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipykernel/ipkernel.py b/ipykernel/ipkernel.py index c5f7b705..521dcd8f 100644 --- a/ipykernel/ipkernel.py +++ b/ipykernel/ipkernel.py @@ -29,7 +29,7 @@ try: from IPython.core.interactiveshell import _asyncio_runner # type:ignore[attr-defined] except ImportError: - _asyncio_runner = None + _asyncio_runner = None # type:ignore try: from IPython.core.completer import provisionalcompleter as _provisionalcompleter @@ -626,7 +626,7 @@ def do_apply(self, content, bufs, msg_id, reply_metadata): try: from ipyparallel.serialize import serialize_object, unpack_apply_message except ImportError: - from .serialize import serialize_object, unpack_apply_message # type:ignore + from .serialize import serialize_object, unpack_apply_message shell = self.shell try: