From 0cb0452b31431143ba22b7ad41bf4d3d9d878522 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Wed, 30 Jan 2019 14:21:10 -0600 Subject: [PATCH] Drop IPython<4.0 compat --- pandas/core/frame.py | 10 ---------- pandas/io/formats/console.py | 38 ------------------------------------ 2 files changed, 48 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 28c6f3c23a3ce..8735af840a029 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -640,16 +640,6 @@ def _repr_html_(self): Mainly for IPython notebook. """ - # qtconsole doesn't report its line width, and also - # behaves badly when outputting an HTML table - # that doesn't fit the window, so disable it. - # XXX: In IPython 3.x and above, the Qt console will not attempt to - # display HTML, so this check can be removed when support for - # IPython 2.x is no longer needed. - if console.in_qtconsole(): - # 'HTML output is disabled in QtConsole' - return None - if self._info_repr(): buf = StringIO(u("")) self.info(buf=buf) diff --git a/pandas/io/formats/console.py b/pandas/io/formats/console.py index d5ef9f61bc132..ad63b3efdd832 100644 --- a/pandas/io/formats/console.py +++ b/pandas/io/formats/console.py @@ -108,44 +108,6 @@ def check_main(): return check_main() -def in_qtconsole(): - """ - check if we're inside an IPython qtconsole - - .. deprecated:: 0.14.1 - This is no longer needed, or working, in IPython 3 and above. - """ - try: - ip = get_ipython() # noqa - front_end = ( - ip.config.get('KernelApp', {}).get('parent_appname', "") or - ip.config.get('IPKernelApp', {}).get('parent_appname', "")) - if 'qtconsole' in front_end.lower(): - return True - except NameError: - return False - return False - - -def in_ipnb(): - """ - check if we're inside an IPython Notebook - - .. deprecated:: 0.14.1 - This is no longer needed, or working, in IPython 3 and above. - """ - try: - ip = get_ipython() # noqa - front_end = ( - ip.config.get('KernelApp', {}).get('parent_appname', "") or - ip.config.get('IPKernelApp', {}).get('parent_appname', "")) - if 'notebook' in front_end.lower(): - return True - except NameError: - return False - return False - - def in_ipython_frontend(): """ check if we're inside an an IPython zmq frontend