This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bpb
Recipients bpb
Date 2011-10-06.21:17:26
SpamBayes Score 1.2617053e-09
Marked as misclassified No
Message-id <1317935848.16.0.589862913408.issue13120@psf.upfronthosting.co.za>
In-reply-to
Content
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!
History
Date User Action Args
2011-10-06 21:17:28bpbsetrecipients: + bpb
2011-10-06 21:17:28bpbsetmessageid: <1317935848.16.0.589862913408.issue13120@psf.upfronthosting.co.za>
2011-10-06 21:17:27bpblinkissue13120 messages
2011-10-06 21:17:26bpbcreate