idea would be to add a helper to stacktrace.py that takes removes all frames from the caller up to the provided callback (and if the callback is not there, it won't do anything). This can probably written as a contextmanager.
see also https://github.com/pallets/jinja/blob/5b498453b5898257b2287f14ef6c363799f1405a/jinja2/debug.py
and BaseException.with_traceback
idea would be to add a helper to stacktrace.py that takes removes all frames from the caller up to the provided callback (and if the callback is not there, it won't do anything). This can probably written as a contextmanager.
see also https://github.com/pallets/jinja/blob/5b498453b5898257b2287f14ef6c363799f1405a/jinja2/debug.py
and BaseException.with_traceback