-
Notifications
You must be signed in to change notification settings - Fork 168
[Feature Request] Support ExceptionGroup traceback #393
Description
Is your feature request related to a problem? Please describe.
I'm using a asyncio.TaskGroup in a workflow to launch and wait for a few activities in parallel. Happy path (seems) to work great, but when there's an exception in the TaskGroup async context manager, that's raised as a ExceptionGroup (PEP 654). Unfortunately, the sub-exception tracebacks are not included in the stack_trace, so it makes debugging a little harder.
Describe the solution you'd like
I think this might stem from the fact you're traceback.format_tb ing the __traceback__ https://github.com/temporalio/sdk-python/blob/d03f356fb65d1044e1182fdc1a4c60a432d420d8/temporalio/converter.py#L832C59-L832C59
I'm wondering if it's possible to use traceback.format_exception to get a output similar to what the Python spits out. That seems to include the sub-exceptions as-well. What's the advantage of using one over the other?