Message8111
Ok, I have to own up to this one. The mechanism of the problem is that these tests replace sys.stdin and sys.stdout, and then call raw_input('(Pdb)') which is supposed to use the replacement streams.
In the present implementation, raw_input(prompt) is handled by the console class directly, so replacing sys.stdin/stdout does not intercept it. This direct delegation happens even with the PlainConsole. I did this so that the console library (JLine or Readline) could be aware of the prompt, which it needs to be in order to position the cursor correctly - one of the things this design fixed.
Prior to my change, the JLineConsole would replace raw_input() with a method it implemented directly, and this is why test_pdb and test_doctest fail the same way in versions before my change. (But they don't fail when the console is InteractiveConsole.) This hijacking was incorrect, and now I've generalised it.
Replacing sys.stdin/stdout is not uncommon in Python, so it should work in Jython as it does in CPython. I'll see what I can do to restore that for all consoles, achieving correct line editing some other way. |
|
Date |
User |
Action |
Args |
2013-09-09 22:11:11 | jeff.allen | set | messageid: <1378764671.78.0.0282161693827.issue2082@psf.upfronthosting.co.za> |
2013-09-09 22:11:11 | jeff.allen | set | recipients:
+ jeff.allen |
2013-09-09 22:11:11 | jeff.allen | link | issue2082 messages |
2013-09-09 22:11:11 | jeff.allen | create | |
|