Skip to content

Commit

Permalink
ZODBReference is now callable to fix an unpickling error
Browse files Browse the repository at this point in the history
Fixes #20
  • Loading branch information
ale-rt committed Sep 16, 2020
1 parent 8d33e32 commit 0e75db3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changes
1.6 (unreleased)
----------------

- ZODBReference is now callable to fix an unpickling error.
(`#20 <https://github.com/zopefoundation/zodbupdate/issues/20>`__)

- Test with history-free and history-preserving RelStorage. Note that
history-preserving RelStorage requires RelStorage 3.3 or above, and
Python 2.7 or Python 3.6 and above.
Expand Down
5 changes: 5 additions & 0 deletions src/zodbupdate/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ class ZODBReference(object):
def __init__(self, ref):
self.ref = ref

def __call__(self):
""" We need an empty __call__
"""
pass


class ObjectRenamer(object):
"""This load and save a ZODB record, modifying all references to
Expand Down

0 comments on commit 0e75db3

Please sign in to comment.