#10353: Remove zodb from sage
-----------------------------------+----------------------------------------
       Reporter:  was              |         Owner:  jason       
           Type:  defect           |        Status:  needs_review
       Priority:  major            |     Milestone:  sage-5.6    
      Component:  misc             |    Resolution:              
       Keywords:                   |   Work issues:              
Report Upstream:  N/A              |     Reviewers:              
        Authors:  François Bissey  |     Merged in:              
   Dependencies:  #12205           |      Stopgaps:              
-----------------------------------+----------------------------------------
Description changed by jdemeyer:

Old description:

> zodb only use the pickle protocol version 1. It is also not used in sage
> apart from one package that has been migrated away from it in #12205.
>
> There is a zodb mailing list discussion related to the pickle protocol
> here:  http://www.mail-archive.com/[email protected]/msg04628.html
>
> In particular, pickle protocol 1 is hardcoded.  But SageObjects/Cython
> objects must use protocol 2 in many cases:
> {{{
> sage: import cPickle
> sage: F = factor(12)
> sage: cPickle.dumps(F, protocol=0)
> TypeError: can't pickle SageObject objects
> sage: cPickle.dumps(F, protocol=1)
> TypeError: can't pickle SageObject objects
> sage: cPickle.dumps(F, protocol=2)
> '\x80\x02csage.structure.factorization\nFactorization\nq\x01)\x81q\x02}q\x03(U\x12_Factorization__crq\x04\x89U\x14_Factorization__unitq\x05csage.rings.integer\nmake_integer\nq\x06U\x011\x85Rq\x07U\x18_Factorization__universeq\x08csage.rings.integer_ring\nIntegerRing\nq\t)Rq\nU\x11_Factorization__xq\x0b]q\x0c(h\x06U\x012\x85Rq\rK\x02\x86q\x0eh\x06U\x013\x85Rq\x0fK\x01\x86q\x10eub.'
> }}}
>
> See also the related ticket #10352.
>
> The suggested option for this ticket is to remove zodb from sage.
> ----
> * Apply [attachment:trac10353-db-removal.patch] to the sage library
> * Apply [attachment:trac10353-sage_root.patch] to the sage root
> repository

New description:

 zodb only use the pickle protocol version 1. It is also not used in sage
 apart from one package that has been migrated away from it in #12205.

 There is a zodb mailing list discussion related to the pickle protocol
 here:  http://www.mail-archive.com/[email protected]/msg04628.html

 In particular, pickle protocol 1 is hardcoded.  But SageObjects/Cython
 objects must use protocol 2 in many cases:
 {{{
 sage: import cPickle
 sage: F = factor(12)
 sage: cPickle.dumps(F, protocol=0)
 TypeError: can't pickle SageObject objects
 sage: cPickle.dumps(F, protocol=1)
 TypeError: can't pickle SageObject objects
 sage: cPickle.dumps(F, protocol=2)
 
'\x80\x02csage.structure.factorization\nFactorization\nq\x01)\x81q\x02}q\x03(U\x12_Factorization__crq\x04\x89U\x14_Factorization__unitq\x05csage.rings.integer\nmake_integer\nq\x06U\x011\x85Rq\x07U\x18_Factorization__universeq\x08csage.rings.integer_ring\nIntegerRing\nq\t)Rq\nU\x11_Factorization__xq\x0b]q\x0c(h\x06U\x012\x85Rq\rK\x02\x86q\x0eh\x06U\x013\x85Rq\x0fK\x01\x86q\x10eub.'
 }}}

 See also the related ticket #10352.

 The suggested option for this ticket is to remove zodb from sage.
 ----
 * Apply [attachment:trac10353-db-removal.patch] to the sage library
 * Apply [attachment:trac10353-sage_root.patch] to the sage root repository
 * Remove the zodb package.

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10353#comment:15>
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.

Reply via email to