Commit 5f6c1291 authored by Jim Fulton's avatar Jim Fulton

Merge branch 'master' of github.com:zopefoundation/ZODB

Conflicts:
	CHANGES.rst

Cuz I neglected to push when I made 4.3.0. Thanks DCVS!
parents 77b083cc a5bd3f12
...@@ -2,6 +2,11 @@ ...@@ -2,6 +2,11 @@
Change History Change History
================ ================
4.3.1 (2016-06-06)
==================
- Fixed: FileStorage loadBefore didn't handle deleted/undone data correctly.
4.3.0 (2016-05-31) 4.3.0 (2016-05-31)
================== ==================
......
...@@ -23,23 +23,8 @@ interface, rich transaction support, and undo. ...@@ -23,23 +23,8 @@ interface, rich transaction support, and undo.
version = "4.3.0" version = "4.3.0"
import os import os
import sys
from setuptools import setup, find_packages from setuptools import setup, find_packages
if sys.version_info < (2, 6):
print("This version of ZODB requires Python 2.6 or higher")
sys.exit(0)
if (3,) < sys.version_info < (3, 2):
print("This version of ZODB requires Python 3.2 or higher")
sys.exit(0)
# The (non-obvious!) choices for the Trove Development Status line:
# Development Status :: 5 - Production/Stable
# Development Status :: 4 - Beta
# Development Status :: 3 - Alpha
classifiers = """\ classifiers = """\
Development Status :: 4 - Beta Development Status :: 4 - Beta
Intended Audience :: Developers Intended Audience :: Developers
......
...@@ -489,11 +489,13 @@ class FileStorage( ...@@ -489,11 +489,13 @@ class FileStorage(
if not pos: if not pos:
return None return None
if h.back: if h.plen:
return _file.read(h.plen), h.tid, end_tid
elif h.back:
data, _, _, _ = self._loadBack_impl(oid, h.back, _file=_file) data, _, _, _ = self._loadBack_impl(oid, h.back, _file=_file)
return data, h.tid, end_tid return data, h.tid, end_tid
else: else:
return _file.read(h.plen), h.tid, end_tid raise POSKeyError(oid)
def store(self, oid, oldserial, data, version, transaction): def store(self, oid, oldserial, data, version, transaction):
if self._is_read_only: if self._is_read_only:
......
...@@ -179,6 +179,10 @@ class TransactionalUndoStorage: ...@@ -179,6 +179,10 @@ class TransactionalUndoStorage:
info = self._storage.undoInfo() info = self._storage.undoInfo()
self._undo(info[2]['id'], [oid]) self._undo(info[2]['id'], [oid])
self.assertRaises(KeyError, self._storage.load, oid, '') self.assertRaises(KeyError, self._storage.load, oid, '')
# Loading current data via loadBefore should raise a POSKeyError too:
self.assertRaises(KeyError, self._storage.loadBefore, oid,
b'\x7f\xff\xff\xff\xff\xff\xff\xff')
self._iterate() self._iterate()
def checkUndoCreationBranch2(self): def checkUndoCreationBranch2(self):
......
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