Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to persistent >= 4.2.3. #9

Merged
merged 6 commits into from
Feb 2, 2018
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ parts = interpreter test

[versions]
Persistence =
persistent = >= 4.2.3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setup.py does not match this. It seems to me like it probably should.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was planning to remove this change before the merge because it was only necessary to force this new versions as it was not used by Zope because of the issue now fixed in this PR.

I'll have a look if this change is actually needed and has to be ported to setup.py.


[interpreter]
recipe = zc.recipe.egg
Expand Down
29 changes: 9 additions & 20 deletions src/Persistence/tests/test_persistent.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from Persistence import IS_PYPY, IS_PURE
from Persistence import Persistent
from persistent.picklecache import PickleCache
from persistent import PickleCache
from persistent.TimeStamp import TimeStamp


Expand Down Expand Up @@ -108,29 +108,18 @@ def test_oid_jar_attrs(self):

self.jar.add(obj)

if not (IS_PURE or IS_PYPY):
# Can change oid of cache object since persistent 4.0.8
# Can't change oid of cache object.
with self.assertRaises(ValueError):
del obj._p_oid

with self.assertRaises(ValueError):
obj._p_oid = 12

with self.assertRaises(ValueError):
del obj._p_jar

with self.assertRaises(ValueError):
obj._p_jar = 12
else:
# Can't change oid of cache object.
def deloid():
del obj._p_oid
self.assertRaises(ValueError, deloid)

def setoid():
obj._p_oid = 12
self.assertRaises(ValueError, setoid)

def deloid():
del obj._p_jar
self.assertRaises(ValueError, deloid)

def setoid():
obj._p_jar = 12
self.assertRaises(ValueError, setoid)

def testChanged(self):
obj = P()
Expand Down