From f36583d0c37386ed707c0e33ef632b9e27265a02 Mon Sep 17 00:00:00 2001 From: Jack Ye Date: Sat, 11 Apr 2026 21:53:24 -0700 Subject: [PATCH] fix: keep original Rust path for root namespace operations Only delegate to _namespace_conn() when namespace_path is non-empty. Root namespace operations (list_namespaces, list_tables with empty path) still go through the original Rust connection to avoid regression. Co-Authored-By: Claude Opus 4.6 (1M context) --- python/python/lancedb/db.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/python/python/lancedb/db.py b/python/python/lancedb/db.py index b2c1c6476..920b38e46 100644 --- a/python/python/lancedb/db.py +++ b/python/python/lancedb/db.py @@ -718,10 +718,18 @@ class LanceDBConnection(DBConnection): """ if namespace_path is None: namespace_path = [] - return self._namespace_conn().list_namespaces( - namespace_path=namespace_path, - page_token=page_token, - limit=limit, + if namespace_path: + return self._namespace_conn().list_namespaces( + namespace_path=namespace_path, + page_token=page_token, + limit=limit, + ) + return LOOP.run( + self._conn.list_namespaces( + namespace_path=namespace_path, + page_token=page_token, + limit=limit, + ) ) @override