-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Use io.BytesIO instead of io.StringIO in examples #6205
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
Conversation
@@ -52,7 +52,7 @@ | |||
ax.set_ylim(0., 1.) | |||
|
|||
# save the figure as a string in the svg format. | |||
from io import StringIO | |||
from six import StringIO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we use the internal six?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
er, no this is in the examples, we should not be teaching anyone to use our internal six.
I still think it'd be better to switch to |
👍 on less use of |
I've updated this (and the title of this issue) to use |
@@ -664,8 +664,9 @@ Here is an example using `Pillow <http://python-imaging.github.io/>`_. | |||
First, the figure is saved to a StringIO object which is then fed to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change here also.
Use io.BytesIO instead of io.StringIO in examples
backported to 1.5.1-doc as 40cfef1 |
Use io.BytesIO instead of io.StringIO in examples
Fixes #6201.