Skip to content

v0.9.0

Latest

Choose a tag to compare

@anuraaga anuraaga released this 19 Mar 02:39
· 18 commits to main since this release
fd83a6f

BREAKING CHANGE: PyPI package renamed to connectrpc

This is the last version published as the connect-python package - we have 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. Make sure to update your dependency specifications to connectrpc to continue to receive updates. Sorry for the churn as we get closer to a stable state.


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

🛠️ Bug fixes

  • Process GET params for empty request messages by @Zaczero in #121

New Contributors

Full Changelog: v0.8.1...v0.9.0