-
Notifications
You must be signed in to change notification settings - Fork 32
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
ImportError: cannot import name 'Mapping' from 'collections' #113
Comments
I fixed it in #107 |
Hi, OrderedDict is present in Python 3.10 and even in 3.11. It is actually actively maintained and constantly improved. E.g. it was recently made 2x times faster. Another point is that I benchmarked OrderedDict against dict, and simple iteration over Just to make sure: we do not support Python below 3.7, so it's safe to replace the OrderedDict by dict (which started to be ordered from Python 3.7)? Ipersonally like the idea to stick to an old implementation that makes the "ordering" feature explicit. But it's up to you. If you decide to remove OrderedDict, please, fix also the documentation, now there are many mentions of OrderedDict class in the docstrings. |
i second the idea to move from OrderedDict to dict, as ordering is now guaranteed in dicts : https://stackoverflow.com/questions/39980323/are-dictionaries-ordered-in-python-3-6 |
Above error appears in python 3.10. As usual with collections, import should be fixed with this change:
from collections.abc import Mapping
.I haven't checked from which version of python this would work and whether we can just simply change it or it would break in earlier versions.
The text was updated successfully, but these errors were encountered: