[issue1301] Bad assertion in _tkinter.c

2008-01-03 Thread Stephen P. Schaefer
Stephen P. Schaefer added the comment: I'm not sure of the scope of the block to which you're referring. As patched, the code returns a Tcl_Obj representing 0 length unicode string, which appears to me to be the correct behavior, and works for the applications I use (originally developed in

[issue1301] Bad assertion in _tkinter.c

2008-01-03 Thread Guido van Rossum
Guido van Rossum added the comment: I suspect the assert is an overflow check. But since asserts are compiled into no-ops unless we're using debug mode, I don't see the point of using an assert. Just to close the issue I'll replace it with a proper overflow check. -- assignee: -

[issue1301] Bad assertion in _tkinter.c

2008-01-03 Thread Guido van Rossum
Guido van Rossum added the comment: Before I make a fool out of myself, what do folks think of this patch? Added file: http://bugs.python.org/file9052/tkinter.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1301 __

[issue1301] Bad assertion in _tkinter.c

2008-01-03 Thread Stephen P. Schaefer
Stephen P. Schaefer added the comment: It looks good to me (to the extent that means anything). I'm doing an rpmbuild now with your patch applied to the Fedora 7 .src.rpm, and I'll start using the result on my workstation ASAP. __ Tracker [EMAIL PROTECTED]

[issue1301] Bad assertion in _tkinter.c

2008-01-03 Thread Guido van Rossum
Guido van Rossum added the comment: Committed revision 59685. (2.5.2 branch) Committed revision 59686. (2.6 trunk) -- resolution: - fixed status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1301

[issue1301] Bad assertion in _tkinter.c

2008-01-03 Thread Stephen P. Schaefer
Stephen P. Schaefer added the comment: Mr. van Rossum's patch, applied to the Fedora 7 .src.rpm, is working for me. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1301 __ ___

[issue1301] Bad assertion in _tkinter.c

2008-01-02 Thread Guido van Rossum
Guido van Rossum added the comment: So what's the correct fix? Skip the whole block if size==0? -- nosy: +gvanrossum __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1301 __

[issue1301] Bad assertion in _tkinter.c

2008-01-02 Thread Christian Heimes
Christian Heimes added the comment: I've hit the same bug today. I vote for the removal of the assert() and a skip of the entire block if size == 0. I don't see what the assert() should test. -- nosy: +tiran versions: +Python 2.6, Python 3.0 __ Tracker

[issue1301] Bad assertion in _tkinter.c

2007-10-25 Thread Facundo Batista
Facundo Batista added the comment: Really do not understand that assert. It says: assert(size size * sizeof(Tcl_UniChar)); For that to be true, considering size to be positive, the result of sizeof needs to be greater than 0. If you modify it, and also accepts it to be 0, and considering

[issue1301] Bad assertion in _tkinter.c

2007-10-18 Thread Brett Cannon
Brett Cannon added the comment: Patch is inlined in a comment. -- keywords: +patch nosy: +brett.cannon __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1301 __ ___

[issue1301] Bad assertion in _tkinter.c

2007-10-18 Thread Stephen P. Schaefer
New submission from Stephen P. Schaefer: The following fails with python 2.5 as built by Fedora 7: t2.py: import sys, Tkinter Tkinter.Button(text=u).pack( ) Tkinter.mainloop( ) $ python t2.py python: ./Modules/_tkinter.c:941: AsObj: Assertion `size size * sizeof(Tcl_UniChar)' failed. Aborted