[Python-Dev] Discussion about the proposed ignore_modules argument for traceback functions

Nathaniel Smith njs at pobox.com
Thu Jan 4 02:52:34 EST 2018

On Jan 3, 2018 18:38, "Dmitry Kazakov" <waultah at gmail.com> wrote:


I'd like to draw some attention to the feature(s) proposed in the issue
31299. https://bugs.python.org/issue31299 It's a dependency of the other
issue, it still needs discussion, and it hasn't received any comments from
committers since last September.

Personally, I think that a general traceback cleaning facility proposed by
Antoine should be accompanied by a similar non-destructive feature in a
traceback module. If it's decided that the latter makes sense implementing,
I'm willing to revive (and update) the PR I've closed earlier in time for
the approaching Python 3.7 feature code cutoff.

Regarding the ability to mutate a traceback to add/remove frames, there's a
PR here, which I think is enough to do what Antoine was talking about:
(It's been sitting for 24 days, maybe someone could review it?)

If you want a general way to mark certain frames in tracebacks as being
hidden, then I think the big question is what the actual API for marking
them should look like. Being able to mark a whole module as never showing
up in tracebacks is pretty crude -- should it be per-function? What would
it look like, a decorator? That's probably difficult to implement without
first implementing bpo-12857 (which would be a good idea anyway!). If an
invisible function calls another function that's neither marked as visible
or invisible, should the default be that it's visible, or that it inherits
its parent's visibility?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20180103/948b4ae6/attachment.html>

More information about the Python-Dev mailing list