Skip to content

Deprecate detection of IPython frontends #7499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 24, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pandas/core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2599,6 +2599,8 @@ def check_main():
def in_qtconsole():
"""
check if we're inside an IPython qtconsole

DEPRECATED: This is no longer needed, or working, in IPython 3 and above.
"""
try:
ip = get_ipython()
Expand All @@ -2616,6 +2618,9 @@ def in_qtconsole():
def in_ipnb():
"""
check if we're inside an IPython Notebook

DEPRECATED: This is no longer used in pandas, and won't work in IPython 3
and above.
"""
try:
ip = get_ipython()
Expand Down
8 changes: 3 additions & 5 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,14 +470,12 @@ def _repr_html_(self):
Return a html representation for a particular DataFrame.
Mainly for IPython notebook.
"""
# ipnb in html repr mode allows scrolling
# users strongly prefer to h-scroll a wide HTML table in the browser
# then to get a summary view. GH3541, GH3573
ipnbh = com.in_ipnb() and get_option('display.notebook_repr_html')

# qtconsole doesn't report it's 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 com.in_qtconsole():
# 'HTML output is disabled in QtConsole'
return None
Expand Down