From 1563a466d8983a8a1e621414b9a14d0b2751eaa5 Mon Sep 17 00:00:00 2001 From: elijahbenizzy Date: Tue, 10 Dec 2024 13:59:10 -0800 Subject: [PATCH] Updates pydantic config setting to use proper settings approach --- tests/integrations/test_burr_pydantic.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/integrations/test_burr_pydantic.py b/tests/integrations/test_burr_pydantic.py index 0d330f0d..878833fc 100644 --- a/tests/integrations/test_burr_pydantic.py +++ b/tests/integrations/test_burr_pydantic.py @@ -3,7 +3,7 @@ import pydantic import pytest -from pydantic import BaseModel, EmailStr, Field +from pydantic import BaseModel, ConfigDict, EmailStr, Field from pydantic.fields import FieldInfo from burr.core import expr @@ -110,8 +110,7 @@ class MyModelWithConfig(pydantic.BaseModel): foo: int arbitrary: Arbitrary - class Config: - arbitrary_types_allowed = True + model_config = ConfigDict(arbitrary_types_allowed=True) SubsetModel = subset_model(MyModelWithConfig, ["foo", "bar"], [], "Subset") assert SubsetModel.__name__ == "MyModelWithConfigSubset"