diff --git a/docs/changelog.md b/docs/changelog.md index 519f061457..2ae6ed025a 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -18,6 +18,9 @@ See [#2440](https://github.com/pydantic/pydantic-ai/pull/2440) - The `next` meth See [#2443](https://github.com/pydantic/pydantic-ai/pull/2443) - The `data` property was removed from the `FinalResult` class. Use `output` instead. +See [#2445](https://github.com/pydantic/pydantic-ai/pull/2445) - The `get_data` and `validate_structured_result` methods were removed from the +`StreamedRunResult` class. Use `get_output` and `validate_structured_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 9fdd88e121..db06e1b5c5 100644 --- a/pydantic_ai_slim/pydantic_ai/result.py +++ b/pydantic_ai_slim/pydantic_ai/result.py @@ -460,10 +460,6 @@ async def get_output(self) -> OutputDataT: await self._marked_completed(self._stream_response.get()) return output - @deprecated('`get_data` is deprecated, use `get_output` instead.') - async def get_data(self) -> OutputDataT: - return await self.get_output() - def usage(self) -> Usage: """Return the usage of the whole run. @@ -476,12 +472,6 @@ def timestamp(self) -> datetime: """Get the timestamp of the response.""" return self._stream_response.timestamp() - @deprecated('`validate_structured_result` is deprecated, use `validate_structured_output` instead.') - async def validate_structured_result( - self, message: _messages.ModelResponse, *, allow_partial: bool = False - ) -> OutputDataT: - return await self.validate_structured_output(message, allow_partial=allow_partial) - async def validate_structured_output( self, message: _messages.ModelResponse, *, allow_partial: bool = False ) -> OutputDataT: