Skip to content

Commit 13812f0

Browse files
authored
release(qdrant): 1.0.0a1 (#33236)
1 parent 420dcf5 commit 13812f0

File tree

8 files changed

+1192
-1281
lines changed

8 files changed

+1192
-1281
lines changed

libs/partners/qdrant/langchain_qdrant/qdrant.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
from __future__ import annotations
22

33
import uuid
4+
from collections.abc import Callable
45
from enum import Enum
56
from itertools import islice
67
from operator import itemgetter
78
from typing import (
89
TYPE_CHECKING,
910
Any,
10-
Callable,
1111
Optional,
1212
Union,
1313
)
@@ -1079,6 +1079,7 @@ def _generate_batches(
10791079
self.content_payload_key,
10801080
self.metadata_payload_key,
10811081
),
1082+
strict=False,
10821083
)
10831084
]
10841085

@@ -1153,7 +1154,7 @@ def _build_vectors(
11531154
),
11541155
}
11551156
for dense_vector, sparse_vector in zip(
1156-
dense_embeddings, sparse_embeddings
1157+
dense_embeddings, sparse_embeddings, strict=False
11571158
)
11581159
]
11591160

libs/partners/qdrant/langchain_qdrant/vectorstores.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
import os
55
import uuid
66
import warnings
7+
from collections.abc import Callable
78
from itertools import islice
89
from operator import itemgetter
9-
from typing import TYPE_CHECKING, Any, Callable, Optional, Union
10+
from typing import TYPE_CHECKING, Any, Optional, Union
1011

1112
import numpy as np
1213
from langchain_core._api.deprecation import deprecated
@@ -2242,6 +2243,7 @@ def _generate_rest_batches(
22422243
self.content_payload_key,
22432244
self.metadata_payload_key,
22442245
),
2246+
strict=False,
22452247
)
22462248
]
22472249

@@ -2282,6 +2284,7 @@ async def _agenerate_rest_batches(
22822284
self.content_payload_key,
22832285
self.metadata_payload_key,
22842286
),
2287+
strict=False,
22852288
)
22862289
]
22872290

libs/partners/qdrant/pyproject.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ build-backend = "pdm.backend"
55
[project]
66
authors = []
77
license = { text = "MIT" }
8-
requires-python = ">=3.9.0,<4.0.0"
8+
requires-python = ">=3.10.0,<4.0.0"
99
dependencies = [
1010
"qdrant-client>=1.10.1,<2.0.0",
1111
"pydantic>=2.7.4,<3.0.0",
12-
"langchain-core!=0.3.0,!=0.3.1,!=0.3.10,!=0.3.11,!=0.3.12,!=0.3.13,!=0.3.14,!=0.3.2,!=0.3.3,!=0.3.4,!=0.3.5,!=0.3.6,!=0.3.7,!=0.3.8,!=0.3.9,<0.4.0,>=0.2.43",
12+
"langchain-core>=1.0.0a6,<2.0.0",
1313
]
1414
name = "langchain-qdrant"
15-
version = "0.2.1"
15+
version = "1.0.0a1"
1616
description = "An integration package connecting Qdrant and LangChain"
1717
readme = "README.md"
1818

@@ -49,9 +49,6 @@ typing = ["mypy>=1.10.0,<2.0.0", "simsimd>=6.0.0,<7.0.0", "langchain-core"]
4949
langchain-core = { path = "../../core", editable = true }
5050
langchain-tests = { path = "../../standard-tests", editable = true }
5151

52-
[tool.ruff]
53-
target-version = "py39"
54-
5552
[tool.ruff.format]
5653
docstring-code-format = true
5754

@@ -68,6 +65,7 @@ ignore = [
6865
"UP045", # pyupgrade: non-pep604-annotation-optional
6966
"PLR0913", # Function has too many arguments
7067
"C901", # Complex functions
68+
"TC003",
7169

7270
# TODO"
7371
"ANN401",

libs/partners/qdrant/tests/integration_tests/async_api/test_add_texts.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ async def test_qdrant_aadd_texts_stores_ids(
8585
["abc", "def"], ids=ids, batch_size=batch_size
8686
)
8787

88-
assert all(first == second for first, second in zip(ids, returned_ids))
88+
assert all(
89+
first == second for first, second in zip(ids, returned_ids, strict=False)
90+
)
8991
assert client.count(collection_name).count == 2
9092
stored_ids = [point.id for point in client.scroll(collection_name)[0]]
9193
assert set(ids) == set(stored_ids)

libs/partners/qdrant/tests/integration_tests/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def qdrant_running_locally() -> bool:
1818
def assert_documents_equals(actual: list[Document], expected: list[Document]) -> None: # type: ignore[no-untyped-def]
1919
assert len(actual) == len(expected)
2020

21-
for actual_doc, expected_doc in zip(actual, expected):
21+
for actual_doc, expected_doc in zip(actual, expected, strict=False):
2222
assert actual_doc.page_content == expected_doc.page_content
2323

2424
assert "_id" in actual_doc.metadata

libs/partners/qdrant/tests/integration_tests/test_add_texts.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ def test_qdrant_add_texts_stores_ids(batch_size: int) -> None:
100100
vec_store = Qdrant(client, collection_name, ConsistentFakeEmbeddings())
101101
returned_ids = vec_store.add_texts(["abc", "def"], ids=ids, batch_size=batch_size)
102102

103-
assert all(first == second for first, second in zip(ids, returned_ids))
103+
assert all(
104+
first == second for first, second in zip(ids, returned_ids, strict=False)
105+
)
104106
assert client.count(collection_name).count == 2
105107
stored_ids = [point.id for point in client.scroll(collection_name)[0]]
106108
assert set(ids) == set(stored_ids)

libs/partners/qdrant/tests/integration_tests/test_embedding_interface.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from __future__ import annotations
22

33
import uuid
4-
from typing import TYPE_CHECKING, Callable, Optional
4+
from collections.abc import Callable
5+
from typing import TYPE_CHECKING, Optional
56

67
import pytest # type: ignore[import-not-found]
78

0 commit comments

Comments
 (0)