[issue13051] Infinite recursion in curses.textpad.Textbox

Tycho Andersen report at bugs.python.org
Tue Dec 20 18:34:25 CET 2011


Tycho Andersen <tycho at tycho.ws> added the comment:

Attached is a patch which contains a testcase as well. A few notes about this testcase:

1. I couldn't figure out how to get it to run correctly after all the other tests had run, so I had to run it first. This seems lame. One possible fix is to run each testcase in curses.wrapper; I'd be happy to change this patch to do that if it's more acceptable.

2. This testcase only tests one of the two bugs this patch fixes. The other seems much harder to write a testcase for, since you have to have a terminal such that curses.LINES * curses.COLUMS > sys.getrecursionlimit(). If there's a good way to guarantee this, I'd be happy to write a testcase for it.

Comments are appreciated!

----------
Added file: http://bugs.python.org/file24061/textpad-recursion-fix.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13051>
_______________________________________


More information about the Python-bugs-list mailing list