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)