danielgtaylor / danielgtaylor/python-betterproto

Service response values are not unwrapped

Aperta
#64 0 commenti 0 reazioni 1 assegnatario Rivendicata da @boukeversteegh Vedi su GitHub
bug has test low priority medium
Lingua principale
Python
Stelle
1.8k
Fork
234
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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!
```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.