cdist fails to run with python 3.10 #329

Closed
opened 2022-02-28 15:02:50 +00:00 by sparrowhawk · 3 comments
Collaborator

Running cdist (all versions) using python 3.10 fails with the following stack trace:

$ python3.10 /usr/bin/cdist
Traceback (most recent call last):
  File "/usr/bin/cdist", line 39, in <module>
    import cdist.argparse   # noqa 402
  File "/usr/lib/python3.10/site-packages/cdist/argparse.py", line 10, in <module>
    import cdist.info
  File "/usr/lib/python3.10/site-packages/cdist/info.py", line 24, in <module>
    import cdist.core
  File "/usr/lib/python3.10/site-packages/cdist/core/__init__.py", line 25, in <module>
    from cdist.core.cdist_object import CdistObject
  File "/usr/lib/python3.10/site-packages/cdist/core/cdist_object.py", line 28, in <module>
    from cdist.util import fsproperty
  File "/usr/lib/python3.10/site-packages/cdist/util/fsproperty.py", line 36, in <module>
    class FileList(collections.MutableSequence):
AttributeError: module 'collections' has no attribute 'MutableSequence'

This is due to python 3.10 moving all the Collections Abstract Base Classes from collections to collections.abc (there's a deprecation warning since 3.3...)

Running cdist (all versions) using python 3.10 fails with the following stack trace: ``` $ python3.10 /usr/bin/cdist Traceback (most recent call last): File "/usr/bin/cdist", line 39, in <module> import cdist.argparse # noqa 402 File "/usr/lib/python3.10/site-packages/cdist/argparse.py", line 10, in <module> import cdist.info File "/usr/lib/python3.10/site-packages/cdist/info.py", line 24, in <module> import cdist.core File "/usr/lib/python3.10/site-packages/cdist/core/__init__.py", line 25, in <module> from cdist.core.cdist_object import CdistObject File "/usr/lib/python3.10/site-packages/cdist/core/cdist_object.py", line 28, in <module> from cdist.util import fsproperty File "/usr/lib/python3.10/site-packages/cdist/util/fsproperty.py", line 36, in <module> class FileList(collections.MutableSequence): AttributeError: module 'collections' has no attribute 'MutableSequence' ``` This is due to python 3.10 moving all the Collections Abstract Base Classes from `collections` to `collections.abc` (there's a deprecation warning since 3.3...)
sparrowhawk added the
bugfix
label 2022-02-28 15:02:50 +00:00
Author
Collaborator

Just saw that @fnux fixed it in 3a321469a8. That commit should definitely be included in the next release.

Just saw that @fnux fixed it in 3a321469a8ba5aea55220bd70bd4900de732e917. That commit should definitely be included in the next release.
Collaborator

The patch has been releases - we can close this issue. I don't have the rights to do so anymore, though.

The patch has been releases - we can close this issue. I don't have the rights to do so anymore, though.
Collaborator

I got the rights back. Closing.

I got the rights back. Closing.
fnux closed this issue 2024-02-28 14:32:19 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#329
No description provided.