diff --git a/requirements-client.txt b/requirements-client.txt index 2d412a4bc90d..de5e2b5ab1e5 100644 --- a/requirements-client.txt +++ b/requirements-client.txt @@ -20,7 +20,7 @@ packaging >= 21.3, < 24.3 pathspec >= 0.8.0 pendulum >= 3.0.0, <4 prometheus-client >= 0.20.0 -pydantic >= 2.7, < 3.0.0 +pydantic >= 2.7, < 3.0.0, != 2.10.0 pydantic_core >= 2.12.0, < 3.0.0 pydantic_extra_types >= 2.8.2, < 3.0.0 pydantic_settings > 2.2.1 diff --git a/src/prefect/_internal/schemas/bases.py b/src/prefect/_internal/schemas/bases.py index 01bf0e1ab0d5..1c41ad033e0d 100644 --- a/src/prefect/_internal/schemas/bases.py +++ b/src/prefect/_internal/schemas/bases.py @@ -84,12 +84,9 @@ def reset_fields(self: Self) -> Self: Returns: PrefectBaseModel: A new instance of the model with the reset fields. """ - data = self.model_dump() return self.model_copy( update={ - field: self.model_fields[field].get_default( - call_default_factory=True, validated_data=data - ) + field: self.model_fields[field].get_default(call_default_factory=True) for field in self._reset_fields } ) diff --git a/src/prefect/server/utilities/schemas/bases.py b/src/prefect/server/utilities/schemas/bases.py index b50073128a59..da871d38c862 100644 --- a/src/prefect/server/utilities/schemas/bases.py +++ b/src/prefect/server/utilities/schemas/bases.py @@ -109,12 +109,9 @@ def reset_fields(self: Self) -> Self: Returns: PrefectBaseModel: A new instance of the model with the reset fields. """ - data = self.model_dump() return self.model_copy( update={ - field: self.model_fields[field].get_default( - call_default_factory=True, validated_data=data - ) + field: self.model_fields[field].get_default(call_default_factory=True) for field in self._reset_fields } )