Message96916
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 Release log.
"""
Patch #721464: pdb.Pdb instances can now be given explicit stdin and
stdout arguments, making it possible to redirect input and output
for remote debugging.
"""
Now in doctest.py since we pass the stdout argument (which is always
sys.stdout) to pdb.py, readline is always disabled when pdb is invoked
from doctest.py.
One fix I can think of is to have pdb disable use of readline, not if
any output stream is passed but only if a output stream other than
sys.stdout is passed. I infact believe, this will preserve the
functionality of pdb.py that existed before release of version 2.5.4
The above fix would still not solve the problem because before we pass
the output stream to pdb.py, we override sys.stdout in doctest to
doctest's spoofout. So in pdb.py, sys.stdout will not point to real
sys.stdout. This can be fixed by overriding sys.stdout after we
initialize the debugger.
Please find the patch for doctest and pdb as an attachment.
Thanks
Sriram |
|
Date |
User |
Action |
Args |
2009-12-27 18:33:39 | sriram | set | recipients:
+ sriram, wosc |
2009-12-27 18:33:38 | sriram | set | messageid: <1261938818.98.0.63561086889.issue5727@psf.upfronthosting.co.za> |
2009-12-27 18:33:37 | sriram | link | issue5727 messages |
2009-12-27 18:33:36 | sriram | create | |
|