#8475: Pickling of _python_object_alphabet is broken.
-------------------------------+--------------------------------------------
   Reporter:  hivert           |       Owner:  hivert                 
       Type:  defect           |      Status:  positive_review        
   Priority:  major            |   Milestone:  sage-4.3.4             
  Component:  combinatorics    |    Keywords:  pickling nested classes
     Author:  Florent Hivert   |    Upstream:  N/A                    
   Reviewer:  Sébastien Labbé  |      Merged:                         
Work_issues:                   |  
-------------------------------+--------------------------------------------
Changes (by slabbe):

  * status:  needs_review => positive_review
  * reviewer:  => Sébastien Labbé


Comment:

 BEFORE:

 {{{
 sage: W = Words()
 sage: A = W.alphabet()
 sage: A
 Python objects
 sage: Z = loads(dumps(W))
 sage: B = Z.alphabet()
 sage: B
 Python objects
 sage: A is B
 True
 sage: W is Z
 False
 sage: W == Z
 True
 sage: loads(dumps(A))
 Traceback (most recent call last):
 ...
 PicklingError: Can't pickle <class
 'sage.combinat.words.words._python_object_alphabet'>: attribute lookup
 sage.combinat.words.words._python_object_alphabet failed
 sage: loads(dumps(B))
 Traceback (most recent call last):
 ...
 PicklingError: Can't pickle <class
 'sage.combinat.words.words._python_object_alphabet'>: attribute lookup
 sage.combinat.words.words._python_object_alphabet failed
 }}}

 AFTER with the patche applied:

 {{{
 sage: W = Words()
 sage: A = W.alphabet()
 sage: A
 Python objects
 sage: Z = loads(dumps(W))
 sage: B = Z.alphabet()
 sage: B
 Python objects
 sage: A is B
 True
 sage: W is Z
 False
 sage: W == Z
 True
 sage: loads(dumps(A))
 Python objects
 sage: loads(dumps(B))
 Python objects
 }}}


 Hence, the problem described in this ticket is fixed by the patch.
 Moreover, all tests passed in the sage tree. Positive review.

 Note to the release manager : this patch commutes with the one at #8429.

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