Logged In: YES user_id=357491 The file object's readinto method is not meant for public use, so adding the method to StringIO is not a good idea. Sorry. Closing as rejected.
BufferedReader assumes that readinto is defined, but that's not the case for StringIO's. In the end, this cripples StringIO objects, because their data can never be peek()'ed as with all other file objects.
It affects SpooledTemporaryFile too. Because it switches between StringIO, BytesIO and TemporaryFile internally. Only StringIO have not this interface. Discovered trying to `pickle.load` a remote storage file. Please reopen.
Issued a related PR (https://github.com/python/cpython/pull/8451) to allow SpooledTemporaryFile to propagate `readinto` calls to TemporaryFile, BytesIO or StringIO. Of this ones, only StringIO will fail.