From 6aa1a97a07248db809a03c376fb6a86d465d0782 Mon Sep 17 00:00:00 2001 From: Andy Lee Date: Mon, 11 Aug 2025 00:47:43 -0700 Subject: [PATCH] fix: remove Python 3.10+ zip strict parameter for Python 3.9 compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the strict=False parameter from zip() call in api.py as it was introduced in Python 3.10 and causes "TypeError: zip() takes no keyword arguments" in Python 3.9. The strict parameter controls whether zip() raises an exception when the iterables have different lengths. Since we're not relying on this behavior and the code works correctly without it, removing it maintains the same functionality while ensuring Python 3.9 compatibility. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- packages/leann-core/src/leann/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/leann-core/src/leann/api.py b/packages/leann-core/src/leann/api.py index 411e142..65d75b9 100644 --- a/packages/leann-core/src/leann/api.py +++ b/packages/leann-core/src/leann/api.py @@ -554,7 +554,7 @@ class LeannSearcher: if "labels" in results and "distances" in results: logger.info(f" Processing {len(results['labels'][0])} passage IDs:") for i, (string_id, dist) in enumerate( - zip(results["labels"][0], results["distances"][0], strict=False) + zip(results["labels"][0], results["distances"][0]) ): try: passage_data = self.passage_manager.get_passage(string_id)