Please consider PEP 678, https://www.python.org/dev/peps/pep-0678/
This proposal arose out discussions about use of ExceptionGroup, as a way to attach extra information when exception chaining is undesirable (e.g. because a library does not wish to change the exception type). The motivation section discusses use by testing libraries such as Hypothesis and Pytest, with concurrency like Trio or with serial retries, and in teaching environments such as friendly-traceback.
Please consider PEP 678, https://www.python.org/dev/peps/pep-0678/
This proposal arose out discussions about use of
ExceptionGroup, as a way to attach extra information when exception chaining is undesirable (e.g. because a library does not wish to change the exception type). The motivation section discusses use by testing libraries such as Hypothesis and Pytest, with concurrency like Trio or with serial retries, and in teaching environments such as friendly-traceback.