Skip to content
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

Does not run in 3.11 due to mapping import error #131

Open
DamionWaltermeyer opened this issue Apr 20, 2023 · 1 comment
Open

Does not run in 3.11 due to mapping import error #131

DamionWaltermeyer opened this issue Apr 20, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@DamionWaltermeyer
Copy link

Stated to be fixed in #130 but still does not run in 3.11.

Describe the bug
File "/opt/homebrew/lib/python3.11/site-packages/principalmapper/util/case_insensitive_dict.py", line 34, in
from collections import Mapping, MutableMapping, OrderedDict
ImportError: cannot import name 'Mapping' from 'collections' (/opt/homebrew/Cellar/[email protected]/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/collections/init.py)

To Reproduce
% pip install principalmapper
Collecting principalmapper
Downloading principalmapper-1.1.5-py3-none-any.whl (145 kB)
Collecting botocore
Downloading botocore-1.29.116-py3-none-any.whl (10.6 MB)
Requirement already satisfied: packaging in /opt/homebrew/lib/python3.11/site-packages (from principalmapper) (23.0)
Collecting python-dateutil
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting pydot
Downloading pydot-1.4.2-py2.py3-none-any.whl (21 kB)
Collecting jmespath<2.0.0,>=0.7.1
Using cached jmespath-1.0.1-py3-none-any.whl (20 kB)
Requirement already satisfied: urllib3<1.27,>=1.25.4 in /opt/homebrew/lib/python3.11/site-packages (from botocore->principalmapper) (1.26.15)
Requirement already satisfied: six>=1.5 in /opt/homebrew/lib/python3.11/site-packages (from python-dateutil->principalmapper) (1.16.0)
Collecting pyparsing>=2.1.4
Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB)
Installing collected packages: python-dateutil, pyparsing, jmespath, pydot, botocore, principalmapper
Successfully installed botocore-1.29.116 jmespath-1.0.1 principalmapper-1.1.5 pydot-1.4.2 pyparsing-3.0.9 python-dateutil-2.8.2

% pmapper --profile MYPROFILENAME graph create

Traceback (most recent call last):
File "/opt/homebrew/bin/pmapper", line 5, in
from principalmapper.main import main
File "/opt/homebrew/lib/python3.11/site-packages/principalmapper/main.py", line 24, in
from principalmapper.analysis import cli as analysis_cli
File "/opt/homebrew/lib/python3.11/site-packages/principalmapper/analysis/cli.py", line 20, in
from principalmapper.analysis import find_risks
File "/opt/homebrew/lib/python3.11/site-packages/principalmapper/analysis/find_risks.py", line 37, in
from principalmapper.querying import query_interface
File "/opt/homebrew/lib/python3.11/site-packages/principalmapper/querying/query_interface.py", line 26, in
from principalmapper.querying.local_policy_simulation import *
File "/opt/homebrew/lib/python3.11/site-packages/principalmapper/querying/local_policy_simulation.py", line 32, in
from principalmapper.util.case_insensitive_dict import CaseInsensitiveDict
File "/opt/homebrew/lib/python3.11/site-packages/principalmapper/util/case_insensitive_dict.py", line 34, in
from collections import Mapping, MutableMapping, OrderedDict
ImportError: cannot import name 'Mapping' from 'collections' (/opt/homebrew/Cellar/[email protected]/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/collections/init.py)

Expected behavior
I expect it to create the graph and not error out.

@DamionWaltermeyer DamionWaltermeyer added the bug Something isn't working label Apr 20, 2023
@jsimoni
Copy link

jsimoni commented May 19, 2023

This is fixed in #122, but needs to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants