From 14c65a15256d6821e0e9d5ee1b4390ccb09045ad Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Tue, 12 Jul 2016 12:46:30 -0500 Subject: [PATCH] Changes to handle_serials merged to version 4 and removed in version 5. --- .travis.yml | 4 ++-- relstorage/cache.py | 1 - relstorage/tests/RecoveryStorage.py | 6 ++---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1df19f5c..b02d17a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,9 +33,9 @@ notifications: install: - pip install -U pip setuptools - pip install -U tox coveralls -# Install patched version of 4.4.2; only change is in a test method. +# Install patched version of 4; waiting on 4.4.3. # Same change was merged to 5.0 branch post a5 - - pip install git+https://github.com/NextThought/ZODB.git@handle-serials4#egg=ZODB + - pip install git+https://github.com/zopefoundation/ZODB.git@4#egg=ZODB - if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then pip install -U python-memcached; fi - if [[ $TRAVIS_PYTHON_VERSION != 'pypy' ]]; then pip install -U pylibmc cffi; fi - pip install -U -e ".[test]" diff --git a/relstorage/cache.py b/relstorage/cache.py index a7a546d0..76df66b1 100644 --- a/relstorage/cache.py +++ b/relstorage/cache.py @@ -210,7 +210,6 @@ def _check_tid_after_load(self, oid_int, actual_tid_int, # transaction order, leading it to sometimes put the # wrong tid in delta_after*. cp0, cp1 = self.checkpoints - import os msg = ("Detected an inconsistency " "between the RelStorage cache and the database " diff --git a/relstorage/tests/RecoveryStorage.py b/relstorage/tests/RecoveryStorage.py index 79726134..7a4cdc42 100644 --- a/relstorage/tests/RecoveryStorage.py +++ b/relstorage/tests/RecoveryStorage.py @@ -20,7 +20,6 @@ from transaction import Transaction from ZODB import DB from ZODB.serialize import referencesf -from ZODB.tests.StorageTestBase import handle_serials from ZODB.tests.StorageTestBase import MinPO from ZODB.tests.StorageTestBase import snooze from ZODB.tests.StorageTestBase import zodb_pickle @@ -215,10 +214,9 @@ def checkRestoreAfterDoubleCommit(self): # Store an object self._storage.store(oid, revid, data1, '', t) # Store it again - r1 = self._storage.store(oid, revid, data2, '', t) + self._storage.store(oid, revid, data2, '', t) # Finish the transaction - r2 = self._storage.tpc_vote(t) - revid = handle_serials(oid, r1, r2) + self._storage.tpc_vote(t) self._storage.tpc_finish(t) except: self._storage.tpc_abort(t)