tweepy/tweepy — pull request #449 by 7kry (2014-06-13 09:15:56+00:00)
Title: Fix tweepy.API.update_with_media

If filename is an instance of `unicode',
L.76 `` 'Content-Disposition: form-data; name="%s"; filename="%s"' % (form_field, filename) ''
must be unicode string like following.

----pprinting of `body'----
['--Tw3ePy',
u'Content-Disposition: form-data; name="media[]"; filename="/tmp/tmpBirD24-memo.png"',
'Content-Type: image/png',
'',
'\x89PNG\r\n(binary)'
'--Tw3ePy--',
'']
-----------------

Because of it, L. 803 `` body = '\r\n'.join(body) '' fails with UnicodeDecodeError.

Therefore, I made `filename' designed to be percent-encoded str
before formatting.