kennethreitz/requests — pull request #1661 by mattspitz (2013-10-10 18:57:41+00:00)
Title: Increasing super_len compatibilty to include BytesIO and cStringIO objects.

Added a check for 'getvalue' attr, calling it to retrieve the length if we can.

We also try/except the fileno() call, which can throw
io.UnsupportedOperation for BytesIO because, well, they're not files.

And a unit test!