Related discussions about cancellations at the Python level:
(By the way, Trio changed its KeyboarInterrupt protection implementation in v0.28.0, slightly different implementation, but the same idea.)