On Sat, May 29, 2021 at 3:25 PM Thomas Grainger <tagr...@gmail.com> 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 -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/AX3WADP4ZTKMO4VXV2JLDGZW2P76QIHU/ Code of Conduct: http://python.org/psf/codeofconduct/