I have just uploaded a patch to 
http://trac.sagemath.org/sage_trac/ticket/5294 which adds documentation 
about the pickle_jar to the reference manual. (Thanks Florent for creating 
the ticket, year ago). Possibly something should also go in the developers 
guide.

The main aim of the patch is to tell people what to do when their patch 
breaks an old pickle in the pickle_jar. The patch gives more information 
about to do (and not to do) when a pickle fails to unpickle. 

I suspect that most people first become aware of the pickle_jar when a 
pickle fail to unpickle in a doctest. The patch causes a hopefully more 
informative error message like the following to be printed:
{{{

Failed:_class__sage_combinat_crystals_affine_AffineCrystalFromClassicalAndPromotion_with_category_element_class__.sobj_class__sage_combinat_crystals_tensor_product_CrystalOfTableaux_with_category_element_class__.sobj_class__sage_combinat_crystals_tensor_product_TensorProductOfCrystalsWithGenerators_with_category__.sobj_class__sage_combinat_tableau_Tableau_class__.sobj--------------------------------------------------**
 This error is probably due to an old pickle failing to unpickle.** See 
sage.structure.sage_object.register_unpickle_override for** how to override the 
default unpickling methods for (old) pickles.** NOTE: pickles should never be 
removed from the 
pickle_jar!--------------------------------------------------Successfully 
unpickled 583 objects.Failed to unpickle 4 objects.
}}}
It also adds more examples to the `register_unpickle_override` documentation 
about how to fix broken pickles.


In order to put the error message above into the manual, the patch contains 
an example which intentionally breaks a pickle (but only in the example). 
Unfortunately, as a side effect the patch fails a doctest. This seems to 
have nothing to do with the patch but, rather, is a consequence of the 
following which looks like a bug to me:

{{{
sage: from sage.structure.sage_object import unpickle_all
sage: %timeit unpickle_all()
/usr/local/src/sage/sage-5.3/local/lib/python/timeit.py:195: 
DeprecationWarning: This class is replaced by 
Matrix_modn_dense_float/Matrix_modn_dense_double.
See http://trac.sagemath.org/4260 for details.
  timing = self.inner(it, self.timer)

------------------------------------------------------------------------
Unhandled SIGABRT: An abort() occurred in Sage.
This probably occurred because a *compiled* component of Sage has a bug
in it and is not properly wrapped with sig_on(), sig_off(). You might
want to run Sage under gdb with 'sage -gdb' to debug this.
Sage will now terminate.
------------------------------------------------------------------------
/usr/local/src/sage/sage-5.3/spkg/bin/sage: line 335: 73974 Abort trap: 
6           sage-ipython "$@" -i
}}}
Can anyone confirm whether this is a bug or known issue? Either way, is 
there a way around this? 

Any comments on the patch, especially from those above who feel strongly 
about the pickle_jar, are most welcome.

Andrew

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.


Reply via email to