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

Collections Module issue in Python 3.10 #140

Open
mosesrenegade opened this issue Nov 6, 2023 · 0 comments
Open

Collections Module issue in Python 3.10 #140

mosesrenegade opened this issue Nov 6, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@mosesrenegade
Copy link

When running the pmapper pip module or the locally installed build, the collections module fails to import. This is because the following two functions: Mapping, MutableMapping are now located in collections.abc. I have created a pull request to solve this issue.

To reproduce the issue currently have a system with python3.10 or higher.

  1. pip3 install principalmapper
  2. pmapper
Traceback (most recent call last):
  File "/usr/local/bin/pmapper", line 5, in <module>
    from principalmapper.__main__ import main
  File "/usr/local/lib/python3.11/site-packages/principalmapper/__main__.py", line 24, in <module>
    from principalmapper.analysis import cli as analysis_cli
  File "/usr/local/lib/python3.11/site-packages/principalmapper/analysis/cli.py", line 20, in <module>
    from principalmapper.analysis import find_risks
  File "/usr/local/lib/python3.11/site-packages/principalmapper/analysis/find_risks.py", line 37, in <module>
    from principalmapper.querying import query_interface
  File "/usr/local/lib/python3.11/site-packages/principalmapper/querying/query_interface.py", line 26, in <module>
    from principalmapper.querying.local_policy_simulation import *
  File "/usr/local/lib/python3.11/site-packages/principalmapper/querying/local_policy_simulation.py", line 32, in <module>
    from principalmapper.util.case_insensitive_dict import CaseInsensitiveDict
  File "/usr/local/lib/python3.11/site-packages/principalmapper/util/case_insensitive_dict.py", line 34, in <module>
    from collections import Mapping, MutableMapping, OrderedDict
ImportError: cannot import name 'Mapping' from 'collections' (/usr/local/Cellar/python@3.11/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/collections/__init__.py)

The following PR solves the issue: #139

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

No branches or pull requests

1 participant