nccgroup / PMapper

A tool for quickly evaluating IAM permissions in AWS.
GNU Affero General Public License v3.0
1.37k stars 169 forks source link

Python 3.10 fails to run #130

Open JonZeolla opened 1 year ago

JonZeolla commented 1 year ago

Describe the bug I believe this was supposed to be fixed in https://github.com/nccgroup/PMapper/pull/107 per https://github.com/nccgroup/PMapper/issues/106 but the issue still exists. When you attempt to run various commands, such as pmapper graph create it will raise an ImportError: cannot import name 'Mapping' from 'collections'.

I'm running Python 3.10.6 on MacOS Ventura 13.1. Changing principalmapper/util/case_insensitive_dict.py from

from collections import Mapping, MutableMapping, OrderedDict

to

from collections.abc import Mapping, MutableMapping
from collections import OrderedDict

Fixes it for me

To Reproduce pip install principalmapper and then run pmapper graph create using python 3.10

Expected behavior I expect it does not raise an ImportError.

JonZeolla commented 1 year ago

This is fixed in https://github.com/nccgroup/PMapper/pull/122