Skip to content

Commit 622d3ac

Browse files
authored
BREAKING CHANGE: Remove get_data and validate_structured_result from StreamedRunResult (#2445)
1 parent b6fa8e7 commit 622d3ac

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

docs/changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ See [#2440](https://github.com/pydantic/pydantic-ai/pull/2440) - The `next` meth
1818

1919
See [#2443](https://github.com/pydantic/pydantic-ai/pull/2443) - The `data` property was removed from the `FinalResult` class. Use `output` instead.
2020

21+
See [#2445](https://github.com/pydantic/pydantic-ai/pull/2445) - The `get_data` and `validate_structured_result` methods were removed from the
22+
`StreamedRunResult` class. Use `get_output` and `validate_structured_output` instead.
23+
2124
### v0.5.0 (2025-08-04)
2225

2326
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.

pydantic_ai_slim/pydantic_ai/result.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -460,10 +460,6 @@ async def get_output(self) -> OutputDataT:
460460
await self._marked_completed(self._stream_response.get())
461461
return output
462462

463-
@deprecated('`get_data` is deprecated, use `get_output` instead.')
464-
async def get_data(self) -> OutputDataT:
465-
return await self.get_output()
466-
467463
def usage(self) -> Usage:
468464
"""Return the usage of the whole run.
469465
@@ -476,12 +472,6 @@ def timestamp(self) -> datetime:
476472
"""Get the timestamp of the response."""
477473
return self._stream_response.timestamp()
478474

479-
@deprecated('`validate_structured_result` is deprecated, use `validate_structured_output` instead.')
480-
async def validate_structured_result(
481-
self, message: _messages.ModelResponse, *, allow_partial: bool = False
482-
) -> OutputDataT:
483-
return await self.validate_structured_output(message, allow_partial=allow_partial)
484-
485475
async def validate_structured_output(
486476
self, message: _messages.ModelResponse, *, allow_partial: bool = False
487477
) -> OutputDataT:

0 commit comments

Comments
 (0)