Skip to content

Commit 9c031c9

Browse files
Use builtins.TimeoutError consistently in cluster probe drain
cluster.py:546 was the lone straggler still suppressing asyncio.TimeoutError while every sibling site (protocol.py, sqlalchemy-dqlite/base.py) catches the builtins.TimeoutError name introduced in 3.11. The two are aliased today, so the behaviour is identical, but the alias has been deprecated in favour of the builtin and the codebase's source-of-truth comment in protocol.py already documents the convention. One-character forward-compat hygiene fix. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a9bcab9 commit 9c031c9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/dqliteclient/cluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ async def _query_leader(
543543
# the drain to completion within its 100 ms budget even
544544
# during shutdown; the outer cancel still propagates past
545545
# this ``finally`` as expected.
546-
with contextlib.suppress(OSError, asyncio.TimeoutError):
546+
with contextlib.suppress(OSError, TimeoutError):
547547
await asyncio.shield(
548548
asyncio.wait_for(
549549
writer.wait_closed(),

0 commit comments

Comments
 (0)