From 95497e84ba0ce04262eaf34f2d4922cf70ffdba2 Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Wed, 6 Aug 2025 14:34:02 +0200 Subject: [PATCH 1/2] BREAKING CHANGE: Remove `data` from `FinalResult` --- docs/changelog.md | 2 ++ pydantic_ai_slim/pydantic_ai/result.py | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index baaada01f4..0193a77f37 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -16,6 +16,8 @@ Pydantic AI is still pre-version 1, so breaking changes will occur, however: See [#2440](https://github.com/pydantic/pydantic-ai/pull/2440) - The `next` method was removed from the `Graph` class. Use `async with graph.iter(...) as run: run.next()` instead. +See [#2442](https://github.com/pydantic/pydantic-ai/pull/2442) - The `data` property was removed from the `FinalResult` class. Use `output` instead. + ### v0.5.0 (2025-08-04) See [#2388](https://github.com/pydantic/pydantic-ai/pull/2388) - The `source` field of an `EvaluationResult` is now of type `EvaluatorSpec` rather than the actual source `Evaluator` instance, to help with serialization/deserialization. diff --git a/pydantic_ai_slim/pydantic_ai/result.py b/pydantic_ai_slim/pydantic_ai/result.py index 2dc3eb8259..9fdd88e121 100644 --- a/pydantic_ai_slim/pydantic_ai/result.py +++ b/pydantic_ai_slim/pydantic_ai/result.py @@ -507,11 +507,6 @@ class FinalResult(Generic[OutputDataT]): tool_call_id: str | None = None """ID of the tool call that produced the final output; `None` if the output came from unstructured text content.""" - @property - @deprecated('`data` is deprecated, use `output` instead.') - def data(self) -> OutputDataT: - return self.output - __repr__ = _utils.dataclasses_no_defaults_repr From 0b7af856b72c9998c2c3eaab200635231cb1a083 Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Wed, 6 Aug 2025 14:34:48 +0200 Subject: [PATCH 2/2] Update docs/changelog.md --- docs/changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index 0193a77f37..519f061457 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -16,7 +16,7 @@ Pydantic AI is still pre-version 1, so breaking changes will occur, however: See [#2440](https://github.com/pydantic/pydantic-ai/pull/2440) - The `next` method was removed from the `Graph` class. Use `async with graph.iter(...) as run: run.next()` instead. -See [#2442](https://github.com/pydantic/pydantic-ai/pull/2442) - The `data` property was removed from the `FinalResult` class. Use `output` instead. +See [#2443](https://github.com/pydantic/pydantic-ai/pull/2443) - The `data` property was removed from the `FinalResult` class. Use `output` instead. ### v0.5.0 (2025-08-04)