diff --git a/sqlmodel/main.py b/sqlmodel/main.py index 7c916f79af..6481e84ff2 100644 --- a/sqlmodel/main.py +++ b/sqlmodel/main.py @@ -61,11 +61,7 @@ PYDANTIC_MINOR_VERSION, BaseConfig, ModelField, - ModelMetaclass, - Representation, SQLModelConfig, - Undefined, - UndefinedType, _calculate_keys, finish_init, get_annotations, @@ -89,6 +85,8 @@ from pydantic._internal._repr import Representation as Representation from pydantic_core import PydanticUndefined as Undefined from pydantic_core import PydanticUndefinedType as UndefinedType +else: + from ._compat import ModelMetaclass, Representation, Undefined, UndefinedType _T = TypeVar("_T") NoArgAnyCallable = Callable[[], Any]