Message145040
The new SIGINT behaviour of pdb.Pdb prevents use of pdb within a non-main thread without explicitly setting nosigint=True. Specifically the 'continue' command causes a traceback as follows:
{{{
...
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/pdb.py", line 959, in do_continue
signal.signal(signal.SIGINT, self.sigint_handler)
ValueError: signal only works in main thread
}}}
Since the new behaviour seems to be to gain an enhancement rather than anything fundamentally necessary to pdb, wouldn't it be better if the default was reversed, so the same code would work identically on Python 3.1 (and potentially earlier, i.e. Python2) and Python 3.2?
At the moment in my codebase (rpcpdb) I'm using inspect.getargspec sniffing for nosigint on pdb.Pdb.__init__ to determine whether to include a nosigint=True parameter, which clearly isn't ideal! |
|
Date |
User |
Action |
Args |
2011-10-06 21:17:28 | bpb | set | recipients:
+ bpb |
2011-10-06 21:17:28 | bpb | set | messageid: <1317935848.16.0.589862913408.issue13120@psf.upfronthosting.co.za> |
2011-10-06 21:17:27 | bpb | link | issue13120 messages |
2011-10-06 21:17:26 | bpb | create | |
|