isce2
isce2 copied to clipboard
Fix ABC alias for Python 3.10
Aliases in collections.* to collections.abc.* have been removed starting with python 3.10, so we must use the fully qualified import here.
I think this is needed since https://github.com/python/cpython/pull/23754
I got the following error when first running ISCE after installing it with Python 3.10
File "/home/vjpbd/software/isce/v2.6.0/isce/components/iscesys/Component/TraitSeq.py", line 33, in <module>
from collections import MutableSequence
ImportError: cannot import name 'MutableSequence' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
I just change the aforementioned line to
from collections.abc import MutableSequence
and now it works fine.
Is it possible to add this fix to code?