New submission from daniel hahler <python-b...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue37011>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to