Stateful attributes are incorrect after a bulk mutation (proto.clear, proto.merge)
jmillikin-stripe opened this issue · 0 comments
jmillikin-stripe commented
>>> file1 = pb.FileDescriptorProto(name='file 1')
>>> file2 = pb.FileDescriptorProto(name='file 2')
>>> set = pb.FileDescriptorSet(file=[file1])
>>> set.file
[<google.protobuf.FileDescriptorProto name:"file 1" >]
>>> proto.merge(set, pb.FileDescriptorSet(file=[file2]))
>>> set.file
[<google.protobuf.FileDescriptorProto name:"file 1" >]
>>> proto.clear(set)
>>> set.file
[<google.protobuf.FileDescriptorProto name:"file 1" >]
>>>