chore: replace semver dependency with packaging (#1311)

Fixes #1296 per title. See
https://github.com/lancedb/lancedb/pull/1298#discussion_r1603931457 Cc
@wjones127

---------

Co-authored-by: Will Jones <willjones127@gmail.com>
This commit is contained in:
Philip Meier
2024-05-28 19:05:16 +02:00
committed by GitHub
parent db712b0f99
commit 1ad1c0820d
8 changed files with 14 additions and 15 deletions

View File

@@ -178,7 +178,7 @@ def test_fixed_size_list_field():
li: List[int]
data = TestModel(vec=list(range(16)), li=[1, 2, 3])
if PYDANTIC_VERSION >= (2,):
if PYDANTIC_VERSION.major >= 2:
assert json.loads(data.model_dump_json()) == {
"vec": list(range(16)),
"li": [1, 2, 3],
@@ -197,7 +197,7 @@ def test_fixed_size_list_field():
]
)
if PYDANTIC_VERSION >= (2,):
if PYDANTIC_VERSION.major >= 2:
json_schema = TestModel.model_json_schema()
else:
json_schema = TestModel.schema()