persim
persim copied to clipboard
Fixed outdated dependency - collections.Iteratable moved to collections.abc.Iterable in Python 3.3+
As per title. Persim breaks when using Python 3.3+ as the dependancy collections.Iterable has been moved.
We check if collections.abc exists, and if so, use that instead.
This should always import from collections.abc
(no need to check if it exists) as that has been the import path since 3.3 when importing ABCs directly from collections was deprecated. collections.Iterable
still works through 3.7, but from 3.8+ collections.abc
will be the only possible import path. (No one should be running this code on 2.7 I hope, certainly not without having many other problems.)
@compwiztobe I've updated the PR accordingly
Thank you for the PR. This was fixed in a recently merged PR (#73) that updated the codebase to modern python versions.