danielgtaylor / danielgtaylor/python-betterproto

Service response values are not unwrapped

Open
#64 0 comments 0 reactions 1 assignee View on GitHub

@boukeversteegh is already working on this.

Since May 25, 2020.

bug has test low priority medium
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.