Important RingBuffBytesSender fix on non batched mode! & downgrade nix-shell python to lowest supported

Guillermo Rodriguez 2025-03-22 16:54:00 -03:00
parent 0208a4728f
commit 32b5210648
No known key found for this signature in database
GPG Key ID: 002CC5F1E6BDA53E
2 changed files with 2 additions and 1 deletions

View File

@ -13,6 +13,6 @@ pkgs.mkShell {
shellHook = ''
set -e
uv venv .venv --python=3.12
uv venv .venv --python=3.11
'';
}

View File

@ -512,6 +512,7 @@ class RingBuffBytesSender(trio.abc.SendChannel[bytes]):
msg: bytes = struct.pack("<I", len(value)) + value
if self.batch_size == 1:
await self._sender.send_all(msg)
return
self._batch += msg
self._batch_msg_len += 1