From 838e13bdb1b405886d0ed83b55b9fe7cd27d1a22 Mon Sep 17 00:00:00 2001 From: Robin5605 Date: Mon, 8 Jul 2024 12:06:51 -0500 Subject: [PATCH 1/2] Revert "Update deprecated Pydantic config" Revert #254 #270 --- src/mainframe/models/schemas.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mainframe/models/schemas.py b/src/mainframe/models/schemas.py index 3624e34b..97af4692 100644 --- a/src/mainframe/models/schemas.py +++ b/src/mainframe/models/schemas.py @@ -2,7 +2,7 @@ from typing import Any, Optional from enum import Enum -from pydantic import BaseModel, ConfigDict, Field, field_serializer +from pydantic import BaseModel, Field, field_serializer from mainframe.models.orm import Scan @@ -82,11 +82,12 @@ class PackageSpecifier(BaseModel): version: A str of the package version to scan. """ - model_config = ConfigDict(frozen=True) - name: str version: str + class Config: + fozen = True + class ReportPackageBody(PackageSpecifier): recipient: Optional[str] From 9058c92029a3aa36168a73ab86039ea7fa7282b2 Mon Sep 17 00:00:00 2001 From: Robin5605 Date: Mon, 8 Jul 2024 12:25:30 -0500 Subject: [PATCH 2/2] Fix typo --- src/mainframe/models/schemas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mainframe/models/schemas.py b/src/mainframe/models/schemas.py index 97af4692..012ee467 100644 --- a/src/mainframe/models/schemas.py +++ b/src/mainframe/models/schemas.py @@ -86,7 +86,7 @@ class PackageSpecifier(BaseModel): version: str class Config: - fozen = True + frozen = True class ReportPackageBody(PackageSpecifier):