• Kirill Smelkov's avatar
    go/*: Move creation of a Pickler and Unpickler to central place · 3bbd2680
    Kirill Smelkov authored
    We already have 3 places where we create picklers and unpicklers:
    zodb/pydata.go, fs1/index.go and zeo/proto.go and they are already
    diverging a bit: for example pydata was explicitly specifying protocol
    for pickle encoder, while other places were using defaults.
    
    We will soon want to use StrictUnicode option for all picklers and
    unpicklers we create, which means it is better to keep this
    customization only in one place instead of copy-pasting it in between
    callsites increasing the possibility for divergence and errors.
    
    -> Move the code to create pickler and unpickler to internal zodbpickle
    package as a preparatory step for that.
    
    For the reference: this package is merely a wrapper around ogórek, not a
    fork of any code like zodbpickle/py is.
    3bbd2680
pydata.go 6.9 KB