zopefoundation / persistent

automatic persistence for Python objects
https://pypi.org/project/persistent/
Other
46 stars 28 forks source link

Make the Python impl handle setting __class__ and __dict__ on ghosts like C #160

Closed jamadden closed 3 years ago

jamadden commented 3 years ago

By activating the object.

Add tests for this.

In the process of adding tests, I discovered the mock pickle cache used by the Python tests was returning the wrong thing from new_ghost (not a ghost), so I fixed this and added some extra tests and assertions to be sure the behaviour matches with the real and C caches.

Fixes #155

jamadden commented 3 years ago

Thank you!