danielgtaylor / danielgtaylor/python-betterproto
Service response values are not unwrapped
@boukeversteegh is already working on this.
Since May 25, 2020.
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 234
- PR merge metrics
- No merged PRs in 30d
Description
As betterproto is aiming to support automatic (un)wrapping of well known types (google wrapper values), the service responses should also return the underlying values, instead of the wrapper objects.
```protobuf
syntax = "proto3";
import "google/protobuf/wrappers.proto";
// Tests that wrapped values can be used directly as return values
service Test {
rpc GetDouble (Input) returns (google.protobuf.DoubleValue);
}
message Input {
}
```
```python
response = TestStub(channel).get_double()
assert type(response) == float # fails!
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.