-
Notifications
You must be signed in to change notification settings - Fork 12
v0.9.0 #176
-
BREAKING CHANGE: PyPI package renamed to connectrpc
This is the last version being published as the connect-python package - we are migrated to connectrpc as part of this release to match the same code you write with it and will only publish future versions to connectrpc. We will update these release notes after it's complete, and them make sure to update your dependency specifications to connectrpc.
This release includes a significant rework to compression handling - now, it is possible to implement custom compression methods or configure defaults with custom parameters. This release also allows configuring the supported compression methods for a server rather than automatically inspecting from application dependencies. Defaults now match other Connect implementations, only enabling gzip by default.
We have also added some other small enhancements like gRPC-Web support and improved debugging.
☢️ Breaking changes
Pass compressions rather than strings when configuring the client
Before:
GreeterClient("http://localhost", accept_compressions=["zstd", "br", "gzip"])
After:
from connectrpc.compression.brotli import BrotliCompression from connectrpc.compression.gzip import GzipCompression from connectrpc.compression.zstd import ZstdCompression GreeterClient("http://localhost", accept_compressions=[ ZstdCompression(), BrotliCompression(), GzipCompression() ])
To configure a client to use gRPC protocol, pass protocol=ProtocolType.GRPC instead of grpc=True
Before:
GreeterClient("http://localhost", grpc=True)
After:
from connectrpc.protocol import ProtocolType GreeterClient("http://localhost", protocol=ProtocolType.GRPC)
Metadata interceptors now accept Error | None in on_end
Before:
class MyInterceptor: def on_end(self, token, ctx): ...
After:
class MyInterceptor: def on_end(self, token, ctx, error): ...
📈 Enhancements
- Allow setting supported compressions in server by @anuraaga in Allow setting supported compressions in server #98
- Make Compression protocol public and default to gzip-only by @anuraaga in Make Compression protocol public and default to gzip-only #103
- Mark codegen plugin as supporting edition 2024 by @stefanvanburen in Mark plugin as supporting edition 2024 #125
- Add support for debug in error details by @stefanvanburen in Add support for debug in error details #147
- Add exception to metadata interceptors on_end by @anuraaga in Add exception to metadata interceptors on_end #149
- Add support for gRPC-web by @anuraaga in Add support for gRPC-web #161
🛠️ Bug fixes
- Process GET params for empty request messages by @Zaczero in Process GET params for empty request messages #121
-
- Fix server streaming handler not cancelled on client disconnect by @stefanvanburen in Fix server streaming handler not cancelled on client disconnect #175
New Contributors
- @Zaczero made their first contribution in Process GET params for empty request messages #121
Full Changelog: v0.8.1...v0.9.0
This discussion was created from the release v0.9.0.
Beta Was this translation helpful? Give feedback.