I suspect `iterkeys()` method is a Python attribute; it can be already deallocated when `__dealloc__` is called. This may explain the segfaults on Travis (but maybe there is some other issue).