Taras Voinarovskyi added the comment:
Hi Chris,
Yes, I do believe that is the respectful change, if we look the CancelledError
is not checked to be external or originate from the timer.
Best regards,
Taras Voinarovskyi
--
___
Python tracker
New submission from Taras Voinarovskyi :
Hi, during migration to Python 3.8.6 we encountered a behavior change from
previous versions: wait_for ignored the request to cancellation and returned
instead. After investigation, it seems to be related to the update in bpo-32751
and is only
Taras Voinarovskyi added the comment:
For now, it seems like ``copy.copy(exception)`` before raising seems to prevent
this behaviour. So for all exceptions originating from background tasks I raise
a copy to the user, rather than the original exception. It prints correct
stack, so no real
Taras Voinarovskyi added the comment:
So yes, the `clear_frames` function will force a running generator to close.
See https://github.com/python/cpython/blob/3.7/Objects/frameobject.c#L566, it
explicitly does a Finalize. Would that be the desired behaviour for
assertRaises is not clear. I