Skip to content

Commit

Permalink
Drop IPython<4.0 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAugspurger committed Jan 30, 2019
1 parent b9f2e2b commit 0cb0452
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 48 deletions.
10 changes: 0 additions & 10 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
38 changes: 0 additions & 38 deletions pandas/io/formats/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0cb0452

Please sign in to comment.