From 756241d466ed4ce52e109771b35558c552f38716 Mon Sep 17 00:00:00 2001 From: Sergey Vasilyev Date: Sun, 8 Oct 2023 22:44:25 +0200 Subject: [PATCH] Propagate CancelledError natively as since Python 3.8 Signed-off-by: Sergey Vasilyev --- kopf/_core/actions/throttlers.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/kopf/_core/actions/throttlers.py b/kopf/_core/actions/throttlers.py index c591b14b..2106cf97 100644 --- a/kopf/_core/actions/throttlers.py +++ b/kopf/_core/actions/throttlers.py @@ -43,11 +43,6 @@ async def throttled( try: yield should_run - except asyncio.CancelledError: - # CancelledError is a BaseException in 3.8 & 3.9, but a regular Exception in 3.7. - # Behave as if it is a BaseException -- to enabled tests with async-timeout. - raise - except Exception as e: # If it is not an error-of-interest, escalate normally. BaseExceptions are escalated always.