Skip to content
Permalink
Browse files

Drop IPython<4.0 compat

  • Loading branch information...
TomAugspurger committed Jan 30, 2019
1 parent b9f2e2b commit 0cb0452b31431143ba22b7ad41bf4d3d9d878522
Showing with 0 additions and 48 deletions.
  1. +0 −10 pandas/core/frame.py
  2. +0 −38 pandas/io/formats/console.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)
@@ -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

0 comments on commit 0cb0452

Please sign in to comment.
You can’t perform that action at this time.