#7608: update Networkx to version 1.0rc1
----------------------------+-----------------------------------------------
Reporter: ylchapuy | Owner: rlm
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.3
Component: graph theory | Keywords:
Work_issues: | Author:
Upstream: N/A | Reviewer:
Merged: |
----------------------------+-----------------------------------------------
Comment(by rlm):
Replying to [comment:17 ylchapuy]:
> The tree patches must be applied.
>
> The only doctest failure remaining for me is
> {{{
> sage -t "devel/sage/sage/structure/sage_object.pyx"
> }}}
> It's a backward compatibility problem: we can't unpickle graphs pickled
in the old format as the NetworkX format changed. I must admit I don't
really know how to deal with this.
This is tricky, but not impossible to deal with. Usually, Python objects
don't need to be told explicitly how to pickle themselves, but, for
example, if you make a Cython object, you need to define a `__reduce__`
method (see
http://www.sagemath.org/doc/reference/sage/structure/unique_representation.html).
What that does is returns information to tell Sage how to recreate the
object, basically by calling the first object returned on the rest of
them. What needs to be done is to trace back through what is happening
when we unpickle old Sage graphs, and see if there isn't an `__init__`
function that gets called somewhere that we can modify to account for this
case. Then we could probably just reach in and grab the adjacency dict
from the old NetworkX object.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7608#comment:20>
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.