It appears that IntegerProperty._validate() is not taking "long" into account under Python 2: https://github.com/googleapis/python-ndb/blob/5a11f2d2a2fc043958c2f7ac998de2fdac18cc24/google/cloud/ndb/model.py#L2267 This is different from previous behaviour: https://github.com/GoogleCloudPlatform/datastore-ndb-python/blob/8f0895e5a01aa4387c01fec1d2644d5a084961eb/ndb/model.py#L1617 ```python def _validate(self, value): if not isinstance(value, (int, long)): raise datastore_errors.BadValueError('Expected integer, got %r' % (value,)) return int(value) ``` The new implementation should probably be using `six.integer_types`. This is blocking our migration for https://github.com/google/clusterfuzz, so it would be great it this could be fixed and released. Thanks!
It appears that IntegerProperty._validate() is not taking "long" into account under Python 2:
python-ndb/google/cloud/ndb/model.py
Line 2267 in 5a11f2d
This is different from previous behaviour: https://github.com/GoogleCloudPlatform/datastore-ndb-python/blob/8f0895e5a01aa4387c01fec1d2644d5a084961eb/ndb/model.py#L1617
The new implementation should probably be using
six.integer_types.This is blocking our migration for https://github.com/google/clusterfuzz, so it would be great it this could be fixed and released.
Thanks!