GuardSystem incompatible with networkx 2.0
Trying to generate a graph with guardutil==1.0.4
and networkx==2.0
generates the following error:
$ SITE=llo IFO=L1 guardutil graph ISC_LOCK
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/duncan/Library/Python/2.7/lib/python/site-packages/guardutil/__main__.py", line 541, in <module>
args.func(args)
File "/Users/duncan/Library/Python/2.7/lib/python/site-packages/guardutil/__main__.py", line 74, in graph
system = cli.init_system(args, load=True)
File "/Users/duncan/Library/Python/2.7/lib/python/site-packages/guardian/cli.py", line 49, in init_system
sys.load()
File "/Users/duncan/Library/Python/2.7/lib/python/site-packages/guardian/system.py", line 455, in load
self.add_state(key, obj)
File "/Users/duncan/Library/Python/2.7/lib/python/site-packages/guardian/system.py", line 330, in add_state
if index in self.indices and name != self.index(index):
File "/Users/duncan/Library/Python/2.7/lib/python/site-packages/guardian/system.py", line 730, in indices
return [data['index'] for state, data in self._graph.nodes_iter(data=True)]
AttributeError: 'DiGraph' object has no attribute 'nodes_iter'
I am able to manually pip install "networkx<2"
so this isn't a critical problem yet, but the macports version is 2.0 so this will likely start to hit other users, presuming anybody else tries to use guardutil
on their laptop.