doing isinstance(obj, Sequence) makes calls with keys of dict impossible
Example:
d = {'a':'a', 'b':'b'}
table.upsert(values, d.keys())
d.keys() is of type dict_keys(['a', 'b']) and is not of instance Sequence, but Iterable, therefore ensure_tuple(dict_keys(['a', 'b'])) returns (dict_keys(['a', 'b']),)
which leads to invalid iteration.
doing isinstance(obj, Sequence) makes calls with keys of dict impossible Example:
d.keys()
is of typedict_keys(['a', 'b'])
and is not of instance Sequence, but Iterable, thereforeensure_tuple(dict_keys(['a', 'b']))
returns (dict_keys(['a', 'b']),) which leads to invalid iteration.