-
Notifications
You must be signed in to change notification settings - Fork 232
Closed
Labels
Description
Hi,
Enums seem not to be mapped on init and receive and left as their integer values.
Example proto:
message TestRequest {
Category category = 1;
}
enum Category {
SOMETHING = 0;
SOMETHING_ELSE = 1;
}
For TestRequest()
, the Category
value will be int 0 and not SOMETHING
.
When receiving category = 1
over gRPC, it will be also left as int 1.
For deserialization it can be fixed easily by adding yet another branch to _postprocess_single
. For plain init - I've tried tracing it down, but it seem to go somewhere deep into how dataclasses work
kubaraczkowski, sotetsuk, saadin, WJCFerguson, augi and 1 more