-
-
Notifications
You must be signed in to change notification settings - Fork 448
Closed
Labels
Description
I was going over a few open-source Python packages and fixing the way exception causes are set, while a failing CI run turned my attention to the fact that coverage
has the same bug.
See line 10 of the traceback linked above. The line says "During handling of the above exception, another exception occurred" while it should say "The above exception was the direct cause of the following exception".
A fix would be trickier in the case of coverage
, since it maintains Python 2.7 support. This can be done using a raise
-like compatibility function that manually sets new_exception.__cause__ = old_exception
. That's easy to write, and should probably be added in the backward
module, the question is: Do you want this change in coverage
?