◐ Shell
clean mode source ↗

Message 165249 - Python tracker

> Serhiy: can you please explicitly list what issues your patch fixes?

issue12967. And sys.std* in IDLE lacks other common sys.std* methods and
attributes.

> I can think of many *more* issues that your patch doesn't fix, e.g. sys.stdin.read(sys) and sys.stdout.read().

sys.stdin.read(sys) and sys.stdout.read() should not work.

> I'm quite opposed to monkey-patching, so I won't commit any patch that involves monkey-patching (i.e. _checked_text_writer). I'm also unsure what problem this change to monkey-patching solves: I believe the current code is fine in this respect as it stands.

I introduced _checked_text_writer, because the implementation of
_RPCFile was broken (I wrote this patch last evening and debug it this
morning). In addition, _RPCFile is a wrapper around RPCFile, which
itself is a wrapper. There are too many layers for me. If you are sure
that the current implementation of _RPCFile is correct, it is not
necessary.

> Before you grow the patch to add many more lines of code, please try to stick to the "one issue at a time" principle.

In IDLE sys.std* bad mimic text streams -- this is one issue.