https://github.com/agronholm/anyio/blob/9eb4671547b01f5e3ba0e0ca602b6aceec15af86/src/anyio/_backends/_asyncio.py#L598
On Sat, 29 May 2021, 20:24 André Roberge, <[email protected]> wrote: > > > On Sat, May 29, 2021 at 3:25 PM Thomas Grainger <[email protected]> wrote: > >> pytest uses __tracebackhide__ >> >> https://doc.pytest.org/en/latest/example/simple.html#writing-well-integrated-assertion-helpers >> > > Thanks for the reminder. Pytest takes care of traceback formatting for > users. Individual projects can of course do that. But I want to do the > reverse: I want to limit what users of my projects will see in a traceback, > without having them specify something in their code. > > What I am interested in is having a project-agnostic standardised Python > way to specify what to show to an end-user when an exception is raised. > >> >> Eg anyio sets __tracebackhide__ = __traceback_hide__ = True to remove >> internal frames from user Tracebacks >> > > Do you have a specific link to this? I have looked in the documentation > as well as in a few modules (_core/_exceptions.py in particular) without > seeing any reference to this. I am not interested in custom formatting for > testing, which is something comparatively easy to do. >
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/4UK5HO5X3RLWGCSZYPDASZBVVQT5RRHE/ Code of Conduct: http://python.org/psf/codeofconduct/
