with a graph such as {'a':[], 'b':[]} then function will loop endlessly. | |
| priority | normal |
|---|---|
| type | bug |
| appeared in | <not specified> |
| done in | 0.55.0 |
| load | 0.500 |
| load left | 0.000 |
| closed by | <not specified> |
Logilab.org | anonymous [register] [login]
|
logilab-common #60288 broken graph.ordered_nodes [open]
|
|||||||||||||||||||
Comments
-
2011/02/08 17:12 | reply to this comment
-
2011/02/09 12:18, written by nchauvat
| reply to this comment
(add comment)the new implementation returns elements in reverse order from the previous implementation (and this breaks cubiweb.cwconfig.CubicWebNoAppConfigurationreorder_cubes).
Additionnally, if I call ordered_nodes twice on the same graph, the second call returns an empty tuple, which is quite unexpected (but consistent with the previous implementation, so you could argue this is bug-compatible)
logilab.common.ordered_nodes() does not return a graph. you are not supposed to call ordered_nodes() passing the result of ordered_nodes() as an argument.
regarding {'a':[], 'b':[]} it is tested by http://hg.logilab.org/logilab/common/file/22b5fb5de9f7/test/unittest_graph.py#l56 and the test passes. What version are you using ?