summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Wienand <iwienand@redhat.com>2017-09-22 07:56:43 +1000
committerIan Wienand <iwienand@redhat.com>2017-09-22 08:02:44 +1000
commit06b5ce4573f5ef420eb5f26015cda71b7ee77193 (patch)
tree40368947c745f199f4e4a496adc1c90d226beec0
parenta47ff0dd4abbceae786d9a5a4d1ce8042a9eb4f7 (diff)
Revert "Support networkx 2.0"2.9.0
This reverts commit a47ff0dd4abbceae786d9a5a4d1ce8042a9eb4f7. 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
Notes
Notes (review): Code-Review+1: Tony Breeds <tony@bakeyournoodle.com> Code-Review+2: Ian Wienand <iwienand@redhat.com> Workflow+1: Ian Wienand <iwienand@redhat.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Fri, 22 Sep 2017 00:16:30 +0000 Reviewed-on: https://review.openstack.org/506398 Project: openstack/diskimage-builder Branch: refs/heads/master
-rw-r--r--diskimage_builder/block_device/config.py12
-rw-r--r--requirements.txt2
2 files changed, 7 insertions, 7 deletions
diff --git a/diskimage_builder/block_device/config.py b/diskimage_builder/block_device/config.py
index 193b3df..57f46ea 100644
--- a/diskimage_builder/block_device/config.py
+++ b/diskimage_builder/block_device/config.py
@@ -190,7 +190,7 @@ def create_graph(config, default_config, state):
190 # ensure node names are unique. networkx by default 190 # ensure node names are unique. networkx by default
191 # just appends the attribute to the node dict for 191 # just appends the attribute to the node dict for
192 # existing nodes, which is not what we want. 192 # existing nodes, which is not what we want.
193 if node.name in dg.nodes: 193 if node.name in dg.node:
194 raise BlockDeviceSetupException( 194 raise BlockDeviceSetupException(
195 "Duplicate node name: %s" % (node.name)) 195 "Duplicate node name: %s" % (node.name))
196 logger.debug("Adding %s : %s", node.name, node) 196 logger.debug("Adding %s : %s", node.name, node)
@@ -210,12 +210,12 @@ def create_graph(config, default_config, state):
210 logger.debug("Edges for %s: f:%s t:%s", name, 210 logger.debug("Edges for %s: f:%s t:%s", name,
211 edges_from, edges_to) 211 edges_from, edges_to)
212 for edge_from in edges_from: 212 for edge_from in edges_from:
213 if edge_from not in dg.nodes: 213 if edge_from not in dg.node:
214 raise BlockDeviceSetupException( 214 raise BlockDeviceSetupException(
215 "Edge not defined: %s->%s" % (edge_from, name)) 215 "Edge not defined: %s->%s" % (edge_from, name))
216 dg.add_edge(edge_from, name) 216 dg.add_edge(edge_from, name)
217 for edge_to in edges_to: 217 for edge_to in edges_to:
218 if edge_to not in dg.nodes: 218 if edge_to not in dg.node:
219 raise BlockDeviceSetupException( 219 raise BlockDeviceSetupException(
220 "Edge not defined: %s->%s" % (name, edge_to)) 220 "Edge not defined: %s->%s" % (name, edge_to))
221 dg.add_edge(name, edge_to) 221 dg.add_edge(name, edge_to)
@@ -231,9 +231,9 @@ def create_graph(config, default_config, state):
231 231
232 # Topological sort (i.e. create a linear array that satisfies 232 # Topological sort (i.e. create a linear array that satisfies
233 # dependencies) and return the object list 233 # dependencies) and return the object list
234 call_order_nodes = list(nx.topological_sort(dg)) 234 call_order_nodes = nx.topological_sort(dg)
235 logger.debug("Call order: %s", call_order_nodes) 235 logger.debug("Call order: %s", list(call_order_nodes))
236 call_order = [dg.nodes[n]['obj'] for n in call_order_nodes] 236 call_order = [dg.node[n]['obj'] for n in call_order_nodes]
237 237
238 return dg, call_order 238 return dg, call_order
239 239
diff --git a/requirements.txt b/requirements.txt
index 3a18dd8..827edc1 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -2,7 +2,7 @@
2# of appearance. Changing the order has an impact on the overall integration 2# of appearance. Changing the order has an impact on the overall integration
3# process, which may cause wedges in the gate later. 3# process, which may cause wedges in the gate later.
4Babel!=2.4.0,>=2.3.4 # BSD 4Babel!=2.4.0,>=2.3.4 # BSD
5networkx>=1.10 # BSD 5networkx<2.0,>=1.10 # BSD
6pbr!=2.1.0,>=2.0.0 # Apache-2.0 6pbr!=2.1.0,>=2.0.0 # Apache-2.0
7PyYAML>=3.10 # MIT 7PyYAML>=3.10 # MIT
8flake8<2.6.0,>=2.5.4 # MIT 8flake8<2.6.0,>=2.5.4 # MIT