From 9563f89fcbb28cddba961c05c8dc0f3121e01eee 2014-11-01 23:41:04 From: MinRK Date: 2014-11-01 23:41:04 Subject: [PATCH] msgspec: stream.data -> stream.text --- diff --git a/IPython/html/nbconvert/tests/test_nbconvert_handlers.py b/IPython/html/nbconvert/tests/test_nbconvert_handlers.py index 4fb2705..6ef4473 100644 --- a/IPython/html/nbconvert/tests/test_nbconvert_handlers.py +++ b/IPython/html/nbconvert/tests/test_nbconvert_handlers.py @@ -57,7 +57,7 @@ class APITest(NotebookTestBase): nb.cells.append(new_heading_cell(u'Created by test ³')) cc1 = new_code_cell(source=u'print(2*6)') - cc1.outputs.append(new_output(output_type="stream", data=u'12')) + cc1.outputs.append(new_output(output_type="stream", text=u'12')) cc1.outputs.append(new_output(output_type="execute_result", mime_bundle={'image/png' : png_green_pixel}, execution_count=1, diff --git a/IPython/html/static/notebook/js/outputarea.js b/IPython/html/static/notebook/js/outputarea.js index 81c49ed..aa970ee 100644 --- a/IPython/html/static/notebook/js/outputarea.js +++ b/IPython/html/static/notebook/js/outputarea.js @@ -453,7 +453,7 @@ define([ OutputArea.prototype.append_stream = function (json) { - var text = json.data; + var text = json.text; var subclass = "output_"+json.name; if (this.outputs.length > 0){ // have at least one output to consider @@ -462,9 +462,9 @@ define([ // latest output was in the same stream, // so append directly into its pre tag // escape ANSI & HTML specials: - last.data = utils.fixCarriageReturn(last.data + json.data); + last.text = utils.fixCarriageReturn(last.text + json.text); var pre = this.element.find('div.'+subclass).last().find('pre'); - var html = utils.fixConsole(last.data); + var html = utils.fixConsole(last.text); // The only user content injected with this HTML call is // escaped by the fixConsole() method. pre.html(html); diff --git a/IPython/nbformat/v4/nbbase.py b/IPython/nbformat/v4/nbbase.py index 9184a36..7dca86a 100644 --- a/IPython/nbformat/v4/nbbase.py +++ b/IPython/nbformat/v4/nbbase.py @@ -80,7 +80,7 @@ def output_from_msg(msg): elif msg_type == 'stream': return new_output(output_type=msg_type, name=content['name'], - data=content['data'], + text=content['text'], ) elif msg_type == 'display_data': return new_output(output_type=msg_type,