You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# user_error, or exception bubbling up from _reader_task
iflen(e.exceptions) ==1:
raisee.exceptions[0]
which implicitly sets __context__ to the caught group, and the user exception inside the group is the same exception, so it simultaneously loses its old __context__.
The fix is to sprinkle a bunch of copy.copy() calls. Given that we have a finally it's not an alternative to raise the exception outside of the exception handler.
The text was updated successfully, but these errors were encountered:
This code will fully lose the
TypeError
as the__context__
from the exception, due to python-trio/flake8-async#298The offending code for this example is
trio-websocket/trio_websocket/_impl.py
Lines 205 to 208 in f5fd6d7
which implicitly sets
__context__
to the caught group, and the user exception inside the group is the same exception, so it simultaneously loses its old__context__
.The fix is to sprinkle a bunch of
copy.copy()
calls. Given that we have afinally
it's not an alternative to raise the exception outside of the exception handler.The text was updated successfully, but these errors were encountered: