Skip to content

Commit

Permalink
Propagate CancelledError natively as since Python 3.8
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Vasilyev <nolar@nolar.info>
  • Loading branch information
nolar committed Oct 8, 2023
1 parent 7266d37 commit 756241d
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions kopf/_core/actions/throttlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 756241d

Please sign in to comment.