isce2 icon indicating copy to clipboard operation
isce2 copied to clipboard

Fix ABC alias for Python 3.10

Open rtburns-jpl opened this issue 4 years ago • 1 comments

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

rtburns-jpl avatar Dec 30 '21 00:12 rtburns-jpl

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?

vjpbd avatar Jun 15 '22 21:06 vjpbd