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

Use _repr_mimebundle_ instead of _ipython_display_ message for initial display #1986

Closed

Conversation

SylvainCorlay
Copy link
Member

@SylvainCorlay SylvainCorlay commented Feb 27, 2018

I guess this is up to debate, but using the execute_result message instead of display_data enables the display of the prompt number like for other types of outputs.

screen shot 2018-02-27 at 8 16 37 pm

cc @Carreau @jasongrout

@SylvainCorlay
Copy link
Member Author

(Test failures are expected, will fix if we decide to go this way)

@SylvainCorlay
Copy link
Member Author

I wonder if there is a means to specify raw=True, or if it is even necessary for display_mime_bundle. @Carreau would probably know.

@jasongrout
Copy link
Member

See #1811 (comment) - we can't do this just yet because of backwards compatibility.

However, see #1811 (comment) for a workaround that might work until we can assume ipython 6.1.

@jasongrout jasongrout changed the title Use execute_result instead of display_data message for initial display Use _repr_mimebundle_ instead of _ipython_display_ message for initial display Feb 27, 2018
@jasongrout
Copy link
Member

(fixed the description to match the code :).

@jasongrout
Copy link
Member

(And yes, I think we should definitely move to _repr_mimebundle_ when we can)

@jasongrout jasongrout added this to the Future milestone Feb 27, 2018
@SylvainCorlay
Copy link
Member Author

SylvainCorlay commented Feb 28, 2018

OK, I am working on the rich display mechanism for xeus-cling and I was wondering why widgets never used the execute_result message. Thanks for the pointer.

The xeus-cling rich display will only have the counterpart to _repr_mime_bundle_ from the start for all objects that have a rich representation.

@jasongrout
Copy link
Member

The xeus-cling rich display will only have the counterpart to repr_mime_bundle from the start for all objects that have a rich representation.

Great!

@jasongrout jasongrout modified the milestones: Future, Major release Mar 19, 2018
@jasongrout
Copy link
Member

However, see #1811 (comment) for a workaround that might work until we can assume ipython 6.1.

This won't work after all.

(And yes, I think we should definitely move to repr_mimebundle when we can)

Likely in ipywidgets 8.

@jasongrout
Copy link
Member

This PR is superseded by #2021

@jasongrout jasongrout closed this Mar 28, 2018
@jasongrout jasongrout modified the milestones: Major release, Reference Mar 28, 2018
@SylvainCorlay SylvainCorlay deleted the execute_result branch July 14, 2018 19:51
@lock lock bot added the resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label May 21, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants