Skip to content

Non-listed enum values are rejected during deserialization #149

Description

When I attempt to deserialize an enum with a numeric value that isn't listed in the proto file, I get an exception:

  File "src/my_code/my_proto.pyx", line 2248, in my_proto.MyProto.epe.__set__
ValueError: 9 not a valid value for enum EPERange

The language guide says, however:

During deserialization, unrecognized enum values will be preserved in the message, though how this is represented when the message is deserialized is language-dependent.

Pyrobuf should allow deserializing and reserializing such messages.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions