Using old version of cmd2 breaks in Python 3.10
nobodywasishere opened this issue · comments
Due to the old version of cmd2
used, clanvas no longer works in Python 3.10:
>>> import cmd2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/michael/.local/lib/python3.10/site-packages/cmd2/__init__.py", line 13, in <module>
from .cmd2 import Cmd, Statement, EmptyStatement, categorize
File "/home/michael/.local/lib/python3.10/site-packages/cmd2/cmd2.py", line 48, in <module>
from . import utils
File "/home/michael/.local/lib/python3.10/site-packages/cmd2/utils.py", line 73, in <module>
default_values: collections.Iterable = ()):
AttributeError: module 'collections' has no attribute 'Iterable'
In Python 3.10, Iterable
was moved to collections.abc
.
Several possible solutions:
- Copy cmd2 directly into here (as using a specific version) and make the change manually / maintain independent version
- Update clanvas to newer versions of cmd2
- Don't support Python 3.10
I could probably do 1 if that's what you want to do.
Ah interesting. I admittedly don't have the time or interest in maintaining this at the moment.
Regarding solution 2, do you know if updating the version of cmd2 would be hard for some reason? That seems like the most straightforward solution.
To be honest I have no idea how difficult or easy it would be; I'm unfamiliar with how cmd2 works.
Unfortunately looking into it, the version of canvasapi used is also broken with Python 3.10, and I couldn't find an easy workaround.