disable `_ipython_display_` in terminal IPython #10249

Merged
merged 2 commits into from Feb 7, 2017

Conversation

Projects
None yet
3 participants
@minrk
Member

minrk commented Feb 6, 2017

We already try to disable all formatters other than text/plain. The ipython_display formatter is not in that mime-type list, so it was not being disabled with the others.

closes #10247

disable `_ipython_display_` in terminal IPython
We already disable all formatters other than text/plain.
The ipython_display formatter is not in that list,
so it was not being disabled with the others.
@takluyver

This comment has been minimized.

Show comment
Hide comment
@takluyver

takluyver Feb 6, 2017

Member

Seems reasonable - I imagine objects with _ipython_display_ are not intending it for the terminal.

Test failure:

======================================================================
FAIL: Objects with _ipython_display_ defined bypass other formatters
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.6.0/lib/python3.6/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/travis/build/ipython/ipython/IPython/core/tests/test_formatters.py", line 419, in test_ipython_display_formatter
    nt.assert_equal(d, {})
AssertionError: {'text/plain': '<IPython.core.tests.test_f[80 chars]d0>'} != {}
Member

takluyver commented Feb 6, 2017

Seems reasonable - I imagine objects with _ipython_display_ are not intending it for the terminal.

Test failure:

======================================================================
FAIL: Objects with _ipython_display_ defined bypass other formatters
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.6.0/lib/python3.6/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/travis/build/ipython/ipython/IPython/core/tests/test_formatters.py", line 419, in test_ipython_display_formatter
    nt.assert_equal(d, {})
AssertionError: {'text/plain': '<IPython.core.tests.test_f[80 chars]d0>'} != {}

@takluyver takluyver added this to the 5.3 milestone Feb 7, 2017

@takluyver takluyver merged commit 1f44501 into ipython:master Feb 7, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@minrk

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Feb 7, 2017

Member

@takluyver thanks, fixed.

Member

minrk commented Feb 7, 2017

@takluyver thanks, fixed.

@minrk minrk deleted the minrk:plain-text-only-no-display branch Feb 7, 2017

@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau Feb 9, 2017

Member

@meeseeksdev backport to 5.x

Member

Carreau commented Feb 9, 2017

@meeseeksdev backport to 5.x

meeseeksdev bot pushed a commit that referenced this pull request Feb 9, 2017

Backport PR #10249: disable `_ipython_display_` in terminal IPython
We already try to disable all formatters other than text/plain. The ipython_display formatter is not in that mime-type list, so it was not being disabled with the others.

closes  10247

Carreau added a commit that referenced this pull request Feb 9, 2017

@Carreau Carreau added the backported label Feb 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment