diff --git a/pyproject.toml b/pyproject.toml index 94be82e..bc48371 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,7 @@ dependencies = [ "google-auth-oauthlib~=0.4.4", "networkx~=2.5.1", "openpyxl", - "pydantic < 2", + "pydantic >= 2", "tablib[ods]>=3.1.0", ] diff --git a/src/rpft/parsers/common/model_inference.py b/src/rpft/parsers/common/model_inference.py index ae836a9..3d6aa36 100644 --- a/src/rpft/parsers/common/model_inference.py +++ b/src/rpft/parsers/common/model_inference.py @@ -1,7 +1,7 @@ from collections import defaultdict from typing import List, ForwardRef, _eval_type from pydoc import locate -from pydantic import create_model +from pydantic.v1 import create_model from rpft.parsers.common.rowparser import ( ParserModel, diff --git a/src/rpft/parsers/common/rowparser.py b/src/rpft/parsers/common/rowparser.py index 817c31e..6c31c2e 100644 --- a/src/rpft/parsers/common/rowparser.py +++ b/src/rpft/parsers/common/rowparser.py @@ -3,7 +3,7 @@ from collections.abc import Iterable from typing import List -from pydantic import BaseModel +from pydantic.v1 import BaseModel class RowParserError(Exception): diff --git a/src/rpft/parsers/creation/campaigneventrowmodel.py b/src/rpft/parsers/creation/campaigneventrowmodel.py index 5088408..e48c955 100644 --- a/src/rpft/parsers/creation/campaigneventrowmodel.py +++ b/src/rpft/parsers/creation/campaigneventrowmodel.py @@ -1,5 +1,5 @@ from rpft.parsers.common.rowparser import ParserModel -from pydantic import validator +from pydantic.v1 import validator class CampaignEventRowModel(ParserModel): diff --git a/src/rpft/parsers/creation/triggerrowmodel.py b/src/rpft/parsers/creation/triggerrowmodel.py index de1f3b9..fb2d038 100644 --- a/src/rpft/parsers/creation/triggerrowmodel.py +++ b/src/rpft/parsers/creation/triggerrowmodel.py @@ -1,6 +1,6 @@ from typing import List -from pydantic import validator +from pydantic.v1 import validator from rpft.parsers.common.rowparser import ParserModel diff --git a/tests/test_model_inference.py b/tests/test_model_inference.py index 9b36d2c..d677583 100644 --- a/tests/test_model_inference.py +++ b/tests/test_model_inference.py @@ -1,6 +1,6 @@ from typing import List import unittest -from pydantic import create_model, BaseModel +from pydantic.v1 import create_model, BaseModel from rpft.parsers.common.model_inference import ( get_value_for_type,