• Kirill Smelkov's avatar
    go/*: Switch to StrictUnicode mode for pickling/unpickling · ff6973d8
    Kirill Smelkov authored
    Because without StrictUnicode both bytestrings (str from py2) and
    unicode (unicode from py2 and str from py3) load into the same Go type
    string so it becomes impossible to distinguish them from each other.
    Re-saving data, thus, also generally introduces changes as e.g.
    string loaded via bytestring will be saved as unicode when pickling with
    protocol 3. Or a loaded unicode will be saved as bytestring with
    pickling via protocol=2.
    
    -> Switching to StrictUnicode mode solves all those problems.
    
    Please see updated documentatin for zodbpickle.go and
    https://github.com/kisielk/og-rek/commit/b28613c2 for more details about
    StrictUnicode mode.
    
    For ZODB/go this is change in behaviour exposed to outside. However
    there is currently only one known ZODB/go user - WCFS in Wendelin.core -
    and that user will be updated correspondingly as well.
    ff6973d8
zodb.go 20.1 KB