There has been a lot of activity on connect-py recently, which we can see in the large number of entries in these notes. Most are bug fixes around corner case handling such as timeouts and cancellation. Feature-wise, notable additions are support for trio for async services in addition to asyncio - support for client will come soon. And async services now respect and enforce the request timeout instead of only propagating it.
This is also the first release to officially support Python 3.15, and it drops support for the EoL Python 3.10.
🛠️ Bug fixes
- Handle services without methods in proto plugin by @anuraaga in #334
- Bound the request body by CONTENT_LENGTH in WSGI by @i2y in #343
- Close the wrapped generator in stream interceptors by @iainmcgin in #347
- Reject malformed timeout headers with invalid_argument by @stefanvanburen in #351
- Fail expired client timeouts with deadline_exceeded by @stefanvanburen in #358
- Enforce read_max_bytes on unary error responses by @stefanvanburen in #357
- Report streams that end mid-message or without an end message by @stefanvanburen in #359
- Reject unknown Connect stream compression with unimplemented by @i2y in #365
- Report malformed messages from the peer as invalid_argument by @stefanvanburen in #361
- Send errors before a gRPC stream starts as gRPC responses by @stefanvanburen in #362
- Return 415 from WSGI for unknown GET
encodingby @stefanvanburen in #377 - Keep stream deadlines from cancelling the caller between messages by @stefanvanburen in #380
- Fix connectrpc-grpcreflect's dependency floors by @stefanvanburen in #398
- Reject invalid envelope flags before decoding messages by @Zaczero in #408
- Unwind metadata interceptors after cancellation by @Zaczero in #411
- Parse gRPC timeouts without losing precision by @Zaczero in #409
- Cancel blocked server-stream handlers on client disconnect by @stefanvanburen in #395
📈 Enhancements
- Give Codec type variables defaults by @i2y in #345
- Write error bodies as UTF-8 by @i2y in #344
- Send single-message requests as a sized body by @nblintao in #346
- Lazy import pyqwest.Headers for gRPC-web by @anuraaga in #386
- Add timeout handling to ASGI server by @anuraaga in #383
- Support trio in the ASGI server by @iainmcgin in #348
- Expose a method's stream type on request context by @anuraaga in #414
New Contributors
- @lux-liang made their first contribution in #339
- @nblintao made their first contribution in #346
- @iainmcgin made their first contribution in #347
Full Changelog: v0.12.1...v0.13.0