Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
45b7adb
Remove support for python 3.9
dirkkul Dec 2, 2025
c8be0eb
Remove more 3.9 CI tests
dirkkul Dec 2, 2025
2fcb9c9
Fix syntax
dirkkul Dec 2, 2025
8d730c6
Update pydantic dependency to support python 3.14
dirkkul Dec 2, 2025
333cfae
Fix typing issue with AnyUrl
dirkkul Dec 2, 2025
5aa688d
More version increases for python 3.14
dirkkul Dec 2, 2025
3748658
Increase pre-commit hook versions for py3.14 compatibility
dirkkul Dec 2, 2025
0540724
Also increase ruff in pre-commit
dirkkul Dec 2, 2025
9f2f822
Readd old grpc version to CI
dirkkul Dec 2, 2025
b74ff61
Merge pull request #1898 from weaviate/deprecate_python39
dirkkul Dec 2, 2025
db9d4c2
Merge branch 'main' into dev/1.35
dirkkul Dec 3, 2025
a2ff385
Add object ttl
dirkkul Dec 2, 2025
bfc68d4
Fix mock test
dirkkul Dec 2, 2025
8a4cc5a
Add support for default TTL for custom date property
dirkkul Dec 3, 2025
b5c6b02
TTL parameter name proposals
databyjp Dec 10, 2025
e2e0230
Rename params to match server
databyjp Dec 10, 2025
81de316
Merge pull request #1905 from weaviate/object_ttl_params
dirkkul Dec 11, 2025
ef6e0e3
Add support for updating object TTL config
dirkkul Dec 11, 2025
75a5885
Add weaviate 1.35 to test matrix
dirkkul Dec 11, 2025
e0fa645
Merge pull request #1899 from weaviate/object_ttl
dirkkul Dec 12, 2025
866ced0
Merge main
databyjp Dec 18, 2025
4dc8b26
Update authlib
dirkkul Dec 18, 2025
2c800a1
Merge pull request #1911 from weaviate/dependencies
databyjp Dec 18, 2025
8cfe8c8
Merge branch 'chore/descope' into dev/1.35
databyjp Dec 18, 2025
d5bf0a2
Merge branch 'main' into dev/1.35
dirkkul Dec 18, 2025
8d6028b
Bump Weaviate versions for CICD
databyjp Dec 18, 2025
3d20d73
Merge branch 'dev/1.35' of github.com:weaviate/weaviate-python-client…
databyjp Dec 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ env:
WEAVIATE_127: 1.27.27
WEAVIATE_128: 1.28.16
WEAVIATE_129: 1.29.11
WEAVIATE_130: 1.30.21
WEAVIATE_131: 1.31.19
WEAVIATE_132: 1.32.16
WEAVIATE_133: 1.33.4
WEAVIATE_134: 1.34.0
WEAVIATE_130: 1.30.22
WEAVIATE_131: 1.31.20
WEAVIATE_132: 1.32.23
WEAVIATE_133: 1.33.10
WEAVIATE_134: 1.34.5
WEAVIATE_135: 1.35.0

jobs:
lint-and-format:
Expand Down Expand Up @@ -59,7 +60,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
folder: ["weaviate", "integration", "integration_embedded"]
steps:
- uses: actions/checkout@v4
Expand All @@ -79,7 +80,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
folder: ["test", "mock_tests"]
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -122,7 +123,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
optional_dependencies: [false]
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -153,11 +154,11 @@ jobs:
fail-fast: false
matrix:
versions: [
{ py: "3.9", weaviate: $WEAVIATE_132, grpc: "1.59.0"},
{ py: "3.10", weaviate: $WEAVIATE_132, grpc: "1.66.0"},
{ py: "3.11", weaviate: $WEAVIATE_132, grpc: "1.70.0"},
{ py: "3.12", weaviate: $WEAVIATE_132, grpc: "1.72.1"},
{ py: "3.13", weaviate: $WEAVIATE_132, grpc: "1.74.0"}
{ py: "3.10", weaviate: $WEAVIATE_132, grpc: "1.59.0"},
{ py: "3.11", weaviate: $WEAVIATE_132, grpc: "1.66.0"},
{ py: "3.12", weaviate: $WEAVIATE_132, grpc: "1.70.0"},
{ py: "3.13", weaviate: $WEAVIATE_132, grpc: "1.72.1"},
{ py: "3.14", weaviate: $WEAVIATE_132, grpc: "1.76.0"}
]
optional_dependencies: [false]
steps:
Expand Down Expand Up @@ -208,11 +209,11 @@ jobs:
fail-fast: false
matrix:
versions: [
{ py: "3.9", weaviate: $WEAVIATE_132},
{ py: "3.10", weaviate: $WEAVIATE_132},
{ py: "3.11", weaviate: $WEAVIATE_132},
{ py: "3.12", weaviate: $WEAVIATE_132},
{ py: "3.13", weaviate: $WEAVIATE_132}
{ py: "3.13", weaviate: $WEAVIATE_132},
{ py: "3.14", weaviate: $WEAVIATE_132}
]
optional_dependencies: [false]
steps:
Expand Down Expand Up @@ -305,6 +306,7 @@ jobs:
$WEAVIATE_132,
$WEAVIATE_133,
$WEAVIATE_134
$WEAVIATE_135
]
steps:
- name: Checkout
Expand Down
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.11.7
rev: v0.14.7
hooks:
# Run the linter.
- id: ruff
Expand All @@ -19,24 +19,24 @@ repos:
args: [ weaviate, integration, test, mock_tests, journey_tests ]

