Georg Brandl ge...@python.org added the comment:
Fixed in r83271. I think the first patch's approach is better, since it does
not affect pdb, only doctest's adaption of pdb. Consequently, I couldn't use
the test case; thanks anyway for that!
--
resolution: - fixed
status: open -
Sriram sriramrathinav...@yahoo.com added the comment:
Hi,
On second thoughts, it made more sense to validate pdb directly instead of
validating doctest's debugger.
I have also used few inputs, I got from irc chat at #python-dev room in writing
the test case. Thanks to them.
I have attached
Changes by Jean-Paul Calderone exar...@twistedmatrix.com:
--
stage: unit test needed - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5727
___
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
--
nosy: +belopolsky
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5727
___
___
Sriram sriramrathinav...@yahoo.com added the comment:
Hi,
I believe this behaviour can be tested if we can prove that Cmd's cmdloop uses
raw_input to get the data as against self.stdin.readline().
To test it, ideally I would have liked to override sys.stdin with a fake input
stream and pass
Sriram sriramrathinav...@yahoo.com added the comment:
Hi,
This is the first bug am working in python, kindly excuse my mistakes,
if any.
As far as I can understand, the pdb disabled readline when an explicit
stdin or stdout is passed, to allow remote debugging.
I found this in Python 2.5.4
Sriram sriramrathinav...@yahoo.com added the comment:
Hi,
How about changing pdb's behavior, that it disables readline only if the
passed stream is not the stdout stream?
Also when looking at doctest module, I found that bdb's trace_dispatch
was overridden to set the debugger's output stream
Wolfgang Schnerring wosc+pyt...@wosc.de added the comment:
I've tracked down the reason by diffing pdb.py and cmd.py between 2.4
and 2.5:
It turns out that pdb.Pdb in 2.5 changes the way it handles input
depending on whether an explicit output was provided, more precisely, it
disables readline
Changes by Daniel Diniz aja...@gmail.com:
--
stage: - test needed
versions: +Python 2.6, Python 3.1 -Python 2.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5727
___
New submission from Wolfgang Schnerring wosc+pyt...@wosc.de:
When pdb is called from inside a doctest under python2.5, the readline
keys do not work anymore -- like they did just fine in 2.4.
Steps to reproduce:
1. Create two files, foo.txt and foo.py, like so:
$ cat foo.txt
import pdb;
10 matches
Mail list logo