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

attrdict is still used in one place. #125

Open
chahak13 opened this issue Jan 3, 2023 · 0 comments · May be fixed by #126
Open

attrdict is still used in one place. #125

chahak13 opened this issue Jan 3, 2023 · 0 comments · May be fixed by #126

Comments

@chahak13
Copy link

chahak13 commented Jan 3, 2023

Describe the bug
attrdict hasn't been under development since quite a while now. agavepy/util.py has an implementation of AttrDict too. I think that should be used in agavepy/settings/__init__.py instead of from attrdict import AttrDict. That should remove the attrdict dependency and also allow compatibility with newer releases of python (>3.6).

To Reproduce
Install agavepy in any version of python >3.6 (I tried with 3.10) and try running import agavepy

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/chahak/Documents/agavepy/agavepy/__init__.py", line 1, in <module>
    from .agave import Agave
  File "/home/chahak/Documents/agavepy/agavepy/agave.py", line 17, in <module>
    from agavepy import settings
  File "/home/chahak/Documents/agavepy/agavepy/settings/__init__.py", line 14, in <module>
    from attrdict import AttrDict  # noqa
  File "/home/chahak/.local/share/virtualenvs/agavepy-GvSzWhBC/lib/python3.10/site-packages/attrdict/__init__.py", line 5, in <module>
    from attrdict.mapping import AttrMap
  File "/home/chahak/.local/share/virtualenvs/agavepy-GvSzWhBC/lib/python3.10/site-packages/attrdict/mapping.py", line 4, in <module>
    from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

I tried a simple fix by changing that line to from ..util import AttrDict and it seemed to work fine.

Desktop (please complete the following information):

  • OS: ArchLinux
@kks32 kks32 linked a pull request Jan 22, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant