Skip to content

Commit 308d138

Browse files
authored
setup: add pydantic-core constraint for Python 3.13+ compatibility (#43575) (#43595)
* setup: add pydantic-core constraint for Python 3.13+ compatibility pydantic-core < 2.20 ships no pre-built wheels for cp313 and attempts to build from source using PyO3 0.21.x which does not support Python 3.13+, causing bootstrap to fail. Add a version-gated constraint so pip resolves a compatible pydantic-core when running on Python >= 3.13. * suggestion from gemini
1 parent e9ecfc2 commit 308d138

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/setup/constraints.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,3 +292,7 @@ setuptools==68.0.0
292292
# Higher versions depend on proto-plus, which break
293293
# nanopb code generation (due to name conflict of the 'proto' module)
294294
google-api-core==2.17.0
295+
296+
# pydantic-core < 2.20 uses PyO3 0.21.x which does not support Python 3.13+
297+
# See: https://github.com/pydantic/pydantic/issues/11524
298+
pydantic-core>=2.20.0,<3.0.0; python_version >= "3.13"

0 commit comments

Comments
 (0)