1
Vote

_ReplOutput has no buffer member on Python 3

description

Running pip in the interactive window (eg. pip.main(['install', 'azure'])) fails because it tries to call sys.stdout.buffer.write.

comments

Zooba wrote Mar 20 at 11:21 PM

The code needed for this is:
class _ReplOutput(object):
    ...

    @property
    def buffer(self):
        return os.fdopen(self.fileno(), 'wb')
However, there are many issues with projection buffers that occur if you then run this code in the repl window:
>>> import sys
>>> sys.stdout.buffer.write(b'abc\n')
These need to be resolved before we can add the property.