Skip to content

Commit

Permalink
Bump protobuf requirement to 3.12.x (#3132)
Browse files Browse the repository at this point in the history
Fixes #3110.
  • Loading branch information
balopat committed Jul 13, 2020
1 parent 503bf5a commit 1b05c0e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion cirq/google/arg_func_langs_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ def test_serialize_sympy_constants():
including_default_value_fields=True,
preserving_proto_field_name=True,
use_integers_for_enums=True)
assert packed == {'arg_value': {'float_value': float(np.float32(sympy.pi))}}
# protobuf 3.12+ truncates floats to 4 bytes
assert packed == {
'arg_value': {
'float_value': float(str(np.float32(sympy.pi)))
}
}


def test_unsupported_function_language():
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ matplotlib~=3.0
networkx~=2.4
numpy~=1.16
pandas
protobuf==3.8.0
protobuf~=3.12.0
requests~=2.18
sortedcontainers~=2.0
scipy
Expand Down

0 comments on commit 1b05c0e

Please sign in to comment.