-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assignment of item at index in repeated field #188
Comments
To clarify, this bug seems to indicate that element assignment in a repeated field is incorrectly being interpreted as insertion. |
Yes exactly. |
I took a look through the unit tests, and it seems that this exact situation is tested for (with the correct behavior expected). I think this is a somewhat recent addition by a third party contributor, thought. I will get the change packaged and out soon and see if that solves the problem. |
Interesting - can you point me to where the unit tests are? Maybe we have a corner case that we can add a test for. |
Thanks @0x2b3bfa0 #178 does indeed appear to fix our issue. @software-dov how soon do you think until 1.13.1 will get published to PyPi? |
With a normal Python list we can do:
However for a repeated field of a message wrapped by proto-plus we see slightly different behavior:
Notice how the
2
just gets push back an index instead of overridden.For a raw protobuf message, we would normally do:
The text was updated successfully, but these errors were encountered: