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

2012-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > The following code prevents another prompt from appearing: And this a more serious issue concerns 3.3. -- versions: +Python 3.3 ___ Python tracker ___

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

2012-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Does anyone know a good way to make the exception render as: "must be str, > not int" instead of "must be str, not " ? raise TypeError('must be str, not %s' % type(s).__name__) -- nosy: +storchaka ___ Python tr

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

2012-06-11 Thread Roger Serwy
Roger Serwy added the comment: @Ramchandra: "__name__" does not exist for many objects. This issue with the sys.stdout.write encompasses a lot of other issues involving the shortcomings of the RPCProxy object. The following code prevents another prompt from appearing: >>> class A:

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

2012-06-08 Thread Ramchandra Apte
Ramchandra Apte added the comment: @Roger Serwy >> Does anyone know a good way to make the exception render as: "must be str, >> not int" instead of "must be str, not " ? Use s.__name__ rather than type(s) for the type name e.g. -raise TypeError('must be str, not %s' % type(s)) +raise TypeError

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

2012-03-11 Thread Senthil Kumaran
Senthil Kumaran added the comment: Just a minor comment on the patch - It should be %r instead of %s. -raise TypeError('must be str, not %s' % type(s)) +raise TypeError('must be str, not %r' % type(s)) If there is any test for this, it could be added. I find this approa

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

2012-03-11 Thread Roger Serwy
Roger Serwy added the comment: Attached is a preliminary patch to solve this issue. It relies on "rpc_marshal_exception.patch" from issue14200. Does anyone know a good way to make the exception render as: "must be str, not int" instead of "must be str, not " ? -- keywords: +patch Ad

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

2012-03-09 Thread Martin v . Löwis
Martin v. Löwis added the comment: Ramchandra: Most likely, the status is that nobody is working on this, and nobody is planning to work on this. So if you want to see it fixed, it may be that you have to submit a patch yourself. -- ___ Python trac

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

2012-03-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: Many issues take a while, depending on volunteers time and choice of priority. -- ___ Python tracker ___ __

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

2012-03-09 Thread Ramchandra Apte
Ramchandra Apte added the comment: What is the status of this bug? It has been about two months since the last message. -- ___ Python tracker ___ ___

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

2011-12-21 Thread Roger Serwy
Roger Serwy added the comment: This bug is related to #1757057. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

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

2011-12-14 Thread maniram maniram
maniram maniram added the comment: One reason to fix this bug: People may develop code that calls sys.std{out,err}.write with the number 200. like sys.stdout.write(200) In IDLE the code works well but in Python from the command-line it fails to run. Creating a bug in the code. --

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

2011-12-14 Thread Martin v . Löwis
Martin v. Löwis added the comment: > I also so not understand you reverting the title to the arguably incorrect > non-parallel construction. That is an (unfortunate) side effect of replying by email. -- ___ Python tracker

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

2011-12-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: In English, "We should like" is far from an absolute statement. "IDLE must" would be such. In any case, I hope you agree that crashing is bad. It is also not good if IDLE, as a development environment, enables code that violates the doc specifications and tha

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

2011-12-14 Thread Martin v . Löwis
Martin v. Löwis added the comment: > We should like the IDLE shell to give the same results as the standard shell. I disagree that this should be an absolute principle. Two standard shells may not give the same result due to running in different environments, so forcing IDLE to give the same r

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

2011-12-12 Thread Roger Serwy
Roger Serwy added the comment: The crash can be prevented by using #13582. The RPCProxy object would need to be subclassed so that it raises TypeError for the "write" method when it is not given a string. -- nosy: +serwy ___ Python tracker

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

2011-12-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: We should like the IDLE shell to give the same results as the standard shell. See #7163 On 3.2.2 on Win7, the problem is worse: sys.stdout.write(100) crashes IDLE -- as in it just fades away after a short (1/2 sec?) delay. sys.stdout.write(sys) gives me the

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

2011-12-05 Thread maniram maniram
maniram maniram added the comment: It is different behaviour than usual. I agree it is of low importance. -- ___ Python tracker ___ _

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

2011-12-05 Thread Martin v . Löwis
Martin v. Löwis added the comment: Why do you think this is a bug? Is this behavior causing problems? -- nosy: +loewis ___ Python tracker ___ ___

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

2011-12-05 Thread maniram maniram
New submission from maniram maniram : In IDLE, sys.stdout.write and sys.stderr can write any pickleable object such as 100 when they should only allow strings. IDLE seems to be pickling the object. >>> import sys >>> sys.stdout.write(100) 100 >>> sys.stdout.write(sys) Traceback (most recent call