From 7cf9b1758222a525e9285f979844797d92c1d59e Mon Sep 17 00:00:00 2001 From: Igor Lins e Silva <4753812+igorls@users.noreply.github.com> Date: Thu, 7 May 2026 07:53:28 -0300 Subject: [PATCH] fix(repair): quote ChromaBackend annotation for Python 3.9 compatibility `backend: ChromaBackend | None = None` evaluates the X | None union eagerly at function-definition time, which Python 3.9 rejects with TypeError: unsupported operand type(s) for |: 'ABCMeta' and 'NoneType' since the new union syntax is 3.10+. Quoting matches the existing forward-reference style in repair.py (sqlite_drawer_count, etc.) and defers evaluation, restoring 3.9 compatibility. --- mempalace/repair.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mempalace/repair.py b/mempalace/repair.py index 0585405..d7af0d9 100644 --- a/mempalace/repair.py +++ b/mempalace/repair.py @@ -593,7 +593,7 @@ def status(palace_path=None) -> dict: # --------------------------------------------------------------------------- -def _close_chroma_handles(palace_path: str, backend: ChromaBackend | None = None) -> None: +def _close_chroma_handles(palace_path: str, backend: "ChromaBackend | None" = None) -> None: """Drop ChromaBackend + chromadb singleton caches so OS mmap handles release. When ``backend`` is provided, close the live instance so rollback/restore