From c5a9ca7e86ebaf74b3e620c2efa4cf264c7f4883 Mon Sep 17 00:00:00 2001 From: Oliver Mannion <125105+tekumara@users.noreply.github.com> Date: Fri, 29 Sep 2023 12:27:45 +1000 Subject: [PATCH] . --- benchmark/benchmarks/pydantic.py | 4 ++-- benchmark/requirements.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/benchmark/benchmarks/pydantic.py b/benchmark/benchmarks/pydantic.py index 1ceb8197..7a01eec1 100644 --- a/benchmark/benchmarks/pydantic.py +++ b/benchmark/benchmarks/pydantic.py @@ -42,11 +42,11 @@ class Receipt(CamelModel): def methods(model: Type[CamelModel]) -> Methods: def serialize_receipts(obj: Receipt): obj.date.isoformat() - return obj.dict() + return obj.model_dump() return Methods( lambda data: model(**data), - model.dict if model is Message else serialize_receipts, + model.model_dump if model is Message else serialize_receipts, ) diff --git a/benchmark/requirements.txt b/benchmark/requirements.txt index 9f132787..82eab4ec 100644 --- a/benchmark/requirements.txt +++ b/benchmark/requirements.txt @@ -3,6 +3,6 @@ marshmallow==3.19.0 mashumaro==3.2 matplotlib==3.6.2 pandas==1.5.2 -pydantic==1.10.2 +pydantic==2.4.2 typedload==2.20 -pyserde==0.9.6 \ No newline at end of file +pyserde==0.9.6