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

print_figure return base64 str instead of bytes #13162

Merged
merged 1 commit into from Sep 30, 2021

Conversation

minrk
Copy link
Member

@minrk minrk commented Sep 29, 2021

sending bytes relies on serializer's default functionality, where we can just send the right thing here. This used to be ambiguous on Python 2 when str is bytes, but not anymore.

This should also avoid jupyter/jupyter_client#702

@minrk
Copy link
Member Author

minrk commented Sep 29, 2021

I made it backward-compatible by leaving the default value as False in case there are any other callers of print_figure, even though we call it with True 100% of the time ourselves.

sending bytes relies on serializer's `default` functionality,
where we can just send the right thing here

this used to be ambiguous on Python 2, but not anymore
@Carreau Carreau added this to the 7.29 milestone Sep 30, 2021
@Carreau Carreau merged commit 1d1ab2a into ipython:master Sep 30, 2021
meeseeksmachine pushed a commit to meeseeksmachine/ipython that referenced this pull request Sep 30, 2021
Carreau added a commit that referenced this pull request Oct 3, 2021
…162-on-7.x

Backport PR #13162 on branch 7.x (print_figure return base64 str instead of bytes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants