-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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
Python protobuf should refuse to serialize Infinity and NaN #11259
Labels
Comments
anandolee
removed
the
untriaged
auto added to all issues by default when created.
label
Dec 14, 2022
copybara-service bot
pushed a commit
that referenced
this issue
Dec 15, 2022
…n format. fixes #11259 PiperOrigin-RevId: 495446149
copybara-service bot
pushed a commit
that referenced
this issue
Dec 16, 2022
…n format. fixes #11259 PiperOrigin-RevId: 495446149
copybara-service bot
pushed a commit
that referenced
this issue
Dec 16, 2022
…n format. fixes #11259 PiperOrigin-RevId: 495446149
copybara-service bot
pushed a commit
that referenced
this issue
Jan 6, 2023
… format. fixes #11259 Implemented in java, c++, python and upb. Also added conformance test. https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Value where it says: attempting to serialize NaN or Infinity results in error. (We can't serialize these as string "NaN" or "Infinity" values like we do for regular fields, because they would parse as string_value, not number_value). PiperOrigin-RevId: 496741357
copybara-service bot
pushed a commit
that referenced
this issue
Jan 6, 2023
… format. fixes #11259 Implemented in java, c++, python and upb. Also added conformance test. https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Value where it says: attempting to serialize NaN or Infinity results in error. (We can't serialize these as string "NaN" or "Infinity" values like we do for regular fields, because they would parse as string_value, not number_value). PiperOrigin-RevId: 500139380
copybara-service bot
pushed a commit
that referenced
this issue
Jan 6, 2023
… format. fixes #11259 Implemented in java, c++, python and upb. Also added conformance test. https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Value where it says: attempting to serialize NaN or Infinity results in error. (We can't serialize these as string "NaN" or "Infinity" values like we do for regular fields, because they would parse as string_value, not number_value). PiperOrigin-RevId: 500150934
copybara-service bot
pushed a commit
that referenced
this issue
Jan 7, 2023
… format. fixes #11259 Implemented in java, c++, python and upb. Also added conformance test. https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Value where it says: attempting to serialize NaN or Infinity results in error. (We can't serialize these as string "NaN" or "Infinity" values like we do for regular fields, because they would parse as string_value, not number_value). PiperOrigin-RevId: 500150934
copybara-service bot
pushed a commit
that referenced
this issue
Jan 7, 2023
… format. fixes #11259 Implemented in java, c++, python and upb. Also added conformance test. https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Value where it says: attempting to serialize NaN or Infinity results in error. (We can't serialize these as string "NaN" or "Infinity" values like we do for regular fields, because they would parse as string_value, not number_value). PiperOrigin-RevId: 500150934
copybara-service bot
pushed a commit
that referenced
this issue
Jan 9, 2023
… format. fixes #11259 Implemented in java, c++, python and upb. Also added conformance test. https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Value where it says: attempting to serialize NaN or Infinity results in error. (We can't serialize these as string "NaN" or "Infinity" values like we do for regular fields, because they would parse as string_value, not number_value). PiperOrigin-RevId: 500150934
copybara-service bot
pushed a commit
that referenced
this issue
Jan 9, 2023
… format. fixes #11259 Implemented in java, c++, python and upb. Also added conformance test. https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Value where it says: attempting to serialize NaN or Infinity results in error. (We can't serialize these as string "NaN" or "Infinity" values like we do for regular fields, because they would parse as string_value, not number_value). PiperOrigin-RevId: 500150934
copybara-service bot
pushed a commit
that referenced
this issue
Jan 9, 2023
… format. fixes #11259 Implemented in java, c++, python and upb. Also added conformance test. https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Value where it says: attempting to serialize NaN or Infinity results in error. (We can't serialize these as string "NaN" or "Infinity" values like we do for regular fields, because they would parse as string_value, not number_value). PiperOrigin-RevId: 500150934
copybara-service bot
pushed a commit
that referenced
this issue
Jan 9, 2023
… format. fixes #11259 Implemented in java, c++, python and upb. Also added conformance test. https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Value where it says: attempting to serialize NaN or Infinity results in error. (We can't serialize these as string "NaN" or "Infinity" values like we do for regular fields, because they would parse as string_value, not number_value). PiperOrigin-RevId: 500150934
copybara-service bot
pushed a commit
that referenced
this issue
Jan 9, 2023
… format. fixes #11259 Implemented in java, c++, python and upb. Also added conformance test. https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Value where it says: attempting to serialize NaN or Infinity results in error. (We can't serialize these as string "NaN" or "Infinity" values like we do for regular fields, because they would parse as string_value, not number_value). PiperOrigin-RevId: 500828964
rinarakaki
pushed a commit
to rinarakaki/protobuf
that referenced
this issue
Aug 30, 2023
… format. fixes protocolbuffers#11259 Implemented in java, c++, python and upb. Also added conformance test. https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Value where it says: attempting to serialize NaN or Infinity results in error. (We can't serialize these as string "NaN" or "Infinity" values like we do for regular fields, because they would parse as string_value, not number_value). PiperOrigin-RevId: 500139380
rinarakaki
pushed a commit
to rinarakaki/protobuf
that referenced
this issue
Aug 30, 2023
… format. fixes protocolbuffers#11259 Implemented in java, c++, python and upb. Also added conformance test. https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Value where it says: attempting to serialize NaN or Infinity results in error. (We can't serialize these as string "NaN" or "Infinity" values like we do for regular fields, because they would parse as string_value, not number_value). PiperOrigin-RevId: 500828964
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since it doesn't roundtrip, we should refuse to serialize them, per docs:
Trying with protobuf 4.21.11:
outputs
See also golang/protobuf#1182
The text was updated successfully, but these errors were encountered: