Summary
The custom exception printer in promising/errors.py (around lines 168–255) reconstructs traceback output from extracted frames plus a final type: value line. This bypasses Python's stdlib handling for:
Exception.add_note() notes
ExceptionGroup structure
SyntaxError detail rendering
- Future traceback features added to the stdlib
Once the custom hook is active, that diagnostic information disappears for promising-linked failures.
Suggested Fix
Base the tail rendering on traceback.TracebackException / traceback.print_exception and layer the promising frames around that instead of rebuilding the tail manually. For example, build a traceback.TracebackException from the original exc_type/exc_value/exc_tb and delegate the core rendering to traceback.TracebackException.format() / traceback.print_exception, while inserting promising context frames by merging or wrapping the TracebackException stack with promising_context.get_trace(ancestors_first=True) output.
References
Reported by @coderabbitai, requested by @teremterem.
Summary
The custom exception printer in
promising/errors.py(around lines 168–255) reconstructs traceback output from extracted frames plus a finaltype: valueline. This bypasses Python's stdlib handling for:Exception.add_note()notesExceptionGroupstructureSyntaxErrordetail renderingOnce the custom hook is active, that diagnostic information disappears for promising-linked failures.
Suggested Fix
Base the tail rendering on
traceback.TracebackException/traceback.print_exceptionand layer the promising frames around that instead of rebuilding the tail manually. For example, build atraceback.TracebackExceptionfrom the originalexc_type/exc_value/exc_tband delegate the core rendering totraceback.TracebackException.format()/traceback.print_exception, while inserting promising context frames by merging or wrapping theTracebackExceptionstack withpromising_context.get_trace(ancestors_first=True)output.References
Reported by
@coderabbitai, requested by@teremterem.