Commit eeef4949 authored by Hanno Schlichting's avatar Hanno Schlichting

Require at least ZODB 3.9 and adjusted method signatures to disuse versions.

parent b3db19e2
...@@ -4,6 +4,8 @@ Changelog ...@@ -4,6 +4,8 @@ Changelog
2.12.0 - unreleased 2.12.0 - unreleased
------------------- -------------------
- Require at least ZODB 3.9 and adjusted method signatures to disuse versions.
- Expanded dependency on ZODB3 to include the test extra. - Expanded dependency on ZODB3 to include the test extra.
2.11.3 - 2010-06-05 2.11.3 - 2010-06-05
......
...@@ -30,7 +30,7 @@ setup(name='tempstorage', ...@@ -30,7 +30,7 @@ setup(name='tempstorage',
packages=find_packages('src'), packages=find_packages('src'),
package_dir={'': 'src'}, package_dir={'': 'src'},
install_requires=[ install_requires=[
'ZODB3 [test]', 'ZODB3 [test] >= 3.9.0',
], ],
include_package_data=True, include_package_data=True,
zip_safe=False, zip_safe=False,
......
...@@ -127,7 +127,7 @@ class TemporaryStorage(BaseStorage, ConflictResolvingStorage): ...@@ -127,7 +127,7 @@ class TemporaryStorage(BaseStorage, ConflictResolvingStorage):
""" Close the storage """ Close the storage
""" """
def load(self, oid, version): def load(self, oid, version=''):
self._lock_acquire() self._lock_acquire()
try: try:
try: try:
...@@ -158,11 +158,9 @@ class TemporaryStorage(BaseStorage, ConflictResolvingStorage): ...@@ -158,11 +158,9 @@ class TemporaryStorage(BaseStorage, ConflictResolvingStorage):
# cache". But 'load' appears to do that too, so uh, who knows. # cache". But 'load' appears to do that too, so uh, who knows.
# - CM # - CM
def loadEx(self, oid, version): def loadEx(self, oid, version=''):
data = self.load(oid, version) data = self.load(oid)
# pickle, serial, version # pickle, serial, version
# return an empty string for the version, as this is not a
# versioning storage, and it's what MappingStorage does.
return (data[0], data[1], "") return (data[0], data[1], "")
def loadSerial(self, oid, serial, marker=[]): def loadSerial(self, oid, serial, marker=[]):
...@@ -212,11 +210,7 @@ class TemporaryStorage(BaseStorage, ConflictResolvingStorage): ...@@ -212,11 +210,7 @@ class TemporaryStorage(BaseStorage, ConflictResolvingStorage):
def store(self, oid, serial, data, version, transaction): def store(self, oid, serial, data, version, transaction):
if transaction is not self._transaction: if transaction is not self._transaction:
raise POSException.StorageTransactionError(self, transaction) raise POSException.StorageTransactionError(self, transaction)
if version: assert not version
# we allow a version to be in use although we don't
# support versions in the storage.
LOG.debug('versions in use with TemporaryStorage although'
'Temporary Storage doesnt support versions')
self._lock_acquire() self._lock_acquire()
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment