use six's integer_types instead of py3 incompatible type 'long'