10000 Fixes for File Saving in Webagg by blink1073 · Pull Request #3981 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Fixes for File Saving in Webagg #3981

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

Merged
merged 3 commits into from
Jan 8, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update docstring
  • Loading branch information
blink1073 committed Jan 8, 2015
commit 2f20e82f764f511d80a8aca051a1ef5224fb9e04
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/backend_webagg.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def get(self, fignum, fmt):

self.set_header('Content-Type', mimetypes.get(fmt, 'binary'))

# override fileno to raise AttributeError so PIL doesn't error
# override fileno to raise AttributeError to prevent PIL error
class BytesIO(io.BytesIO):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be laundered through six? https://pythonhosted.org/six/#six.BytesIO

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, that might actually solve both problems...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, pgf would still require some gymnastics (I don't think its worth it).

@property
def fileno(self):
Expand Down
0