From 8830f0ea4c9be5b874b8c6faf538f4c768cbaac3 Mon Sep 17 00:00:00 2001 From: ramikg <72725910+ramikg@users.noreply.github.com> Date: Wed, 18 Feb 2026 15:36:27 +0200 Subject: [PATCH] Fix `asyncio` reactor for Python 3.9+ patch by ramikg; reviewed by Bret McGuire and Brad Schoening reference: https://github.com/apache/cassandra-python-driver/pull/1270 --- cassandra/io/asyncioreactor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cassandra/io/asyncioreactor.py b/cassandra/io/asyncioreactor.py index 95f92e26e0..007e10d5c4 100644 --- a/cassandra/io/asyncioreactor.py +++ b/cassandra/io/asyncioreactor.py @@ -173,7 +173,7 @@ def push(self, data): async def _push_msg(self, chunks): # This lock ensures all chunks of a message are sequential in the Queue - with await self._write_queue_lock: + async with self._write_queue_lock: for chunk in chunks: self._write_queue.put_nowait(chunk)