trac #17449: deprecate/remove Graph.to_partition and Poset.to_graph
trac #10962: make Set_PythonType pickable
trac #10962: fix documentation
trac #10962: fix unpickle (Sequences is not a parent)
Remove useless C/API calls; improve error message
Define parent() to be type() for SageObject
Updated Sage version to 6.5.beta4
Trac #10962: Set_PythonType objects are not picklable

{{{
    sage: S = sage.structure.parent.Set_PythonType(tuple)
    sage: dumps(S)
    ------------------------------------------------------------
    Traceback (most recent call last):
      File "<ipython console>", line 1, in <module>
      File "sage_object.pyx", line 842, in
sage.structure.sage_object.dumps (sage/structure/sage_object.c:8274)
      File "sage_object.pyx", line 217, in
sage.structure.sage_object.SageObject.dumps
(sage/structure/sage_object.c:2183)
    PicklingError: Can't pickle <type 'function'>: attribute lookup
__builtin__.function failed
}}}

URL: http://trac.sagemath.org/10962
Reported by: stumpc5
Ticket author(s): Vincent Delecroix, Jeroen Demeyer
Reviewer(s): Jeroen Demeyer, Vincent Delecroix
Trac #17449: deprecate/remove Graph.to_partition and Poset.to_graph

As discussed on sage-devel [1], the two function `Graph.to_partition`
and `Poset.to_graph` do not have a very meaningful name.

As `Poset.to_graph` can be obtained from the clearer alternatives
`Graph(Poset.hasse_diagram())` or
`Poset.hasse_diagram().to_undirected()` it is not a problem to remove
it. On the other hand, the discussion on sage-devel seemed to indicate
that `Graph.to_partition` should be renamed rather than removed.

Also, as it appeared that people were more interested in the size of
connected components than in the actual `Partition` object, the new
function will only return a list of integers.

Nathann

[1] https://groups.google.com/forum/#!topic/sage-devel/TeIwE2L2MOQ

URL: http://trac.sagemath.org/17449
Reported by: ncohen
Ticket author(s): Nathann Cohen
Reviewer(s): Dima Pasechnik, Travis Scrimshaw