#7608: upgrade NetworkX to version 1.0.1
----------------------------+-----------------------------------------------
Reporter: ylchapuy | Owner: jason
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.3.4
Component: graph theory | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
----------------------------+-----------------------------------------------
Comment(by mvngu):
The patch
[http://trac.sagemath.org/sage_trac/attachment/ticket/7608/trac_7608_networkx-1.0.1_fixes.patch
trac_7608_networkx-1.0.1_fixes.patch] is actually many patches put into
one file, as evident by the following snippet:
{{{
-# from networkx import XGraph
+# from networkx import MultiGraph
# G = Graph(self.vertices)
# cdef object XG = G._backend._nxg
#
# HG changeset patch
# User Gregory McWhirter <[email protected]>
# Date 1264709924 28800
# Node ID 69b48b5bff7c07dfa3013a1572cd7926d17a601c
# Parent 6a8cf386950323e52babe883811d4bffddb54a74
Applying -bugs patch
diff -r 6a8cf3869503 -r 69b48b5bff7c sage/graphs/base/graph_backends.py
--- a/sage/graphs/base/graph_backends.py Thu Jan 28 12:14:56 2010
-0800
+++ b/sage/graphs/base/graph_backends.py Thu Jan 28 12:18:44 2010
-0800
@@ -603,7 +603,7 @@
self._nxg.remove_edge(u,v,k)
break
else:
- if self._nxg.edge[u][v].get('weight',None) == l:
+ if l is None or self._nxg.edge[u][v].get('weight',None)
== l:
self._nxg.remove_edge(u,v)
except KeyError:
pass
# HG changeset patch
# User Gregory McWhirter <[email protected]>
# Date 1264739634 28800
# Node ID 6216ab27b8110fad4803f298cafb60535b9ff273
# Parent 69b48b5bff7c07dfa3013a1572cd7926d17a601c
Trac 7608 accomodate upgrade to networkx-1.0.1
diff -r 69b48b5bff7c -r 6216ab27b811 sage/graphs/base/graph_backends.py
--- a/sage/graphs/base/graph_backends.py Thu Jan 28 12:18:44 2010
-0800
+++ b/sage/graphs/base/graph_backends.py Thu Jan 28 20:33:54 2010
-0800
@@ -32,12 +32,12 @@
"""
Add an edge (u,v) to self, with label l. If directed is True,
this is
interpreted as an arc from u to v.
-
+
}}}
Also, try to put all changes into one patch. In this case, the following
three patches could be rolled into one:
*
[http://trac.sagemath.org/sage_trac/attachment/ticket/7608/trac_7608_networkx-1.0.1_fixes.patch
trac_7608_networkx-1.0.1_fixes.patch]
*
[http://trac.sagemath.org/sage_trac/attachment/ticket/7608/trac_7608_networkx-1.0.1_fixes.p1.patch
trac_7608_networkx-1.0.1_fixes.p1.patch]
*
[http://trac.sagemath.org/sage_trac/attachment/ticket/7608/trac_7608_networkx-1.0.1_fixes.p2.patch
trac_7608_networkx-1.0.1_fixes.p2.patch]
Doing so would make it easier to review.
[[BR]]
Applying
[http://trac.sagemath.org/sage_trac/attachment/ticket/7608/trac_7608_networkx-1.0.1_fixes.patch
trac_7608_networkx-1.0.1_fixes.patch] to Sage 4.3.3 results in a hunk
failure:
{{{
[mv...@sage sage-main]$ hg qimport http://trac.sagemath.org/sage_trac/raw-
attachment/ticket/7608/trac_7608_networkx-1.0.1_fixes.patch && hg qpush
adding trac_7608_networkx-1.0.1_fixes.patch to series file
applying trac_7608_networkx-1.0.1_fixes.patch
patching file sage/graphs/generic_graph.py
Hunk #250 succeeded at 6694 with fuzz 2 (offset 0 lines).
Hunk #313 FAILED at 8757
Hunk #346 succeeded at 10231 with fuzz 1 (offset -1 lines).
1 out of 364 hunks FAILED -- saving rejects to file
sage/graphs/generic_graph.py.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
errors during apply, please fix and refresh
trac_7608_networkx-1.0.1_fixes.patch
[mv...@sage sage-main]$ cat sage/graphs/generic_graph.py.rej
--- generic_graph.py
+++ generic_graph.py
@@ -8750,9 +8758,9 @@
"""
Logic for coloring by label (factored out from plot() for use in
3d
plots, etc)
-
- EXAMPLES::
-
+
+ EXAMPLES::
+
sage: G = AlternatingGroup(5).cayley_graph()
sage: G.num_edges()
120
}}}
I have attached
[http://trac.sagemath.org/sage_trac/attachment/ticket/7608/trac_7608
-networkx-folded.patch trac_7608-networkx-folded.patch] which folds the
following three patches into one patch:
*
[http://trac.sagemath.org/sage_trac/attachment/ticket/7608/trac_7608_networkx-1.0.1_fixes.patch
trac_7608_networkx-1.0.1_fixes.patch]
*
[http://trac.sagemath.org/sage_trac/attachment/ticket/7608/trac_7608_networkx-1.0.1_fixes.p1.patch
trac_7608_networkx-1.0.1_fixes.p1.patch]
*
[http://trac.sagemath.org/sage_trac/attachment/ticket/7608/trac_7608_networkx-1.0.1_fixes.p2.patch
trac_7608_networkx-1.0.1_fixes.p2.patch]
Only apply
[http://trac.sagemath.org/sage_trac/attachment/ticket/7608/trac_7608
-networkx-folded.patch trac_7608-networkx-folded.patch]. This folded patch
is based on Sage 4.3.3 because
[http://trac.sagemath.org/sage_trac/attachment/ticket/7608/trac_7608_networkx-1.0.1_fixes.patch
trac_7608_networkx-1.0.1_fixes.patch] results in a hunk failure as
reported above.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7608#comment:29>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.