3030
3131from traitlets .config .configurable import SingletonConfigurable
3232from IPython .core .error import StdinNotImplementedError
33- from ipykernel .jsonutil import json_clean
3433from traitlets import (
3534 Any , Instance , Float , Dict , List , Set , Integer , Unicode , Bool ,
3635 observe , default
@@ -656,7 +655,6 @@ async def execute_request(self, stream, ident, parent):
656655 time .sleep (self ._execute_sleep )
657656
658657 # Send the reply.
659- reply_content = json_clean (reply_content )
660658 metadata = self .finish_metadata (parent , metadata , reply_content )
661659
662660 reply_msg = self .session .send (stream , 'execute_reply' ,
@@ -683,7 +681,6 @@ async def complete_request(self, stream, ident, parent):
683681 if inspect .isawaitable (matches ):
684682 matches = await matches
685683
686- matches = json_clean (matches )
687684 self .session .send (stream , "complete_reply" , matches , parent , ident )
688685
689686 def do_complete (self , code , cursor_pos ):
@@ -706,7 +703,6 @@ async def inspect_request(self, stream, ident, parent):
706703 reply_content = await reply_content
707704
708705 # Before we send this object over, we scrub it for JSON usage
709- reply_content = json_clean (reply_content )
710706 msg = self .session .send (stream , 'inspect_reply' ,
711707 reply_content , parent , ident )
712708 self .log .debug ("%s" , msg )
@@ -723,7 +719,6 @@ async def history_request(self, stream, ident, parent):
723719 if inspect .isawaitable (reply_content ):
724720 reply_content = await reply_content
725721
726- reply_content = json_clean (reply_content )
727722 msg = self .session .send (stream , 'history_reply' ,
728723 reply_content , parent , ident )
729724 self .log .debug ("%s" , msg )
@@ -813,7 +808,6 @@ async def is_complete_request(self, stream, ident, parent):
813808 reply_content = self .do_is_complete (code )
814809 if inspect .isawaitable (reply_content ):
815810 reply_content = await reply_content
816- reply_content = json_clean (reply_content )
817811 reply_msg = self .session .send (stream , 'is_complete_reply' ,
818812 reply_content , parent , ident )
819813 self .log .debug ("%s" , reply_msg )
@@ -829,7 +823,6 @@ async def debug_request(self, stream, ident, parent):
829823 reply_content = self .do_debug_request (content )
830824 if inspect .isawaitable (reply_content ):
831825 reply_content = await reply_content
832- reply_content = json_clean (reply_content )
833826 reply_msg = self .session .send (stream , 'debug_reply' , reply_content ,
834827 parent , ident )
835828 self .log .debug ("%s" , reply_msg )
@@ -1001,7 +994,7 @@ def _input_request(self, prompt, ident, parent, password=False):
1001994 raise
1002995
1003996 # Send the input request.
1004- content = json_clean ( dict (prompt = prompt , password = password ) )
997+ content = dict (prompt = prompt , password = password )
1005998 self .session .send (self .stdin_socket , 'input_request' , content , parent ,
1006999 ident = ident )
10071000
0 commit comments