PlanOpticon
fix(graph): correct FalkorDB Lite import and pin redis<7 for compatibility Use `from redislite import FalkorDB` (embedded) instead of `from falkordb import FalkorDB` (client SDK). Pin redis>=4.5,<7 to avoid UnixDomainSocketConnection.port bug in redis-py 7.x.
Commit
0f9fbf6c6f25b4f388df0c6b195972d583d6620f7b8677df082d5490d501ba77
Parent
4177c4e5c095fb5…
3 files changed
+1
-1
+1
-1
+1
-1
+1
-1
| --- pyproject.toml | ||
| +++ pyproject.toml | ||
| @@ -54,11 +54,11 @@ | ||
| 54 | 54 | [project.optional-dependencies] |
| 55 | 55 | pdf = ["weasyprint>=60.0"] |
| 56 | 56 | gpu = ["torch>=2.0.0", "torchvision>=0.15.0"] |
| 57 | 57 | gdrive = ["google-auth>=2.0.0", "google-auth-oauthlib>=1.0.0", "google-api-python-client>=2.0.0"] |
| 58 | 58 | dropbox = ["dropbox>=12.0.0"] |
| 59 | -graph = ["falkordblite>=0.4.0"] | |
| 59 | +graph = ["falkordblite>=0.4.0", "redis>=4.5,<7"] | |
| 60 | 60 | cloud = [ |
| 61 | 61 | "planopticon[gdrive]", |
| 62 | 62 | "planopticon[dropbox]", |
| 63 | 63 | ] |
| 64 | 64 | dev = [ |
| 65 | 65 |
| --- pyproject.toml | |
| +++ pyproject.toml | |
| @@ -54,11 +54,11 @@ | |
| 54 | [project.optional-dependencies] |
| 55 | pdf = ["weasyprint>=60.0"] |
| 56 | gpu = ["torch>=2.0.0", "torchvision>=0.15.0"] |
| 57 | gdrive = ["google-auth>=2.0.0", "google-auth-oauthlib>=1.0.0", "google-api-python-client>=2.0.0"] |
| 58 | dropbox = ["dropbox>=12.0.0"] |
| 59 | graph = ["falkordblite>=0.4.0"] |
| 60 | cloud = [ |
| 61 | "planopticon[gdrive]", |
| 62 | "planopticon[dropbox]", |
| 63 | ] |
| 64 | dev = [ |
| 65 |
| --- pyproject.toml | |
| +++ pyproject.toml | |
| @@ -54,11 +54,11 @@ | |
| 54 | [project.optional-dependencies] |
| 55 | pdf = ["weasyprint>=60.0"] |
| 56 | gpu = ["torch>=2.0.0", "torchvision>=0.15.0"] |
| 57 | gdrive = ["google-auth>=2.0.0", "google-auth-oauthlib>=1.0.0", "google-api-python-client>=2.0.0"] |
| 58 | dropbox = ["dropbox>=12.0.0"] |
| 59 | graph = ["falkordblite>=0.4.0", "redis>=4.5,<7"] |
| 60 | cloud = [ |
| 61 | "planopticon[gdrive]", |
| 62 | "planopticon[dropbox]", |
| 63 | ] |
| 64 | dev = [ |
| 65 |
+1
-1
| --- tests/test_graph_store.py | ||
| +++ tests/test_graph_store.py | ||
| @@ -156,11 +156,11 @@ | ||
| 156 | 156 | |
| 157 | 157 | |
| 158 | 158 | # Conditional FalkorDB tests |
| 159 | 159 | _falkordb_available = False |
| 160 | 160 | try: |
| 161 | - import falkordb # noqa: F401 | |
| 161 | + import redislite # noqa: F401 | |
| 162 | 162 | |
| 163 | 163 | _falkordb_available = True |
| 164 | 164 | except ImportError: |
| 165 | 165 | pass |
| 166 | 166 | |
| 167 | 167 |
| --- tests/test_graph_store.py | |
| +++ tests/test_graph_store.py | |
| @@ -156,11 +156,11 @@ | |
| 156 | |
| 157 | |
| 158 | # Conditional FalkorDB tests |
| 159 | _falkordb_available = False |
| 160 | try: |
| 161 | import falkordb # noqa: F401 |
| 162 | |
| 163 | _falkordb_available = True |
| 164 | except ImportError: |
| 165 | pass |
| 166 | |
| 167 |
| --- tests/test_graph_store.py | |
| +++ tests/test_graph_store.py | |
| @@ -156,11 +156,11 @@ | |
| 156 | |
| 157 | |
| 158 | # Conditional FalkorDB tests |
| 159 | _falkordb_available = False |
| 160 | try: |
| 161 | import redislite # noqa: F401 |
| 162 | |
| 163 | _falkordb_available = True |
| 164 | except ImportError: |
| 165 | pass |
| 166 | |
| 167 |
| --- video_processor/integrators/graph_store.py | ||
| +++ video_processor/integrators/graph_store.py | ||
| @@ -171,11 +171,11 @@ | ||
| 171 | 171 | |
| 172 | 172 | class FalkorDBStore(GraphStore): |
| 173 | 173 | """FalkorDB Lite-backed graph store. Requires falkordblite package.""" |
| 174 | 174 | |
| 175 | 175 | def __init__(self, db_path: Union[str, Path]) -> None: |
| 176 | - from falkordb import FalkorDB | |
| 176 | + from redislite import FalkorDB | |
| 177 | 177 | |
| 178 | 178 | self._db_path = str(db_path) |
| 179 | 179 | self._db = FalkorDB(self._db_path) |
| 180 | 180 | self._graph = self._db.select_graph("knowledge") |
| 181 | 181 | self._ensure_indexes() |
| 182 | 182 |
| --- video_processor/integrators/graph_store.py | |
| +++ video_processor/integrators/graph_store.py | |
| @@ -171,11 +171,11 @@ | |
| 171 | |
| 172 | class FalkorDBStore(GraphStore): |
| 173 | """FalkorDB Lite-backed graph store. Requires falkordblite package.""" |
| 174 | |
| 175 | def __init__(self, db_path: Union[str, Path]) -> None: |
| 176 | from falkordb import FalkorDB |
| 177 | |
| 178 | self._db_path = str(db_path) |
| 179 | self._db = FalkorDB(self._db_path) |
| 180 | self._graph = self._db.select_graph("knowledge") |
| 181 | self._ensure_indexes() |
| 182 |
| --- video_processor/integrators/graph_store.py | |
| +++ video_processor/integrators/graph_store.py | |
| @@ -171,11 +171,11 @@ | |
| 171 | |
| 172 | class FalkorDBStore(GraphStore): |
| 173 | """FalkorDB Lite-backed graph store. Requires falkordblite package.""" |
| 174 | |
| 175 | def __init__(self, db_path: Union[str, Path]) -> None: |
| 176 | from redislite import FalkorDB |
| 177 | |
| 178 | self._db_path = str(db_path) |
| 179 | self._db = FalkorDB(self._db_path) |
| 180 | self._graph = self._db.select_graph("knowledge") |
| 181 | self._ensure_indexes() |
| 182 |