Skip to content

Commit d663a31

Browse files
Gobot1234nat-n
andauthored
Release v.2.0.0b5 (#350)
* Implement Message.__bool__ for #130 * Add __bool__ to special members * Tweak __bool__ docstring * remove compiler: prefix Co-authored-by: nat <n@natn.me>
1 parent 2fb37dd commit d663a31

File tree

2 files changed

+167
-236
lines changed

2 files changed

+167
-236
lines changed

CHANGELOG.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,55 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
- Versions suffixed with `b*` are in `beta` and can be installed with `pip install --pre betterproto`.
99

10-
## [Unreleased]
10+
## [2.0.0b5] - 2022-08-01
1111

12-
- **Breaking**: Client and Service Stubs no longer pack and unpack the input message fields as parameters.
12+
- **Breaking**: Client and Service Stubs no longer pack and unpack the input message fields as parameters [#331](https://github.com/danielgtaylor/python-betterproto/pull/311)
1313

1414
Update your client calls and server handlers as follows:
1515

1616
Clients before:
17+
1718
```py
1819
response = await service.echo(value="hello", extra_times=1)
1920
```
21+
2022
Clients after:
23+
2124
```py
2225
response = await service.echo(EchoRequest(value="hello", extra_times=1))
2326
```
27+
2428
Servers before:
29+
2530
```py
26-
async def echo(self, value: str, extra_times: int) -> EchoResponse:
31+
async def echo(self, value: str, extra_times: int) -> EchoResponse: ...
2732
```
33+
2834
Servers after:
35+
2936
```py
3037
async def echo(self, echo_request: EchoRequest) -> EchoResponse:
3138
# Use echo_request.value
3239
# Use echo_request.extra_times
40+
...
3341
```
3442

43+
- Add `to/from_pydict()` for `Message` [#203](https://github.com/danielgtaylor/python-betterproto/pull/203)
44+
- Format field comments also as docstrings [#304](https://github.com/danielgtaylor/python-betterproto/pull/304)
45+
- Implement `__deepcopy__` for `Message` [#339](https://github.com/danielgtaylor/python-betterproto/pull/339)
46+
- Run isort on compiled code [#355](https://github.com/danielgtaylor/python-betterproto/pull/355)
47+
- Expose timeout, deadline and metadata parameters from grpclib [#352](https://github.com/danielgtaylor/python-betterproto/pull/352)
48+
- Make `Message.__getattribute__` invisible to type checkers [#359](https://github.com/danielgtaylor/python-betterproto/pull/359)
49+
50+
- Fix map field edge-case [#254](https://github.com/danielgtaylor/python-betterproto/pull/254)
51+
- Fix message text in `NotImplementedError` [#325](https://github.com/danielgtaylor/python-betterproto/pull/325)
52+
- Fix `Message.from_dict()` in the presence of optional datetime fields [#329](https://github.com/danielgtaylor/python-betterproto/pull/329)
53+
- Support Jinja2 3.0 to prevent version conflicts [#330](https://github.com/danielgtaylor/python-betterproto/pull/330)
54+
- Fix overwriting top level `__init__.py` [#337](https://github.com/danielgtaylor/python-betterproto/pull/337)
55+
- Remove deprecation warnings when fields are initialised with non-default values [#348](https://github.com/danielgtaylor/python-betterproto/pull/348)
56+
- Ensure nested class names are converted to PascalCase [#353](https://github.com/danielgtaylor/python-betterproto/pull/353)
57+
- Fix `Message.to_dict()` mutating the underlying Message [#378](https://github.com/danielgtaylor/python-betterproto/pull/378)
58+
- Fix some parameters being missing from services [#381](https://github.com/danielgtaylor/python-betterproto/pull/381)
3559

3660
## [2.0.0b4] - 2022-01-03
3761

0 commit comments

Comments
 (0)