scottwernervt / cloudstorage

Unified cloud storage API for storage services.
http://cloudstorage.readthedocs.io/en/latest/
MIT License
93 stars 27 forks source link

AttributeError: module 'collections' has no attribute 'MutableMapping' #88

Open kkruse-rax opened 1 year ago

kkruse-rax commented 1 year ago

Hi,

Just wanted to open an issue to see about an update here for python 3.10. This error occurs because collections moved MutableMapping in python 3.10.

Seems a workaround until then may be have the following before importing cloudstorage, but not ideal long term:

import collections 
if sys.version_info.major == 3 and sys.version_info.minor >= 10:
    from collections.abc import MutableMapping
else:
    from collections import MutableMapping
kkruse-rax commented 1 year ago

I think it probably due to the rackspace driver I was attempting to use