persim icon indicating copy to clipboard operation
persim copied to clipboard

Fixed outdated dependency - collections.Iteratable moved to collections.abc.Iterable in Python 3.3+

Open tomogwen opened this issue 2 years ago • 2 comments

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.

tomogwen avatar Jun 07 '22 13:06 tomogwen

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 avatar Jul 01 '22 08:07 compwiztobe

@compwiztobe I've updated the PR accordingly

tomogwen avatar Jul 03 '22 20:07 tomogwen

Thank you for the PR. This was fixed in a recently merged PR (#73) that updated the codebase to modern python versions.

catanzaromj avatar Oct 24 '23 12:10 catanzaromj