From 8bb01801bf92b608fe43814d991a1d10e9aa03ab Mon Sep 17 00:00:00 2001 From: larsevj Date: Wed, 11 Dec 2024 17:22:40 +0100 Subject: [PATCH] Unpin pydantic --- pyproject.toml | 2 +- src/ert/config/ert_config.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index cfe295eabf8..30e430daeab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ dependencies = [ "polars", "psutil", "pyarrow", # extra dependency for pandas (parquet) - "pydantic > 2, < 2.10", + "pydantic > 2", "PyQt5", "python-dateutil", "python-multipart", # extra dependency for fastapi diff --git a/src/ert/config/ert_config.py b/src/ert/config/ert_config.py index 8495ff2f48c..6864a32b335 100644 --- a/src/ert/config/ert_config.py +++ b/src/ert/config/ert_config.py @@ -20,7 +20,7 @@ import polars from pydantic import ValidationError as PydanticValidationError from pydantic import field_validator -from pydantic.dataclasses import dataclass +from pydantic.dataclasses import dataclass, rebuild_dataclass from ert.plugins import ErtPluginManager from ert.substitutions import Substitutions @@ -1193,3 +1193,7 @@ def _forward_model_step_from_config_file( ) except OSError as err: raise ConfigValidationError.with_context(str(err), config_file) from err + + +# Due to circular dependency in type annotations between ErtConfig -> WorkflowJob -> ErtScript -> ErtConfig +rebuild_dataclass(ErtConfig)