Oren Milman <ore...@gmail.com> added the comment: I am not sure, but ISTM that it isn't possible for the encoder to return a unicode and not fail later. This is because _textiowrapper_writeflush() would call _io.BytesIO.write() (after it called _PyBytes_Join()), and bytesio_write() calls PyObject_GetBuffer(), which would raise "TypeError: 'unicode' does not have the buffer interface".
---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31271> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com