Skip to content
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

disable `_ipython_display_` in terminal IPython #10249

Merged
merged 2 commits into from Feb 7, 2017

Conversation

@minrk
Copy link
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

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
Copy link
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
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@minrk
Copy link
Member Author

minrk commented Feb 7, 2017

@takluyver thanks, fixed.

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

Carreau commented Feb 9, 2017

@meeseeksdev backport to 5.x

meeseeksdev bot pushed a commit that referenced this pull request Feb 9, 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
Carreau added a commit that referenced this pull request Feb 9, 2017
Backport PR #10249 on branch 5.x
@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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.