[issue15318] IDLE - sys.stdin is writeable

2012-07-25 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue15318] IDLE - sys.stdin is writeable

2012-07-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset fa7d4ecc6357 by Martin v. Löwis in branch '2.7': Issue #15318: Prevent writing to sys.stdin. http://hg.python.org/cpython/rev/fa7d4ecc6357 -- ___ Python tracker _

[issue15318] IDLE - sys.stdin is writeable

2012-07-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset a82fd35e28be by Martin v. Löwis in branch '3.2': Issue #15318: Prevent writing to sys.stdin. http://hg.python.org/cpython/rev/a82fd35e28be -- nosy: +python-dev ___ Python tracker

[issue15318] IDLE - sys.stdin is writeable

2012-07-12 Thread Roger Serwy
Roger Serwy added the comment: sys.stdin.write('qwe') > Traceback (most recent call last): >File "", line 1, in > io.UnsupportedOperation: not writable > > -- I'm passing a number, *not* a string. -- ___ Python tracker

[issue15318] IDLE - sys.stdin is writeable

2012-07-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >>> sys.stdin.write('qwe') Traceback (most recent call last): File "", line 1, in io.UnsupportedOperation: not writable -- ___ Python tracker

[issue15318] IDLE - sys.stdin is writeable

2012-07-12 Thread Roger Serwy
Roger Serwy added the comment: On 07/12/2012 04:13 AM, Serhiy Storchaka wrote: > Serhiy Storchaka added the comment: > >> sys.stdin.write returns the wrong error message when passed a non-string. >> Presently it returns io.UnsupportedOperation instead of TypeError: must be >> str, not ... > I

[issue15318] IDLE - sys.stdin is writeable

2012-07-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Ah. See blockfiles-3.diff then. Well, I have no objections. Patch fixes this issue. > Where do you see that? In my patch, _RPCInputFile inherits from > _RPCFile, which is neither output nor input. Instead, _RPCOutputFile > also inherits from _RPCFile. I m

[issue15318] IDLE - sys.stdin is writeable

2012-07-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > sys.stdin.write returns the wrong error message when passed a non-string. > Presently it returns io.UnsupportedOperation instead of TypeError: must be > str, not ... It's not a bug. sys.stdin.write raises io.UnsupportedOperation in standard interpreter.

[issue15318] IDLE - sys.stdin is writeable

2012-07-11 Thread Roger Serwy
Roger Serwy added the comment: I tested blockfile-3.diff against the latest code in the repository. sys.stdin.write returns the wrong error message when passed a non-string. Presently it returns io.UnsupportedOperation instead of TypeError: must be str, not ... The attached blockfile-4.diff

[issue15318] IDLE - sys.stdin is writeable

2012-07-11 Thread Martin v . Löwis
Martin v. Löwis added the comment: > I already got confused with all these closing/reopening/renaming of > issues and floating code. Should I open my own issue even if it > duplicates and supersedes some other? I personally think it would be best if these issues where closed *first*, and only t

[issue15318] IDLE - sys.stdin is writeable

2012-07-11 Thread Martin v . Löwis
Changes by Martin v. Löwis : Added file: http://bugs.python.org/file26361/blockfile-3.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue15318] IDLE - sys.stdin is writeable

2012-07-11 Thread Martin v . Löwis
Changes by Martin v. Löwis : Removed file: http://bugs.python.org/file26360/blockfile-3.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue15318] IDLE - sys.stdin is writeable

2012-07-11 Thread Martin v . Löwis
Changes by Martin v. Löwis : Added file: http://bugs.python.org/file26360/blockfile-3.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue15318] IDLE - sys.stdin is writeable

2012-07-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > In any case,*this* issue is about sys.stdin being writable. I already got confused with all these closing/reopening/renaming of issues and floating code. Should I open my own issue even if it duplicates and supersedes some other? > Any objection to checkin

[issue15318] IDLE - sys.stdin is writeable

