Python: Event Streaming (#2482)
* Add `RustType.Application` and `PythonType.Application` variants
* Use `RustType.Application` for event streaming symbols
* Call symbol provider to get `Receiver` type instead of hardcoding
* Add Python specific event streaming symbol provider
* Add event streaming wrapper generator
* Generate correct type information for event streaming types
* Add `CapturePokemon` operation to Python Pokemon service
* Add `InternalServerError` variant to all event streaming errors
* Use `PythonServerCargoDependency` for PyO3Asyncio imports
* Return an attribute error instead of panicking in `IntoPy` impls of wrappers
* Add `Sync` bound to `new` methods of wrappers
* Revert "Add `InternalServerError` variant to all event streaming errors"
This reverts commit b610cb27c7532102e3a3ec15a59da6c56b60c318.
* Add `PythonServerEventStreamErrorGenerator` to generate Python specific error types for unions
* Try to extract error type or inner type from incoming streaming value and ignore the value otherwise for now
* Allow missing type-stubs for `aiohttp`
* Propogate modelled errors through stream
* Raise modelled exceptions rather than sending through stream
* Allow senders from Python side to raise modelled exceptions
* Update `EventStreamSymbolProviderTest` to use `Application` type instead of `Opaque` type
* Fix `ktlint` issues
* Group up common variables in `codegenScope`
* Document `RustType.Application`
* Format `codegen-server-test/python/model/pokemon.smithy`
* Use `tokio-stream` crate instead of `futures` crate
* Use a better error message if user tries to reuse a stream
* Add some details about event streams to example Pokemon service
---------
Co-authored-by:
Matteo Bigoi <1781140+crisidev@users.noreply.github.com>
Loading
Please register or sign in to comment