-
Notifications
You must be signed in to change notification settings - Fork 37
Closed
Labels
P2A nice-to-fix bugA nice-to-fix bugpriority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
E.g.
import os
os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python"
import proto
class Squid(proto.Message):
massKg = proto.Field(proto.INT32, number=1, json_name="mass_in_kilograms")
s = Squid(massKg=20)
j = Squid.to_json(s)
print(j) # '{"massKg" : 20}', or something like that.This is only reproducible with the python protobuf implementation.
Editorial: my gut feeling is that this is a bug in proto-plus, or at least that a workaround/fix/correct solution is entirely possible within proto-plus.
0x2b3bfa0
Metadata
Metadata
Assignees
Labels
P2A nice-to-fix bugA nice-to-fix bugpriority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.