28mm / blast-radius

Interactive visualizations of Terraform dependency graphs using d3.js
https://28mm.github.io/blast-radius-docs/
MIT License
2.03k stars 256 forks source link

Python 3.10 incomptablity due to collections #109

Closed RamonGal closed 1 year ago

RamonGal commented 1 year ago

After installing the blastreadius package with pip:

pip install blastradius 

It succeeds in installing

But when run on the terraform folder with:

blast-radius --serve .

We get the following trace back, given that I have installed the python version 3.10, where the 'collections' has no attribute 'MutableSet':

Traceback (most recent call last):
  File "/root/gitlab/happyderm/infra-happyDerm/env/bin/blast-radius", line 14, in <module>
    from blastradius.handlers.dot import DotGraph, Format, DotNode
  File "/root/gitlab/happyderm/infra-happyDerm/env/lib/python3.10/site-packages/blastradius/handlers/dot.py", line 12, in <module>
    from blastradius.graph import Graph, Node, Edge
  File "/root/gitlab/happyderm/infra-happyDerm/env/lib/python3.10/site-packages/blastradius/graph.py", line 11, in <module>
    from blastradius.util import Counter
  File "/root/gitlab/happyderm/infra-happyDerm/env/lib/python3.10/site-packages/blastradius/util.py", line 65, in <module>
    class OrderedSet(collections.MutableSet):
AttributeError: module 'collections' has no attribute 'MutableSet'
Ianyliu commented 1 year ago

@RamonGal You can try using my fork, which has some minor improvements and features as described here: https://github.com/28mm/blast-radius/pull/103

My fork location: https://github.com/Ianyliu/blast-radius-fork

Test it with the following command: python3 -m pip install git+https://github.com/Ianyliu/blast-radius-fork

RamonGal commented 1 year ago

Thanks, I made a dockerfile that ran balstradius with python 3.9

Ianyliu commented 1 year ago

@RamonGal glad to know it helped!