#21065: Improve pickling error handling
--------------------------------------+---------------------------
       Reporter:  novoselt            |         Type:  enhancement
         Status:  new                 |     Priority:  major
      Milestone:  sage-7.3            |    Component:  pickling
       Keywords:                      |    Merged in:
        Authors:  Andrey Novoseltsev  |    Reviewers:
Report Upstream:  N/A                 |  Work issues:
         Branch:                      |       Commit:
   Dependencies:                      |     Stopgaps:
--------------------------------------+---------------------------
 To fix unpickling of old objects it is necessary to know both module and
 callable. At the moment module may be invisible:
 {{{
 sage:  load('http://rlmiller.org/de_codes/get_code.php?id=16_08')
 ...
 /home/novoselt/sage/src/sage/structure/sage_object.pyx in
 sage.structure.sage_object.unpickle_global
 (build/cythonized/sage/structure/sage_object.c:12911)()
    1323     mod = sys_modules.get(module)
    1324     if mod is not None:
 -> 1325         return getattr(mod, name)
    1326     try:
    1327         __import__(module)

 AttributeError: 'module' object has no attribute
 'unpickle_FiniteField_prm'
 }}}
 After the fix:
 {{{
 sage:  load('http://rlmiller.org/de_codes/get_code.php?id=16_08')
 ...
 ImportError: cannot import unpickle_FiniteField_prm from sage.rings.ring,
 call register_unpickle_override('sage.rings.ring',
 'unpickle_FiniteField_prm', ...) to fix this
 }}}

--
Ticket URL: <https://trac.sagemath.org/ticket/21065>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to