[New-bugs-announce] [issue37011] pdb: restore original tracing function instead of sys.settrace(None)

daniel hahler report at bugs.python.org
Wed May 22 08:44:44 EDT 2019


New submission from daniel hahler <python-bugs at thequod.de>:

bdb/pdb currently uses `sys.settrace(None)` when uninstalling its trace function (trace_dispatch), but should rather store the original trace function in the beginning and use this instead of `None`.

While typically pdb is not used in tests, it is just good practice, given that there can only be a single trace function.

I've done this via monkeypatching for pdbpp's tests, which resulted in an easy 2% coverage gain (https://github.com/antocuni/pdb/pull/253).

----------
components: Library (Lib)
messages: 343188
nosy: blueyed
priority: normal
severity: normal
status: open
title: pdb: restore original tracing function instead of sys.settrace(None)
type: behavior
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37011>
_______________________________________


More information about the New-bugs-announce mailing list