Skip to content

Fix breakage with zodbpickle >= 2

Kirill Smelkov requested to merge kirr/neo:y/zodbpickle into master

Starting from zodbpickle 2 its binary class does not allow users to set arbitrary attributes and so

binary._pack = bytes.__str__

fails with

TypeError: can't set attributes of built-in/extension type 'zodbpickle.binary'

-> Fix it by explicitly checking for binary type on encoding instead of setting binary._pack

See https://lab.nexedi.com/nexedi/slapos/commit/27f574bc for pre-history.

/cc @jerome

Merge request reports