- repo: https://github.com/PyCQA/flake8
rev: 7.1.0
rev: 7.3.0
hooks:
- id: flake8
name: linting
additional_dependencies: [
'flake8-bugbear==22.10.27',
'flake8-comprehensions==3.10.1',
'flake8-builtins==2.0.1'
'flake8-bugbear==24.12.12',
'flake8-comprehensions==3.17.0',
'flake8-builtins==3.0.0'
]
- id: flake8
name: docstrings
additional_dependencies: [
'flake8-docstrings==1.7.0',
'pydoclint==0.6.5',
'pydoclint==0.7.3',
]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v6.0.0
hooks:
- id: no-commit-to-branch
- id: trailing-whitespace
Expand Down
9 changes: 6 additions & 3 deletions integration/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import time
from typing import (
Any,
AsyncGenerator,
Expand All @@ -11,16 +12,16 @@
Type,
Union,
)
from typing import Callable, TypeVar

import pytest
import pytest_asyncio
from _pytest.fixtures import SubRequest
import time
from typing import Callable, TypeVar

import weaviate
from weaviate.collections import Collection, CollectionAsync
from weaviate.collections.classes.config import (
_ObjectTTLConfigCreate,
Configure,
DataType,
Property,
Expand All @@ -37,7 +38,6 @@
from weaviate.collections.classes.config_named_vectors import _NamedVectorConfigCreate
from weaviate.collections.classes.types import Properties
from weaviate.config import AdditionalConfig

from weaviate.exceptions import UnexpectedStatusCodeError


Expand Down Expand Up @@ -66,6 +66,7 @@ def __call__(
vector_config: Optional[
Optional[Union[_VectorConfigCreate, List[_VectorConfigCreate]]]
] = None,
object_ttl: Optional[_ObjectTTLConfigCreate] = None,
) -> Collection[Any, Any]:
"""Typing for fixture."""
...
Expand Down Expand Up @@ -140,6 +141,7 @@ def _factory(
vector_config: Optional[
Optional[Union[_VectorConfigCreate, List[_VectorConfigCreate]]]
] = None,
object_ttl: Optional[_ObjectTTLConfigCreate] = None,
) -> Collection[Any, Any]:
try:
nonlocal client_fixture, name_fixtures, call_counter # noqa: F824
Expand Down Expand Up @@ -172,6 +174,7 @@ def _factory(
vector_index_config=vector_index_config,
reranker_config=reranker_config,
vector_config=vector_config,
object_ttl_config=object_ttl,
)
return collection
except Exception as e:
Expand Down
117 changes: 117 additions & 0 deletions integration/test_collection_config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import datetime
from typing import Generator, List, Optional, Union

import pytest as pytest
Expand Down Expand Up @@ -1833,3 +1834,119 @@ def test_uncompressed_quantitizer(collection_factory: CollectionFactory) -> None
assert config.vector_index_config is not None
assert isinstance(config.vector_index_config, _VectorIndexConfigHNSW)
assert config.vector_index_config.quantizer is None


def test_object_ttl_creation(collection_factory: CollectionFactory) -> None:
dummy = collection_factory("dummy")
if dummy._connection._weaviate_version.is_lower_than(1, 35, 0):
pytest.skip("object ttl is not supported in Weaviate versions lower than 1.35.0")

collection = collection_factory(
object_ttl=Configure.ObjectTTL.delete_by_creation_time(
time_to_live=datetime.timedelta(days=30),
filter_expired_objects=True,
),
inverted_index_config=Configure.inverted_index(index_timestamps=True),
)

config = collection.config.get()
assert config.object_ttl_config is not None
assert config.object_ttl_config.delete_on == "creationTime"
assert config.object_ttl_config.time_to_live == datetime.timedelta(days=30)


def test_object_ttl_update_time(collection_factory: CollectionFactory) -> None:
dummy = collection_factory("dummy")
if dummy._connection._weaviate_version.is_lower_than(1, 35, 0):
pytest.skip("object ttl is not supported in Weaviate versions lower than 1.35.0")

collection = collection_factory(
object_ttl=Configure.ObjectTTL.delete_by_update_time(
time_to_live=datetime.timedelta(days=30),
filter_expired_objects=True,
),
inverted_index_config=Configure.inverted_index(index_timestamps=True),
)

config = collection.config.get()
assert config.object_ttl_config is not None
assert config.object_ttl_config.delete_on == "updateTime"
assert config.object_ttl_config.filter_expired_objects
assert config.object_ttl_config.time_to_live == datetime.timedelta(days=30)


def test_object_ttl_custom(collection_factory: CollectionFactory) -> None:
dummy = collection_factory("dummy")
if dummy._connection._weaviate_version.is_lower_than(1, 35, 0):
pytest.skip("object ttl is not supported in Weaviate versions lower than 1.35.0")

collection = collection_factory(
properties=[wvc.config.Property(name="customDate", data_type=DataType.DATE)],
object_ttl=Configure.ObjectTTL.delete_by_date_property(
property_name="customDate", filter_expired_objects=False, ttl_offset=-1
),
inverted_index_config=Configure.inverted_index(index_timestamps=True),
)

config = collection.config.get()
assert config.object_ttl_config is not None
assert config.object_ttl_config.delete_on == "customDate"
assert config.object_ttl_config.time_to_live == datetime.timedelta(seconds=-1)
assert not config.object_ttl_config.filter_expired_objects


def test_object_ttl_update(collection_factory: CollectionFactory) -> None:
dummy = collection_factory("dummy")
if dummy._connection._weaviate_version.is_lower_than(1, 35, 0):
pytest.skip("object ttl is not supported in Weaviate versions lower than 1.35.0")

collection = collection_factory(
properties=[
wvc.config.Property(name="customDate", data_type=DataType.DATE),
wvc.config.Property(name="customDate2", data_type=DataType.DATE),
],
inverted_index_config=Configure.inverted_index(index_timestamps=True),
)

conf = collection.config.get()
assert conf.object_ttl_config is None

collection.config.update(
object_ttl_config=Reconfigure.ObjectTTL.delete_by_date_property(
property_name="customDate", filter_expired_objects=True, ttl_offset=3600
),
)

conf = collection.config.get()
assert conf.object_ttl_config is not None
assert conf.object_ttl_config.delete_on == "customDate"
assert conf.object_ttl_config.time_to_live == datetime.timedelta(seconds=3600)
assert conf.object_ttl_config.filter_expired_objects

collection.config.update(
object_ttl_config=Reconfigure.ObjectTTL.delete_by_update_time(filter_expired_objects=False),
)

conf = collection.config.get()
assert conf.object_ttl_config is not None
assert conf.object_ttl_config.delete_on == "updateTime"
assert conf.object_ttl_config.time_to_live == datetime.timedelta(seconds=3600)
assert not conf.object_ttl_config.filter_expired_objects

collection.config.update(
object_ttl_config=Reconfigure.ObjectTTL.delete_by_creation_time(
time_to_live=datetime.timedelta(seconds=600),
),
)

conf = collection.config.get()
assert conf.object_ttl_config is not None
assert conf.object_ttl_config.delete_on == "creationTime"
assert conf.object_ttl_config.time_to_live == datetime.timedelta(seconds=600)
assert not conf.object_ttl_config.filter_expired_objects

collection.config.update(
object_ttl_config=Reconfigure.ObjectTTL.disable(),
)
conf = collection.config.get()
assert conf.object_ttl_config is None
1 change: 1 addition & 0 deletions mock_tests/test_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def test_missing_multi_tenancy_config(
reranker_config=None,
vectorizer_config=None,
vector_config=None,
object_ttl_config=None,
inverted_index_config=InvertedIndexConfig(
bm25=BM25Config(b=0, k1=0),
cleanup_interval_seconds=0,
Expand Down
8 changes: 4 additions & 4 deletions requirements-devel.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
httpx==0.26.0
validators==0.34.0
authlib==1.6.5
grpcio==1.66.2
grpcio-tools==1.66.2
grpcio-health-checking==1.66.2
pydantic==2.8.0
grpcio==1.75.1
grpcio-tools==1.75.1
grpcio-health-checking==1.75.1
pydantic==2.12.0
deprecation==2.1.0

build
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ include_package_data = True
install_requires =
httpx>=0.26.0,<0.29.0
validators>=0.34.0,<1.0.0
authlib>=1.2.1,<2.0.0
pydantic>=2.8.0,<3.0.0
authlib>=1.6.5,<2.0.0
pydantic>=2.12.0,<3.0.0
grpcio>=1.59.5,<1.80.0
protobuf>=4.21.6,<7.0.0
deprecation>=2.1.0,<3.0.0
python_requires = >=3.9
python_requires = >=3.10

[options.extras_require]
agents =
Expand Down
Loading
Loading