From a73355ed5a8bdebc7883d81748ec43e76c9c8007 Mon Sep 17 00:00:00 2001 From: Stefano Fiorucci Date: Fri, 18 Oct 2024 17:35:58 +0200 Subject: [PATCH] fix: compatibility with Weaviate 4.9.0 (#1143) * compatibiliti with weaviate 4.9.0 * extend from_dict test --- .github/workflows/weaviate.yml | 2 +- integrations/weaviate/pyproject.toml | 4 ++-- integrations/weaviate/tests/test_document_store.py | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/weaviate.yml b/.github/workflows/weaviate.yml index 06a4bc289..36c30f069 100644 --- a/.github/workflows/weaviate.yml +++ b/.github/workflows/weaviate.yml @@ -30,7 +30,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 diff --git a/integrations/weaviate/pyproject.toml b/integrations/weaviate/pyproject.toml index 0e6a0d18d..70b045bc4 100644 --- a/integrations/weaviate/pyproject.toml +++ b/integrations/weaviate/pyproject.toml @@ -7,7 +7,7 @@ name = "weaviate-haystack" dynamic = ["version"] description = "An integration of Weaviate vector database with Haystack" readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.9" license = "Apache-2.0" keywords = [] authors = [{ name = "deepset GmbH", email = "info@deepset.ai" }] @@ -25,7 +25,7 @@ classifiers = [ ] dependencies = [ "haystack-ai", - "weaviate-client>=4.0", + "weaviate-client>=4.9", "haystack-pydoc-tools", "python-dateutil", ] diff --git a/integrations/weaviate/tests/test_document_store.py b/integrations/weaviate/tests/test_document_store.py index 190c23408..70f1e1eb2 100644 --- a/integrations/weaviate/tests/test_document_store.py +++ b/integrations/weaviate/tests/test_document_store.py @@ -265,6 +265,7 @@ def test_to_dict(self, _mock_weaviate, monkeypatch): "session_pool_connections": 20, "session_pool_maxsize": 100, "session_pool_max_retries": 3, + "session_pool_timeout": 5, }, "proxies": {"http": "http://proxy:1234", "https": None, "grpc": None}, "timeout": [30, 90], @@ -302,6 +303,7 @@ def test_from_dict(self, _mock_weaviate, monkeypatch): "connection": { "session_pool_connections": 20, "session_pool_maxsize": 20, + "session_pool_timeout": 5, }, "proxies": {"http": "http://proxy:1234"}, "timeout": [10, 60], @@ -338,6 +340,7 @@ def test_from_dict(self, _mock_weaviate, monkeypatch): assert document_store._embedded_options.grpc_port == DEFAULT_GRPC_PORT assert document_store._additional_config.connection.session_pool_connections == 20 assert document_store._additional_config.connection.session_pool_maxsize == 20 + assert document_store._additional_config.connection.session_pool_timeout == 5 def test_to_data_object(self, document_store, test_files_path): doc = Document(content="test doc")