You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that Jupyter notebook will append a "\n" to any base64 encoded data in the output of the cell. This does not cause problems, except that VScode-jupyter strips the "\n".
This results in excessively large diffs when Jupyter notebook and vsccde-jupyter are used on the same codebase. I understand that Jupyter was there first, but to me not having the extra "\n" feels like a better solution than having it. Unless I'm missing a good reason for having it, would it be possible to not add this trailing "\n"?
In my understanding the "\n" is introduced by calling b2a_base64 from session.py:json_default:
Since python 3.6 b2a_base64() accepts a newline=True argument.
The description of the function in 3.5 documentation is:
binascii.b2a_base64(data)
Convert binary data to a line of ASCII characters in base64 coding. The return value is the converted line, including a newline char.
The newline is added because the original use case for this function was to feed it a series of 57 byte input lines to get output lines
that conform to the MIME-base64 standard. Otherwise the output conforms to RFC 3548.
Would it be possible to not include that extra newline by passing newline=False to b2a_base64()?
…13941)
This addresses the issue highlighted in
jupyter/jupyter_client#930
Since, unlike the latest Jupyter, IPython aims to support python<3.6,
I'm using an approach that won't break this compatibility.
I've noticed that Jupyter notebook will append a "\n" to any base64 encoded data in the output of the cell. This does not cause problems, except that VScode-jupyter strips the "\n".
This results in excessively large diffs when Jupyter notebook and vsccde-jupyter are used on the same codebase. I understand that Jupyter was there first, but to me not having the extra "\n" feels like a better solution than having it. Unless I'm missing a good reason for having it, would it be possible to not add this trailing "\n"?
In my understanding the "\n" is introduced by calling b2a_base64 from
session.py:json_default
:Since python 3.6 b2a_base64() accepts a
newline=True
argument.The description of the function in 3.5 documentation is:
Would it be possible to not include that extra newline by passing
newline=False
tob2a_base64()
?To reptoduce:
results in
The text was updated successfully, but these errors were encountered: