#13998: hash of a pickled Sequence is broken
------------------------+---------------------------------------------------
   Reporter:  slabbe    |             Owner:  slabbe  
       Type:  defect    |            Status:  new     
   Priority:  major     |         Milestone:  sage-5.7
  Component:  pickling  |          Keywords:          
Work issues:            |   Report Upstream:  N/A     
  Reviewers:            |           Authors:          
  Merged in:            |      Dependencies:          
   Stopgaps:            |  
------------------------+---------------------------------------------------
 The following works::

 {{{
     sage: M = ModularSymbols(1,12,sign=1)
     sage: M
     Modular Symbols space of dimension 2 for Gamma_0(1) of weight 12 with
 sign 1 over Rational Field
     sage: S =
 M.cuspidal_submodule().decomposition()[0].free_module().basis()
     sage: type(S)
     <class 'sage.structure.sequence.Sequence_generic'>
     sage: S
     [
     (1, 0)
     ]
     sage: hash(S)
     979268961
 }}}

 But if you do the same from a certain pickled object, it is broken (tested
 on sage-4.7 and sage-5.6.rc0)::

 {{{
     sage: M =
 load('http://sage.math.washington.edu/home/slabbe/LMFDB/mstest.sobj')
     Attempting to load remote file:
 http://sage.math.washington.edu/home/slabbe/LMFDB/mstest.sobj
     Loading: [.]
     sage: M
     Modular Symbols space of dimension 2 for Gamma_0(1) of weight 12 with
 sign 1 over Rational Field
     sage: S =
 M.cuspidal_submodule().decomposition()[0].free_module().basis()
     sage: type(S)
     <class 'sage.structure.sequence.Sequence_generic'>
     sage: S
     [
     (1, 0)
     ]
     sage: hash(S)
     Traceback (most recent call last)
     ...
     AttributeError: 'Sequence_generic' object has no attribute
 '_Sequence_generic__hash'
 }}}

 This particular problem was reported by LMFDB developper who understands
 that Sage do not guarrenty that pickled object are supported by later
 version of Sage.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13998>
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