[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2012-07-10 Thread Martin v . Löwis
Martin v. Löwis added the comment: Folks: one issue at a time - pretty pretty please. This issue was "In IDLE, sys.stdout and sys.stderr can write any pickleable object". Will anybody dispute that this issue is fixed? Roger: please create a new issue for input being broken now. Your patch "s

[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2012-07-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >>> sys.stdin.readable() False >>> sys.stdout.writable() False I think the issue is far from a solution. -- ___ Python tracker ___ _

[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2012-07-10 Thread Roger Serwy
Roger Serwy added the comment: Running "input" from IDLE now raises an error. Attached is a fix to _RPCFile to allow readline (and isatty) to function properly. -- priority: normal -> high resolution: fixed -> status: closed -> open Added file: http://bugs.python.org/file26342/stdin_f

[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2012-07-10 Thread Roger Serwy
Roger Serwy added the comment: sys.stdin has a write method, but it should raise "io.UnsupportedOperation: not writable" when passed a string. It looks like IDLE has allowed writes to stdin even before Martin's patch. I'll open a separate issue for this case. -- _

[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2012-07-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > +sys.stdin = self.console = _RPCFile(self.get_remote_proxy("stdin")) write to sys.stdin? -- ___ Python tracker ___ ___

[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2012-07-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: I tested and pushed the change to allow bytestrings. If anyone is printing other character buffer objects in 2.7 with Idle, they can explicitly convert to str/bytes, patch run.py, and/or post here or on a new issue for further expansion. I am otherwise done w

[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2012-07-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4f891f44ec15 by Terry Jan Reedy in branch '2.7': Issue 13532: Allow bytearrays to be written also. http://hg.python.org/cpython/rev/4f891f44ec15 -- ___ Python tracker

[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2012-07-09 Thread Martin v . Löwis
Martin v. Löwis added the comment: I'm losing interest in this issue. It already got more attention than it deserves. Terry, feel free to make whatever change you consider desirable. -- ___ Python tracker ___

[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2012-07-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks Martin. I was thinking of adding special-casing inside the rpcproxy class, but the wrapping is pretty clean and clear. Works great in 3.3 Win7-64. The 2.7 message 'expected a character buffer object' is technically correct*, but opaque, especially to b

[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2012-07-09 Thread Martin v . Löwis
Martin v. Löwis added the comment: Ah, this indicates that we should support any buffer object... -- ___ Python tracker ___ ___ Pytho

[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2012-07-09 Thread Roger Serwy
Roger Serwy added the comment: I just pulled Martin's patches and they fix the issue. Indirection to the rescue! There is one very slight problem though with the error message raised on 2.7 since it is different than 3.3. Attached is a patch to fix it. -- Added file: http://bugs.pyth

[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2012-07-09 Thread Martin v . Löwis
Martin v. Löwis added the comment: All problems in computer science can be solved by another indirection... I've added another wrapper around the RPC proxy to cause the type error. (A variant of) Roger's patch is still included to support the -n case. -- resolution: -> fixed status:

[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2012-07-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 58189e37331c by Martin v. Löwis in branch '2.7': - Issue #13532: Check that arguments to sys.stdout.write are strings. http://hg.python.org/cpython/rev/58189e37331c -- ___ Python tracker

[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2012-07-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 422242dbce30 by Martin v. Löwis in branch '3.2': Issue #13532: Check that arguments to sys.stdout.write are strings. http://hg.python.org/cpython/rev/422242dbce30 -- nosy: +python-dev ___ Python tracker

[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2012-07-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: The patch (to my production Idle, with name fix) prevents crashing and raises an error instead when an object *can* be pickled, so I will apply before 3.3 if no problems appear and we cannot do better. But written objects are still pickled, so sys.stdout.writ

[issue13532] In IDLE, sys.stdout and sys.stderr can write any pickleable object

2011-12-13 Thread maniram maniram
Changes by maniram maniram : -- title: In IDLE, sys.stdout.write and sys.stderr can write any pickleable object -> In IDLE, sys.stdout and sys.stderr can write any pickleable object ___ Python tracker