brainsik / json-store

JSON store is a simple replacement for shelve. It writes JSON serialized files and can accept unicode keys. It has no dependencies.
MIT License
16 stars 11 forks source link

Python 3.10 croaks with `AttributeError: module 'collections' has no attribute 'MutableMapping'` #6

Closed amotl closed 2 years ago

amotl commented 2 years ago

Dear Jeremy,

thanks a stack for conceiving and maintaining the json-store package.

At https://github.com/daq-tools/kotori/pull/94, we just bumped the CI to use Python 3.10, but it croaked with AttributeError: module 'collections' has no attribute 'MutableMapping' ^1.

ImportError while loading conftest '/home/runner/work/kotori/kotori/test/conftest.py'.
test/conftest.py:12: in <module>
    from kotori import KotoriBootloader
kotori/__init__.py:27: in <module>
    from kotori.util.common import setup_logging
kotori/util/common.py:10: in <module>
    import json_store
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/json_store/__init__.py:3: in <module>
    from .json_store import *
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/json_store/json_store.py:25: in <module>
    class JSONStore(collections.MutableMapping):
E   AttributeError: module 'collections' has no attribute 'MutableMapping'
Error: Process completed with exit code 4.

Is there anything you could do about it?

With kind regards, Andreas.

amotl commented 2 years ago

Hi again,

7 has a corresponding fix for this issue.

With kind regards, Andreas.