From 67af19ba73ce565a5bcf0a54a21623666122bd8e Mon Sep 17 00:00:00 2001 From: Daniel Rammer Date: Mon, 17 Aug 2026 14:55:06 -0500 Subject: [PATCH] fix(python): return None from the unit-returning LSM async methods pyo3 0.28 converts Rust `()` to an empty Python tuple, not None, and `future_into_py` runs the future's Ok value through that conversion. So `checkpoint_lsm`, `flush_lsm`, and `compact_lsm` handed back `()` despite being annotated `-> None`, and the sync `RemoteTable` wrappers passed it straight through `LOOP.run`. Drop the `return`, matching `set_lsm_write_spec`, `unset_lsm_write_spec`, and `close_lsm_writers`, which already bare-await for this reason. Co-Authored-By: Claude Opus 5 (1M context) --- python/python/lancedb/table.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/python/lancedb/table.py b/python/python/lancedb/table.py index 4ecf6e836..f97d0331c 100644 --- a/python/python/lancedb/table.py +++ b/python/python/lancedb/table.py @@ -4846,7 +4846,7 @@ class AsyncTable: ``asyncio.wait_for`` for a wall-clock bound; abandoning it partway costs nothing. """ - return await self._inner.checkpoint_lsm() + await self._inner.checkpoint_lsm() async def flush_lsm(self) -> None: """Seal every bucket's active memtable into L0. @@ -4855,7 +4855,7 @@ class AsyncTable: `compact_lsm`. On a node that has not claimed this table, this claims it and replays its WAL log first. """ - return await self._inner.flush_lsm() + await self._inner.flush_lsm() async def compact_lsm(self) -> None: """Trigger a background L0 to base compaction pass per bucket. @@ -4864,7 +4864,7 @@ class AsyncTable: ``get_lsm_stats`` for progress, or use ``checkpoint_lsm`` to loop until the current L0 has reached base. """ - return await self._inner.compact_lsm() + await self._inner.compact_lsm() async def get_lsm_stats( self, *, include_generation_rows: bool = False