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

2019-06-05 Thread daniel hahler
daniel hahler added the comment: Just for reference: I've just spent quite some time debugging missing coverage with pytest, and it turned out that part of it is because of this issue. Most of the pdb related tests run in a subprocess (via pexpect), but not all of them. I am using a

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

2019-05-27 Thread Xavier de Gaye
Xavier de Gaye added the comment: The main goal of test coverage is to verify that the tests cover the code that is being tested, it is not to get '100 %' printed. Measuring the coverage of the tests themselves is entirely another matter and not very useful. Since it is not possible to

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

2019-05-26 Thread daniel hahler
daniel hahler added the comment: >From my initial comment: > 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). It will also affect running tests with coverage (in general, or using tools like

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

2019-05-26 Thread Xavier de Gaye
Xavier de Gaye added the comment: > Is getting accurate coverage reports not enough? But it does not achieve that goal, does it ? -- ___ Python tracker ___

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

2019-05-26 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > The proposed change is not backward compatible. Indeed, I missed that thanks. I think I could fix that. > A motivation for this change should be provided first Is getting accurate coverage reports not enough? --

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

2019-05-25 Thread Xavier de Gaye
Xavier de Gaye added the comment: > Would it work to store it on the class then (once)? A motivation for this change should be provided first: the incorrect behavior it is trying to fix or the enhancement it is providing. -- ___ Python tracker

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

2019-05-25 Thread daniel hahler
daniel hahler added the comment: I've just found that I've created an issue with regard to `do_debug` for this already (https://bugs.python.org/issue36388), and a PR: https://github.com/python/cpython/pull/12479. -- ___ Python tracker

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

2019-05-25 Thread daniel hahler
daniel hahler added the comment: > In that case the proposed change builds an implicit stack of trace functions > that is increased each time the interpreter executes this hard breakpoint Very valid and good point. Would it work to store it on the class then (once)? FWIW: pdbpp uses a

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

2019-05-25 Thread Xavier de Gaye
Xavier de Gaye added the comment: > While typically pdb is not used in tests, it is just good practice, given > that there can only be a single trace function. IMO invoking "good practice" is not sufficient to motivate such a change. The proposed change is not backward compatible. A common

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

2019-05-22 Thread daniel hahler
daniel hahler added the comment: Looks great, thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2019-05-22 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi @blueyed, can you confirm PR 13497 solve your issue ? -- nosy: +remi.lapeyre ___ Python tracker ___

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

2019-05-22 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +13413 stage: -> patch review ___ Python tracker ___ ___

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

2019-05-22 Thread daniel hahler
Change by daniel hahler : -- versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2019-05-22 Thread daniel hahler
New submission from daniel hahler : 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