In Python 3.10+, the Iterable type has been moved to the collections.abc module. The past package, which is used to provide Python 3 compatibility for Python 2 code, might not have been updated to reflect this change.
if sys.version_info.major >= 3 and sys.version_info.minor >= 10:
from collections.abc import Iterable
else:
from collections import Iterable
I just monkey-patched the code.
Before the change, the error message might have looked something like this:
1 """
2 Pure-Python implementation of a Python 2-like str object for Python 3.
3 """
----> 5 from collections import Iterable
6 from numbers import Integral
8 from past.utils import PY2, with_metaclass
ImportError: cannot import name 'Iterable' from 'collections'
In Python 3.10+, the Iterable type has been moved to the collections.abc module. The
past
package, which is used to provide Python 3 compatibility for Python 2 code, might not have been updated to reflect this change.I just monkey-patched the code.
Before the change, the error message might have looked something like this: