Changes between Initial Version and Version 1 of Ticket #28444, comment 47


Ignore:
Timestamp:
09/04/19 16:19:49 (2 years ago)
Author:
nbruin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28444, comment 47

    initial v1  
    88
    99Backport [https://bugs.python.org/issue22005 Issue 22005] from Python 3.9?
     10
     11If the copyreg option is available, perhaps the following would be a workable, extendable solutions:
     12 - make sure `encoding` is available for sage's unpickler access
     13 - aim for "latin1" being the default, but let 'bytes' be an option for the (rare?) pickles that need it
     14 - solve a few cases needing 'bytes', using copyreg registered constructors, so that they also work with 'latin1'
     15 - document the process of writing these copyreg constructors so that it's relatively straightforward to do it when we discover other data types that need it.
     16
     17I think that gets us at least to a state where the "blocker" status of this ticket can be lifted, because there's a clear path to resolving this pickle incompatibility.
     18
     19Truth is: any data type that is not in a pickle jar that gets tested regularly will almost certainly not be supported for unpickling in the future. Backwards compatibility of pickle requires real and constant work as sage develops. Major overhauls particularly will be a huge problem, and in some cases (if we don't have a version attribute) there might already be pickles that are genuinely ambiguous in how they should be unpickled.