From 5d1bf5c2f3e8a63e817313f58ad97fb9ffddf34a Mon Sep 17 00:00:00 2001 From: John Lyu Date: Wed, 5 Feb 2025 14:23:02 +0800 Subject: [PATCH] support python < 3.9 --- sqlmodel/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sqlmodel/main.py b/sqlmodel/main.py index a8d4936..e0e1cc7 100644 --- a/sqlmodel/main.py +++ b/sqlmodel/main.py @@ -550,8 +550,9 @@ class SQLModelMetaclass(ModelMetaclass, DeclarativeMeta): # thus pydantic will use the value of the attribute as the default value base_annotations.update(dict_used["__annotations__"]) dict_used["__annotations__"] = base_annotations + base_fields.update(dict_used) new_cls = super().__new__( - cls, name, bases, base_fields | dict_used, **config_kwargs + cls, name, bases, base_fields, **config_kwargs ) new_cls.__annotations__ = { **relationship_annotations,