runtheops / ssm-diff

A human-friendly way of managing parameters in AWS SSM
MIT License
46 stars 26 forks source link

AttributeError with newer Python version #31

Open apicht opened 7 months ago

apicht commented 7 months ago

I have been using ssm-diff for some time, but after upgrading to Debian Bookworm (with Python 3.11) I'm getting this error on a ssm-diff plan operation:

Traceback (most recent call last):
  File "/usr/local/bin/ssm-diff", line 82, in <module>
    args.func(args)
  File "/usr/local/bin/ssm-diff", line 42, in plan
    diff = helpers.FlatDictDiffer(r.get(paths=args.path), l.get(paths=args.path))
                                  ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/states/states.py", line 114, in get
    return flatten(output) if flat else output
           ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/states/helpers.py", line 44, in flatten
    if isinstance(d[k], collections.MutableMapping):
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'collections' has no attribute 'MutableMapping'