Skip to content

v2.0.0-beta5

Pre-release
Pre-release
Compare
Choose a tag to compare
@Gobot1234 Gobot1234 released this 01 Aug 23:28
· 70 commits to master since this release
496eba2

Enhancements

  • Breaking: Client and Service Stubs no longer pack and unpack the input message fields as parameters #331:

    Update your client calls and server handlers as follows:

    Clients before:

    response = await service.echo(value="hello", extra_times=1)

    Clients after:

    response = await service.echo(EchoRequest(value="hello", extra_times=1))

    Servers before:

    async def echo(self, value: str, extra_times: int) -> EchoResponse: ...

    Servers after:

    async def echo(self, echo_request: EchoRequest) -> EchoResponse:
        # Use echo_request.value
        # Use echo_request.extra_times
        ...
  • Format field comments also as docstrings #304

  • Implement __deepcopy__ for Message #339

  • Implement to/from_pydict() for Message #203

  • Run isort on compiled code #355

  • Expose timeout, deadline and metadata parameters from grpclib #352

  • Make Message.__getattribute__ invisible to type checkers #359

Bug Fixes

  • Fix map field edge-case #254
  • Fix message text in NotImplementedError #325
  • Fix Message.from_dict() in the presence of optional datetime fields #329
  • Support Jinja2 3.0 #330 & #402
  • Fix overwriting top level __init__.py #337
  • Remove deprecation warnings when fields are initialised with non-default values #348
  • Ensure nested class names are converted to PascalCase #353
  • Fix Message.to_dict() mutating the underlying Message #378
  • Fix some parameters being missing from services #381