From 19495f69d747bff25ae3bfe4022a6a7c88d18a68 Mon Sep 17 00:00:00 2001 From: Willi Ballenthin Date: Thu, 10 Aug 2023 13:29:52 +0000 Subject: [PATCH] freeze: pydantic v2 fixes --- capa/features/freeze/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/capa/features/freeze/__init__.py b/capa/features/freeze/__init__.py index 8bbc4dc55..7af642f6a 100644 --- a/capa/features/freeze/__init__.py +++ b/capa/features/freeze/__init__.py @@ -334,9 +334,7 @@ class DynamicFeatures(BaseModel): global_: Tuple[GlobalFeature, ...] = Field(alias="global") file: Tuple[FileFeature, ...] processes: Tuple[ProcessFeatures, ...] - - class Config: - allow_population_by_field_name = True + model_config = ConfigDict(populate_by_name=True) Features: TypeAlias = Union[StaticFeatures, DynamicFeatures]