-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Description
Hi,
It seems cgroupspy is not working with python 3.10 with this kind of error:
ImportError: cannot import name 'Iterable' from 'collections' (/usr/local/lib/python3.10/collections/__init__.py)
As per Python collections documentation, Iterable has been moved to collections.abc since 3.3 and left for compatibility until 3.9 included: https://docs.python.org/3.9/library/collections.html.
A suggestion for cgroupspy/interfaces.py:
Replace
from collections import IterableBy
if sys.version_info.major == 3 and sys.version_info.minor >= 3:
from collections.abc import Iterable
else:
from collections import Iterableor equivalent in order to have a distinction between Python 3.3 and older.
cjolif
Metadata
Metadata
Assignees
Labels
No labels