Revert "Support networkx 2.0"

This reverts commit a47ff0dd4a.
Since this merged, a global-requirements pin to keep networkx <2.0 has
also merged. The plan is:
1. revert our 2.0 support and
1a. take the <2.0 pin from global requirements
2. figure out how to use constraints properly in our testing
3. restore this, with a depends-on for a 2.0 bump in requirements
 (which will self-test, see 3.)
4. when other projects are ready for a global 2.0 bump, merge
 in a controlled fashion
This reverts the 2.0 support, and adds the pin for networkx <2.0
Change-Id: I18f6a1115da779581245e3dd423fd90516974a33
This commit is contained in:
Ian Wienand
2017年09月22日 07:56:43 +10:00
parent a47ff0dd4a
commit 06b5ce4573

View File

@@ -190,7 +190,7 @@ def create_graph(config, default_config, state):
# ensure node names are unique. networkx by default
# just appends the attribute to the node dict for
# existing nodes, which is not what we want.
if node.name in dg.nodes:
if node.name in dg.node:
raise BlockDeviceSetupException(
"Duplicate node name: %s" % (node.name))
logger.debug("Adding %s : %s", node.name, node)
@@ -210,12 +210,12 @@ def create_graph(config, default_config, state):
logger.debug("Edges for %s: f:%s t:%s", name,
edges_from, edges_to)
for edge_from in edges_from:
if edge_from not in dg.nodes:
if edge_from not in dg.node:
raise BlockDeviceSetupException(
"Edge not defined: %s->%s" % (edge_from, name))
dg.add_edge(edge_from, name)
for edge_to in edges_to:
if edge_to not in dg.nodes:
if edge_to not in dg.node:
raise BlockDeviceSetupException(
"Edge not defined: %s->%s" % (name, edge_to))
dg.add_edge(name, edge_to)
@@ -231,9 +231,9 @@ def create_graph(config, default_config, state):
# Topological sort (i.e. create a linear array that satisfies
# dependencies) and return the object list
call_order_nodes = list(nx.topological_sort(dg))
logger.debug("Call order: %s", call_order_nodes)
call_order = [dg.nodes[n]['obj'] for n in call_order_nodes]
call_order_nodes = nx.topological_sort(dg)
logger.debug("Call order: %s", list(call_order_nodes))
call_order = [dg.node[n]['obj'] for n in call_order_nodes]
return dg, call_order

View File

@@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
Babel!=2.4.0,>=2.3.4 # BSD
networkx>=1.10 # BSD
networkx<2.0,>=1.10 # BSD
pbr!=2.1.0,>=2.0.0 # Apache-2.0
PyYAML>=3.10 # MIT
flake8<2.6.0,>=2.5.4 # MIT
Reference in New Issue
openstack/diskimage-builder
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.