Skip to content

Conversation

@rtburns-jpl
Copy link
Member

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 python/cpython#23754

@vjpbd
Copy link

vjpbd commented Jun 15, 2022

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?

Aliases in collections.* to collections.abc.* have been removed starting
with python 3.10, so we must use the fully qualified import here.
@rtburns-jpl rtburns-jpl merged commit f2b139f into isce-framework:main Jan 4, 2023
@rtburns-jpl rtburns-jpl deleted the python310 branch January 4, 2023 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants