protocolbuffers / protobuf

Protocol Buffers - Google's data interchange format
http://protobuf.dev
Other
65.21k stars 15.44k forks source link

FieldMask.Intersect() on disjoint paths results in FieldMask with empty string in paths #5518

Closed timnd closed 5 years ago

timnd commented 5 years ago

What version of protobuf and what language are you using? Version: v3.6.1 Language: Python

What operating system (Linux, Windows, ...) and version? MacOS High Sierra

What runtime / compiler are you using (e.g., python version or gcc version) python 3.6.5

What did you do? Steps to reproduce the behavior: from google.protobuf import field_mask_pb2 fm1 = field_mask_pb2.FieldMask(paths=['a']) fm2 = field_mask_pb2.FieldMask(paths=['b']) fm_int = field_mask_pb2.FieldMask() fm_int.Intersect(fm1, fm2)

fm_int.paths ['']

What did you expect to see fm_int.paths == [] What did you see instead? fm_int.paths == ['']

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

anandolee commented 5 years ago

Thanks for raise the bug up. I've fixed in internal code, expected to see in future release