If I construct an integer too long to encode as a 64-bit integer, get_protobuf_attribute_and_value() does not raise a ValueError:
>>> gcloud.datastore.helpers.get_protobuf_attribute_and_value
>>> too_long = 1 << 63
>>> get_protobuf_attribute_and_value(too_long)
('integer_value', 9223372036854775808L)
even though that value is not usable for an 'integer_value' field:
>>> from gcloud.datastore.datastore_v1_pb2 import Property
>>> pb = Property()
>>> pb.value.integer_value = too_long
...
File ".../lib/python2.7/site-packages/google/protobuf/internal/type_checkers.py", line 119, in CheckValue
raise ValueError('Value out of range: %d' % proposed_value)
ValueError: Value out of range: 9223372036854775808
If I construct an integer too long to encode as a 64-bit integer, get_protobuf_attribute_and_value() does not raise a
ValueError:even though that value is not usable for an 'integer_value' field: