FFI definition PyIter_Check on CPython 3.7 now does the equivalent for hasattr(type(obj), "__next__"), which works correctly on all platforms and adds support for abi3.
PyIter_Check
hasattr(type(obj), "__next__")
abi3