2012-07-11 Thread Martin v . Löwis
Martin v. Löwis added the comment: "implements textio badly" is *not* a well-defined issue. First it is a personal judgement: some think it's really bad, some think it's quite ok. More importantly, such issue has no clear success criterion: how do we know we are done - can we hope to EVER cl

[issue15318] IDLE - sys.stdin is writeable

2012-07-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: issue7163 is another PseudoFile-related issue. -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue15318] IDLE - sys.stdin is writeable

2012-07-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: issue9290 also has relation to this. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue15318] IDLE - sys.stdin is writeable

2012-07-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > As an additional note: the change to monkey-patching breaks the test > > isinstance(sys.stdout, io.TextIOBase) > > which currently succeeds. Agree, this is a regression. However isinstance(sys.stdout, io.TextIOBase) is False now in no-subprocess mode. Th

[issue15318] IDLE - sys.stdin is writeable

2012-07-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > 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.s

[issue15318] IDLE - sys.stdin is writeable

2012-07-11 Thread Martin v . Löwis
Martin v. Löwis added the comment: As an additional note: the change to monkey-patching breaks the test isinstance(sys.stdout, io.TextIOBase) which currently succeeds. -- ___ Python tracker

[issue15318] IDLE - sys.stdin is writeable

2012-07-11 Thread Martin v . Löwis
Martin v. Löwis added the comment: Serhiy: can you please explicitly list what issues your patch fixes? I can think of many *more* issues that your patch doesn't fix, e.g. sys.stdin.read(sys) and sys.stdout.read(). I'm quite opposed to monkey-patching, so I won't commit any patch that involve

[issue15318] IDLE - sys.stdin is writeable

2012-07-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added getvar method to PyShell.console. -- Added file: http://bugs.python.org/file26354/idle_stdstreams-3.patch ___ Python tracker ___diff -r

[issue15318] IDLE - sys.stdin is writeable

2012-07-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: sys.std* streams have many other issues. >>> sys.stdin.readable() Traceback (most recent call last): File "", line 1, in sys.stdin.readable() AttributeError: readable >>> sys.stdout.writable() Traceback (most recent call last): File "", line 1, in

[issue15318] IDLE - sys.stdin is writeable

2012-07-11 Thread Martin v . Löwis
Martin v. Löwis added the comment: Revised -- Added file: http://bugs.python.org/file26351/blockwrite.diff ___ Python tracker ___ ___

[issue15318] IDLE - sys.stdin is writeable

2012-07-11 Thread Martin v . Löwis
Martin v. Löwis added the comment: I propose the attached patch to block write() calls. -- keywords: +patch Added file: http://bugs.python.org/file26350/blockwrite.diff ___ Python tracker _

[issue15318] IDLE - sys.stdin is writeable

2012-07-10 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue15318] IDLE - sys.stdin is writeable

2012-07-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: It's *clearly* not a duplicate. While #15319 is fixed, this issue remains - so it can't possibly be a duplicate. -- nosy: +loewis resolution: duplicate -> superseder: IDLE - readline, isatty, and input broken ->

[issue15318] IDLE - sys.stdin is writeable

2012-07-10 Thread Roger Serwy
Changes by Roger Serwy : -- superseder: -> IDLE - input() is broken. ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue15318] IDLE - sys.stdin is writeable

2012-07-10 Thread Roger Serwy
Roger Serwy added the comment: I agree. I'll close it. -- resolution: -> duplicate status: open -> closed ___ Python tracker ___ ___

[issue15318] IDLE - sys.stdin is writeable

2012-07-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: To me, this is part of #15319. sys.stdin is broken in being writable but not readable. Unwrapping is just the first, trivial step to fixing it. So I think we should close this in favor of the other. -- ___ Python t

[issue15318] IDLE - sys.stdin is writeable

2012-07-10 Thread Roger Serwy
New submission from Roger Serwy : This is a follow-up to issue13532 which fixed problems with IDLE's sys.stdout and sys.stderr implementation. Presently, sys.stdin has a write method, but does not raise "io.UnsupportedOperation: not writable" when passed a string. Instead, it writes to the ID