matplotlib/matplotlib — pull request #2898 by bytbox (2014-03-14 09:15:59+00:00)
Title: Fix #1891

Three changes: use 'y#' in python 3, ignore errors from AsFileDescriptor (to allow use of BytesIO and similarly brain-dead objects as the target), and don't require setting of the position of the file handle to succeed (so that we can use streams).