From 65eaef68a5a2689c60a38daf09ea4b3a7a2bc599 Mon Sep 17 00:00:00 2001 From: Michael Penkov Date: Mon, 1 Oct 2018 21:38:28 +0900 Subject: [PATCH] Fix #9343: warn when using HTML instead of IFrame --- IPython/core/display.py | 5 +++++ IPython/core/tests/test_display.py | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/IPython/core/display.py b/IPython/core/display.py index ca5c3aa5b86..4a2e2817910 100644 --- a/IPython/core/display.py +++ b/IPython/core/display.py @@ -666,6 +666,11 @@ def _repr_pretty_(self, pp, cycle): class HTML(TextDisplayObject): + def __init__(self, data=None, url=None, filename=None, metadata=None): + if data and "') + m_warn.assert_called_with('Consider using IPython.display.IFrame instead') + def test_progress(): p = display.ProgressBar(10) nt.assert_in('0/10',repr(p))