Skip to main content

_ensure_pydantic_core_version

Validates that the installed version of pydantic-core is compatible with the current pydantic version, raising a SystemError if a mismatch is detected and the package is not installed in editable mode.

def _ensure_pydantic_core_version() - > None

Verifies that the installed pydantic-core version is compatible with the current Pydantic version to prevent runtime errors. It raises a SystemError if a mismatch is detected, unless Pydantic is installed in editable development mode on Python 3.13+.

Returns

TypeDescription
NoneNothing is returned if the version check passes or if the error is suppressed in development mode.