#16275: Hom: introduce a check argument to simplify the unpickling detection 
logic
-------------------------------------+-------------------------------------
       Reporter:  nthiery            |        Owner:
           Type:  enhancement        |       Status:  new
       Priority:  major              |    Milestone:  sage-6.2
      Component:  categories         |   Resolution:
       Keywords:  homset, pickling   |    Merged in:
        Authors:  Nicolas M. ThiƩry  |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  
u/nthiery/hom__introduce_a_check_argument_to_simplify_the_unpickling_detection_logic|
  ae3ca8080a8412891722695d1e24e1dfe374d787
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by SimonKing):

 Replying to [ticket:16275 nthiery]:
 > As an alternative, this ticket proposes to add a ``check=True/False``
 > optional argument to Hom, and to use it upon unpickling.

 I agree that this is a good approach.

 > A potential caveat: pickles created since #14793 might not unpickle
 > properly. This was very recent; do we care?

 I would prefer if we could preserve these potential pickles. Perhaps it is
 possible to have a "try-except" block somewhere, and unpickle the old way
 only if the new way fails. This would be without a noticeable speed
 regression, I hope.

 Note, in any case, that post-#14793 pickles that can not be unpickled with
 your changes could not be unpickled pre-#14793 either.

 > Other changes in this ticket:
 >
 > - Hom now uses ``X in category`` as sanity check rather than
 >   ``X.category().is_subcategory(category)``.

 +1

 I will try to review it after lunch. Certainly there has to be a review
 patch, e.g., in order to remove the old `__reduce__` method that you left
 in under the name `__reduce__disabled__`.

--
Ticket URL: <http://trac.sagemath.org/ticket/16275#comment:8>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to