[issue13052] IDLE: replace ending with '\' causes crash

2012-08-04 Thread Andrew Svetlov
Andrew Svetlov added the comment: While there are no unittests for Roger's patch I have pushed it in after strong manual testing as important enough. Thanks, Roger. -- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed ___

[issue13052] IDLE: replace ending with '\' causes crash

2012-08-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0f38948cc6df by Andrew Svetlov in branch '3.2': Issue #13052: Fix IDLE crashing when replace string in Search/Replace dialog ended with '\'. http://hg.python.org/cpython/rev/0f38948cc6df New changeset 9dcfba4d0357 by Andrew Svetlov in branch 'defau

[issue13052] IDLE: replace ending with '\' causes crash

2012-03-25 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- assignee: -> asvetlov nosy: +asvetlov priority: normal -> high ___ Python tracker ___ ___ Python-bugs-

[issue13052] IDLE: replace ending with '\' causes crash

2012-01-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: The library manual has chapters for unittest: the generic testing framework (package) that any app can use test: a package with the Python test suite; test_x tests module x It has other modules and subpackages, probably not all documented. The test modules

[issue13052] IDLE: replace ending with '\' causes crash

2012-01-16 Thread Roger Serwy
Roger Serwy added the comment: I'm not aware of any formal tests for IDLE. Can you show me the docs for writing proper unit tests? I'll see if I can write one for this. -- ___ Python tracker _

[issue13052] IDLE: replace ending with '\' causes crash

2012-01-16 Thread Ezio Melotti
Ezio Melotti added the comment: If the patch works for you, I guess you can commit it; if tests can be added too, that's even better. -- ___ Python tracker ___

[issue13052] IDLE: replace ending with '\' causes crash

2012-01-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: If there are any tests for Idle, I have not found them. No idlelib/test/, no test/test_idle. There is a testcode.py with random code. I want to look at tkinter/test/ someday to see if it has any models for testing Idle. Roger, do you know of anything? --

[issue13052] IDLE: replace ending with '\' causes crash

2012-01-15 Thread Ezio Melotti
Ezio Melotti added the comment: How difficult would it be to add tests for this? -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue13052] IDLE: replace ending with '\' causes crash

2011-12-22 Thread Roger Serwy
Roger Serwy added the comment: issue13052.patch against 3.3a0 fixes the replace dialog. It also stops "Replace All" from closing the dialog. (What other application actually does this?) When 'Regular Expression' is not checked, the find and the replace dialogs treat the fields as raw strings.

[issue13052] IDLE: replace ending with '\' causes crash

2011-10-14 Thread Ezio Melotti
Ezio Melotti added the comment: Defining the desired behavior is a good place where to start. Next it would be good to have tests that reflect the desired behavior, and eventually make them pass with a proper patch. Currently IDLE seems to understand \n, \t, etc. in the "Replace with" field,

[issue13052] IDLE: replace ending with '\' causes crash

2011-10-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: IDLE is sufficiently undocumented that I think we may, *if necessary*, treat the details of 'expected behavior' as undefined, or look to other programs for guidance. Certainly, 'crash' is unexpected and undesired ;-). Without "[] Regular expression" checked,

[issue13052] IDLE: replace ending with '\' causes crash

2011-10-14 Thread Roger Serwy
Roger Serwy added the comment: I don't have the beep problem you describe under Linux using Python 3.2 (r32:88445, Mar 25 2011, 19:56:22). That may be a platform-specific bug. Here's a patch to use re.escape instead. A minor side effect of using re.escape is that it is not possible to use \n

[issue13052] IDLE: replace ending with '\' causes crash

2011-10-14 Thread Ezio Melotti
Ezio Melotti added the comment: Thanks for the patch. This seems to fix the problem with the trailing \, but not the other issues. As I mentioned in my previous message I think re.escape might be a better solution. I also wonder if there are tests for this, and how difficult would be to add

[issue13052] IDLE: replace ending with '\' causes crash

2011-10-14 Thread Roger Serwy
Roger Serwy added the comment: I see that Ezio added me to the nosy list. Here's a patch that identifies bogus escape characters at the end of the replvar string and appends an extra \ to fix it. -- keywords: +patch Added file: http://bugs.python.org/file23409/patch13052.diff ___

[issue13052] IDLE: replace ending with '\' causes crash

2011-10-14 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +serwy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue13052] IDLE: replace ending with '\' causes crash

2011-09-28 Thread Ezio Melotti
Ezio Melotti added the comment: The problem is in Lib/idlelib/ReplaceDialog.py:141: m = prog.match(chars, col) if not prog: return False new = m.expand(self.replvar.get()) where prog = re.compile('foo') # i.e. text in the find box chars = '>>> "foo"\n' # i.e. the text in the IDLE window c

[issue13052] IDLE: replace ending with '\' causes crash

2011-09-27 Thread Terry J. Reedy
New submission from Terry J. Reedy : As reported by R.S.Kachanovsky on the IDLE-sig list, and comfirmed by me with 3.2.2 on Win 7, entering a replace term ending with '\', like 'test\', in the find/replace dialog box causes IDLE to crash, as in do nothing for a couple of seconds and then close