refactor(python): require pydantic v2 (#3990)

LanceDB's Python SDK now requires Pydantic `>=2.7.4,<3` and uses the v2
APIs throughout. This removes dual-version behavior from schema
conversion, query serialization, embedding models, and Function wire
models while preserving their existing public and canonical-wire
behavior.

The minimum-dependencies CI job pins Pydantic 2.7.4 so the declared
compatibility floor remains covered.
This commit is contained in:
Xuanwo
2026-08-21 16:50:00 +08:00
committed by GitHub
parent 09843410ec
commit 4ba2421254
13 changed files with 69 additions and 247 deletions
+1 -1
View File
@@ -2003,7 +2003,7 @@ requires-dist = [
{ name = "pyarrow", specifier = ">=16" },
{ name = "pyarrow", marker = "extra == 'tests'", specifier = "<25" },
{ name = "pyarrow-stubs", marker = "extra == 'tests'", specifier = ">=16.0" },
{ name = "pydantic", specifier = ">=1.10" },
{ name = "pydantic", specifier = ">=2.7.4,<3" },
{ name = "pylance", marker = "extra == 'pylance'", specifier = ">=5.0.0b5" },
{ name = "pylance", marker = "extra == 'tests'", specifier = "==9.0.0rc1" },
{ name = "pyright", marker = "extra == 'dev'", specifier = ">=1.1.350" },