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

Importing ABC directly from collections module was removed in Python 3.9 #23

Closed
tirkarthi opened this issue Jan 22, 2020 · 6 comments
Closed

Comments

@tirkarthi
Copy link

https://bugzilla.redhat.com/show_bug.cgi?id=1793021

from collections import defaultdict, Iterable

Thanks for the library!

@rapgro
Copy link

rapgro commented Feb 10, 2020

Does this work instead?

import collections.defaultdict
import collections.Iterable

@tirkarthi
Copy link
Author

The project also supports Python 2. So something like below would be better compatible.

try:
    # For Python 3.3+
    from collections.abc import Iterable
except ImportError:
    # For Python 2
    from collections import Iterable

@rapgro
Copy link

rapgro commented Mar 21, 2020

OK, thanks. Could you file this patch as a pull request?

@tirkarthi
Copy link
Author

Thanks, raised #24.

@rapgro
Copy link

rapgro commented Apr 17, 2021

ping

@lorien
Copy link
Owner

lorien commented Feb 16, 2022

Fixed.

@lorien lorien closed this as completed Feb 16, 2022
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 a pull request may close this issue.

3 participants