Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ABC alias for Python 3.10 #424

Merged
merged 1 commit into from
Jan 4, 2023

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.
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